暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Oracle Linux: Recommended Value For vm.min_free_kbytes Kernel Tuning Parameter

会UI设计的dba 2025-02-19
73

Applies to:

Linux OS - Version Oracle Linux 6.0 and later
Oracle Cloud Infrastructure - Version N/A and later
Linux x86-64

Goal

Calculate a recommended value of the vm.min_free_kbytes kernel tuning control.

Solution

/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.  

This value needs adjusting for every server, there is not a default value.  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


     

Note: Before applying vm.min_free_kbytes tweak in Exadata, refer Oracle Exadata Database Machine Setup/Configuration Best Practices (Doc ID 1274318.1)

  

References

NOTE:401749.1 - Oracle Linux: Shell Script to Calculate Values Recommended Linux HugePages / HugeTLB Configuration
NOTE:361323.1 - HugePages on Linux: What It Is... and What It Is Not...

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论