1

I've got a VM with 16gb of memory and recently it's been using some of the swap space. At first I thought this was because it was using all the memory but then I read some articles about the Cached Memory and how the Linux Kernel uses extra memory for caching. Checked that and saw that I've got about 13gb being allocated to caching. I haven't been able to find any answers though as to why swap is being used. Shouldn't the kernel use memory that is being used as Memory Cache space before it starts using swap space?

Thanks for linking me to that other question, didn't find that for some reason before.

1 Answers1

1

check the swappiness value in :

cat /proc/sys/vm/swappiness

and edit or add if it does not exist

in /etc/sysctl.conf

vm.swappiness=0

than reboot.

I also suggest you to read this and this link.

FargolK
  • 1,667