vm.min_free Settings
Set your vm.min_free_kbytes memory value to 1 GB or more. Best practice sets this value greater than 1 GB.
A common method used to change the parameter value is to edit /etc/sysctl.conf then use the sysctl command to write the changes into the kernel. This ensures the swap setting is persistent across reboots.
The following steps apply to RHEL, SUSE, and Ubuntu systems.
Persistent change:
This is the recommended method for changing your vm.min_free_kbytes settings. It takes effect immediately and is persistent across reboots.
-
Verify the limit of the
vm.min_free_kbytesparameter and the effects of changing it on your system. -
Edit the
/etc/sysctl.conffile. Add the following entry:vm.min_free_kbytes=1048576Ensure that you do not have duplicate entries for
vm.min_free_kbytesin the file. -
Load the
sysctlsetting from the default file/etc/sysctl.conf. Runsysctlas follows:# sysctl -p
Non-persistent change:
This method changes your vm.min_free_kbytes settings temporarily. It is not persistent across reboots.
-
Verify the limit of the
vm.min_free_kbytesparameter and the effects of changing it on your system. -
Run the
sysctlcommand with the-woption from the command line:# sysctl -w vm.min_free_kbytes=1048576