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_kbytes
parameter and the effects of changing it on your system. -
Edit the
/etc/sysctl.conf
file. Add the following entry:vm.min_free_kbytes=1048576Ensure that you do not have duplicate entries for
vm.min_free_kbytes
in the file. -
Load the
sysctl
setting from the default file/etc/sysctl.conf
. Runsysctl
as 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_kbytes
parameter and the effects of changing it on your system. -
Run the
sysctl
command with the-w
option from the command line:# sysctl -w vm.min_free_kbytes=1048576