What is Swappiness?
Swappiness, in the context of Linux, is an important kernel parameter that governs the system’s propensity to transfer less actively used memory pages from RAM to disk swap space. Represented as a value between 0 and 100, swappiness determines the percentage of swapping activity. Higher values encourage more swapping, potentially enhancing system responsiveness, while lower values mitigate swapping, prioritizing the retention of data in physical RAM. With a default setting of 60 in most Linux distributions, indicating a preference to swap out up to 60% of inactive cached pages, users can fine-tune swappiness to align with specific workloads and available RAM, effectively minimizing I/O overhead stemming from excessive swapping.
How to Change the Swappiness of your Linux system
In this article, we will explore the crucial aspect of Linux system optimization by exploring the “swappiness” setting. Swappiness determines the system’s tendency to swap data between RAM and disk, influencing overall performance. This article not only explains the underlying mechanics of swappiness but also provides practical insights and examples for adjusting this parameter, both temporarily and persistently, to enhance Linux performance enabled to specific hardware configurations and workloads.