• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to calculate recommended value of vm.min_free_kbytes Kernel Tuning Parameter

by admin

/proc/sys/vm/min_free_kbytes: This controls the amount of memory that is kept free for use by special reserves including “atomic” allocations (those which cannot wait for reclaim).

Setting vm.min_free_kbytes too low prevents the system from reclaiming memory. This can result in system hangs and OOM-killing multiple processes.

However, setting this parameter to a value that is too high (5-10% of total system memory) will cause your system to become out-of-memory immediately. Linux is designed to use all available RAM to cache file system data. Setting a high min_free_kbytes value results in the system spending too much time reclaiming memory.

From the O/S perspective, the parameter vm.min_free_kbytes should be initially set in the order of 0.5% of total physical memory. Refer to the MemTotal line in the /proc/meminfo report as one place to find this value.

There is no one best value that works optimally in every scenario, so this value may need adjusting. Avoid attempting a setting that exceeds 5% of physical memory, which can trigger immediate out-of-memory conditions. The new value should be added as follows;

1. Open the file /etc/sysctl.conf.

# vi /etc/sysctl.conf

2. Add/modify the following line;

vm.min_free_kbytes = [value]

[value] should be replaced by the actual computed value.

3. Save the file and run the following command to load the changes.

# sysctl -p /etc/sysctl.conf

Filed Under: CentOS/RHEL, Linux

Some more articles you might also be interested in …

  1. apt-file: command not found
  2. How to Find the Original Installation OS Version in CentOS/RHEL
  3. lvdisplay error: “Failed to create directory /var/lock/lvm. File-based locking initilisation failed.”
  4. CentOS / RHEL : Resize (extend) non-root EXT3/4 filesystem on LVM device
  5. cpulimit: command not found
  6. Linux Command line Basics – Executing commands from the command line
  7. Beginners Guide to Managing Package Module Streams in CentOS/RHEL 8
  8. dnsrecon: command not found
  9. How to Configure Remote Rsyslog To Accept TLS and Non-TLS in CentOS/RHEL
  10. CentOS / RHEL 6 : How to configure kdump

You May Also Like

Primary Sidebar

Recent Posts

  • ncat Command Examples in Linux
  • ncat: command not found
  • nautilus Command Examples in Linux
  • namei: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright