Tuning swapspace, VM swappiness, and Out-Of-Memory (OOM) killer priority thresholds on Debian 12 Bookworm
Understanding Swap Space and its Role
Swap space is a crucial component of memory management on Linux systems. When physical RAM (Random Access Memory) becomes exhausted, the kernel can move less frequently used memory pages from RAM to a dedicated disk partition or file, known as swap space. This process, called swapping or paging out, frees up physical RAM for active processes. While it prevents immediate Out-Of-Memory (OOM) errors, excessive swapping can lead to significant performance degradation due to the much slower access times of disk-based storage compared to RAM.
Assessing Current Swap Configuration on Debian 12
Before tuning, it’s essential to understand the current swap setup. The swapon command provides a clear overview of active swap devices and their priorities. The free command, with the -h flag for human-readable output, shows total, used, and free memory, including swap.
To check active swap devices and their priorities:
swapon -s
The output will look something like this, indicating the file or partition used for swap and its priority. Higher priority numbers mean the kernel will prefer to use that swap space first.
Filename &
Leave a Reply
You must be logged in to post a comment.