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.

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 an issue occurs when setting this value, or you use 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:

    $ sysctl vm.min_free_kbytes
    
  2. 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
    
  3. 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.

    # The min_free_kbytes setting
    vm.min_free_kbytes=16132
    
  4. Run sysctl -p to apply the changes in sysctl.conf immediately.