KubeCon NA 2025: Deep Dive: Handling Kubernetes Memory Pressure & Achieving Workload Stability With NodeSwap
This repository contains the slides, stress test artifacts, and analysis data for the KubeCon North America 2025 presentation on Kubernetes NodeSwap.
The Problem: Effectively managing memory pressure is key to stable Kubernetes workloads and preventing OOM errors. The Kubernetes NodeSwap feature, GA from v1.34, promises better resource management and node stability.
What We Cover: This talk shares first-hand insights and practical learnings from rigorous stress testing done at Google, focusing on the trade-offs, kernel performance tuning, and the current limitations in eviction logic and observability when using swap in production clusters. We also discuss the future of pod-level swap control.
| Resource | Description | Link |
|---|---|---|
| Presentation Slides | The full, embedded slide deck from the session. | View Slides on GitHub Pages |
| Stress Test Code | Kubernetes manifests, configurations, and scripts used for the NodeSwap stress tests. | Explore Code Artifacts |
| KubeCon Sched | Official session details, abstract, and speaker information. | View on Sched.com |
// From a 1.32 GKE node -- 8GB ubuntu
$ sysctl vm.min_free_kbytes
vm.min_free_kbytes = 67584 // ~68MB
Linux kernel will set this value based on RAM size and thp pagesizes - a good explanation of how it gets 68MB in x86 systems is here.
From kernel bits --
- Initial kernel calculation (lowmem bytes) -- setting default
linux/mm /page_alloc.c:calculate_min_free_kbyteshere. - Huge-table adjustment here
- Kubernetes Slack: ajaysundark@
#sig-nodechannel