min_free_kbytes Setting

This topic details how to update the min_free_kbytes setting so that it is within the range supported by Vertica. The installer reports this issue with the identifier: S0050 if the setting is too low, or S0051 if the setting is too high.

The vm.min_free_kbytes setting configures the page reclaim thresholds. When this number is increased the system starts reclaiming memory earlier, when its lowered it starts reclaiming memory later. The default min_free_kbytes is calculated at boot time based on the number of pages of physical RAM available on the system.

The setting must be whichever value is the greatest from the following options:

  • The default value configured by the system
  • 4096
  • The result of running the commands:

    $ memtot=`grep MemTotal /proc/meminfo | awk '{printf "%.0f",$2}'`
    $ echo "scale=0;sqrt ($memtot*16)" | bc

The installer automatically configures the correct setting if the default value does not meet system requirements. If there is an issue setting this value, or you have used the --no-system-configuration argument to the installer and the current setting is incorrect, then the installer reports this as an issue.

All Systems

To manually set min_free_kbytes:

  1. Determine the current/default setting with the following command:
  2. $ sysctl vm.min_free_kbytes
  3. If the result of the previous command is No such file or directory or the default value is less than 4096, then run these commands to determine the correct value:

    $ memtot=`grep MemTotal /proc/meminfo | awk '{printf "%.0f",$2}'`
    $ echo "scale=0;sqrt ($memtot*16)" | bc
  4. Edit or add the current value of vm.min_free_kbytes in /etc/sysctl.conf with the value from the output of the previous command.
  5. # The min_free_kbytes setting
    vm.min_free_kbytes=16132
  6. Run sysctl -p to apply the changes in sysctl.conf immediately.
  7. These steps must be repeated for each node in the cluster.