Skip to content

ajaysundark/k8s-memory-swap-stress-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.


Session Summary

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.


Key Resources

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

Kernel References

Default Linux Kernel Memory Buffer Calculation

// 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 --

  1. Initial kernel calculation (lowmem bytes) -- setting default linux/mm /page_alloc.c:calculate_min_free_kbytes here.
  2. Huge-table adjustment here

Connect

  • Kubernetes Slack: ajaysundark@ #sig-node channel

About

Memory load stress tests on Kubernetes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors