VM swappiness is a setting in the Linux kernel that tells your system how aggressively it should use "swap space" compared to your computer's main memory (RAM). Think of swap space as a backup area on your hard drive that the system uses when RAM fills up.
A high swappiness value means your system will try to move data from RAM to swap space more often.
A low swappiness value means your system will try to keep data in RAM for longer, using swap space only when absolutely necessary.
In simple terms, the higher the swappiness value, the more your system will use the hard drive for memory overflow.
DEFAULT SWAPPINESS VALUE
On many Linux distributions like RHEL and CentOS, the default swappiness value is often 60.
HOW TO CHECK YOUR CURRENT SWAPPINESS
You can easily check the current swappiness value on your Linux system using one of these commands:
Using
sysctl
:sysctl vm.swappiness
Example Output:
vm.swappiness = 60
Reading the file directly:
cat /proc/sys/vm/swappiness
Example Output:
60
Both commands will show you the current swappiness setting.
No comments:
Post a Comment