LINBIT featured image

Increase vm.min_free_kbytes for better OOM resistance

Depending on your setup and your workload (eg. within a virtual machine with little memory and much I/O) you could get into the situation that the kernel has little memory left, so wants to write some dirty pages to disk, but cannot, because for that it would need some memory free!

Now, while that cannot happen with DRBD alone (as this has some small, reserved memory pool to guarantee progress without needing extra memory allocated), you can get into this with eg. iSCSI and md, especially with too low values for the sysctl vm.min_free_kbytes (which is set to 128 on some installations, ie. only 128kByte reserved!).

To make the system much more resistant against these OOM scenarios you can increase the value; for a machine with more than 8GByte RAM you can easily spare 128MByte (which would translate into a sysctl value of 131072, as it has to be given in kByte).

The common way to change the value is to edit /etc/sysctl.conf, and then to use the sysctl command to write the changes into the kernel.

Like? Share it with the world.

Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp
Share on vk
Share on reddit
Share on email