Kubernetes Blog
April 27, 2025 at 12:00 AMai_discoveryinfo
Product
Kubernetes
cloudinfrastructuredevops
Update Details
Comprehensive information about this update
Full Content
Release Notes
Kubernetes Bloghttps://kubernetes.io/The Kubernetes blog is used by the project to communicate new features, community reports, and any news that might be relevant to the Kubernetes community.Hugo -- gohugo.ioenhttps://raw.githubusercontent.com/kubernetes/kubernetes/master/logo/logo.pngThe Kubernetes project logohttps://kubernetes.io/Tuning Linux Swap for Kubernetes: A Deep Divehttps://kubernetes.io/blog/2025/08/19/tuning-linux-swap-for-kubernetes-a-deep-dive/Tue, 19 Aug 2025 10:30:00 -0800https://kubernetes.io/blog/2025/08/19/tuning-linux-swap-for-kubernetes-a-deep-dive/ <p>The Kubernetes <a href="https://kubernetes.io/docs/concepts/cluster-administration/swap-memory-management/">NodeSwap feature</a>, likely to graduate to <em>stable</em> in the upcoming Kubernetes v1.34 release, allows swap usage: a significant shift from the conventional practice of disabling swap for performance predictability. This article focuses exclusively on tuning swap on Linux nodes, where this feature is available. By allowing Linux nodes to use secondary storage for additional virtual memory when physical RAM is exhausted, node swap support aims to improve resource utilization and reduce out-of-memory (OOM) kills.</p> <p>However, enabling swap is not a "turn-key" solution. The performance and stability of your nodes under memory pressure are critically dependent on a set of Linux kernel parameters. Misconfiguration can lead to performance degradation and interfere with Kubelet's eviction logic.</p> <p>In this blogpost, I'll dive into critical Linux kernel parameters that govern swap behavior. I will explore how these parameters influence Kubernetes workload performance, swap utilization, and crucial eviction mechanisms. I will present various test results showcasing the impact of different configurations, and share my findings on achieving optimal settings for stable and high-performing Kubernetes clusters.</p> <h2 id="introduction-to-linux-swap">Introduction to Linux swap</h2
Source Url
Published At
Sunday, April 27, 2025
12:00:00 AM
Discovered At
Wednesday, August 27, 2025
1:26:21 PM
Confidence
0.5