• 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. dnsmap: command not found
  2. bmaptool Command Examples (Create or copy block maps intelligently)
  3. CentOS / RHEL : How to find which user run a specific command?
  4. How to disable NetworkManager on CentOS / RHEL 7
  5. sam Command Examples in Linux
  6. namei: command not found
  7. CentOS / RHEL : Installing and Configuring ASMLib
  8. How to use strace and ltrace commands in Linux
  9. calcurse: command not found
  10. How to work with multiple java versions under Linux

You May Also Like

Primary Sidebar

Recent Posts

  • ctags: Generates an index (or tag) file of language objects found in source files for many popular programming languages
  • csvtool: Utility to filter and extract data from CSV formatted sources
  • csvstat: Print descriptive statistics for all columns in a CSV file
  • csvsql: Generate SQL statements for a CSV file or execute those statements directly on a database

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright