Oracle Linux Inconsistent swappiness value with cgroup "memory.swappiness"
APPLIES TO:
Linux OS – Version Oracle Linux 8
Linux x86_64
SYMPTOMS:
OL8 instance swap upto 2GB even though the kernel parameter "vm.swappiness " is set to 1.
NOTE – vm.swappiness value in this example was set to 1 but it can be set to 0,10,60(default) or 100
* 0: swap is disable
* 1: minimum amount of swapping without disabling it entirely
* 10: recommended value to improve performance when sufficient memory exists in a system
* 60: Default swappiness value
* 100: aggressive swapping
$sudo sysctl -a | grep swappiness vm.swappiness = 1
$sudo cd /sys/fs/cgroup/memory/ && grep . **/memory.swappiness init.scope/memory.swappiness:60 machine.slice/memory.swappiness:60 oca.slice/memory.swappiness:60 system.slice/memory.swappiness:60 user.slice/memory.swappiness:60
Tagged:
0