Situation:
total used free shared buff/cache available Mem: 5941 1610 168 233 4695 4331 Swap: 1023 1022 1
Why that fckin server do not consume memory, but eating cache? Server is idle ~96%.
set swappiness to 1?
I bench YABS 24/7/365 unless it's a leap year.
Ha, that's the provider setting. vm.swappiness was set to 60, where the other providers had 1.
free value is 168 , that means all the memory might be used by pagecache. So the system starts swapping.
Can clear page cache like this https://www.tecmint.com/clear-ram-memory-cache-buffer-and-swap-space-on-linux/
You can also modify vm.swappiness parameter to control swap aggressiveness
nano /etc/sysctl.conf
vm.swappiness = [value]
where value is any number between 0-100 0 = avoid swappiness 100 = aggressive swapping
https://webhorizon.net
@legendary said: Ha, that's the provider setting. vm.swappiness was set to 60, where the other providers had 1.
60 is the default value in linux
@Abdullah while we are at this, whats the key difference between 0 and 1?
will there still be any swapping at 0?
@cybertech said: will there still be any swapping at 0?
Yes it will still swap at 0
from stackexchange https://github.com/torvalds/linux/blob/v5.0/Documentation/sysctl/vm.txt#L809
"A value of 0 instructs the kernel not to initiate swap until the amount of free and file-backed pages is less than the high water mark in a zone."
I set swappiness to 10/15
"How miserable life is in the abuses of power..." F. Battiato ---
Comments
set swappiness to 1?
I bench YABS 24/7/365 unless it's a leap year.
Ha, that's the provider setting. vm.swappiness was set to 60, where the other providers had 1.
free value is 168 , that means all the memory might be used by pagecache. So the system starts swapping.
Can clear page cache like this https://www.tecmint.com/clear-ram-memory-cache-buffer-and-swap-space-on-linux/
You can also modify vm.swappiness parameter to control swap aggressiveness
nano /etc/sysctl.conf
vm.swappiness = [value]
where value is any number between 0-100
0 = avoid swappiness
100 = aggressive swapping
https://webhorizon.net
60 is the default value in linux
https://webhorizon.net
@Abdullah while we are at this, whats the key difference between 0 and 1?
will there still be any swapping at 0?
I bench YABS 24/7/365 unless it's a leap year.
Yes it will still swap at 0
from stackexchange https://github.com/torvalds/linux/blob/v5.0/Documentation/sysctl/vm.txt#L809
"A value of 0 instructs the kernel not to
initiate swap until the amount of free and file-backed pages is less
than the high water mark in a zone."
https://webhorizon.net
I set swappiness to 10/15
"How miserable life is in the abuses of power..."
F. Battiato ---