Translated message

A translation of this page exists in English.

Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

negative-dentry-limit sysctl パラメーターが Red Hat Enterprise Linux 8 で使用できないのはなぜですか?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 8

Issue

  • negative-dentry-limit sysctl パラメーターが Red Hat Enterprise Linux 8 で使用できないのはなぜですか?
  • Red Hat Enterprise Linux 8 は negative-dentry-limit 状況をどのように処理しますか?

Resolution

  • negative-dentry-limit sysctl パラメーターは、RHEL-7 カーネルに特別に追加されています。RHEL-8 カーネルは最新のアップストリームカーネルをベースとしており、negative-dentry 状況を処理できます。ただし、RHEL-7 カーネルは、negative-dentry を適切に処理するように構築されていません。関連するパッチをアップストリームから RHEL-7 カーネルにバックポートすることは、コードの中断を引き起こすため不可能でした。したがって、この状況を回避するために、新しい sysctl パラメーター negative-dentry-limitRHEL-7.8 カーネルコードパスに特別に追加されました。

Root Cause

  • Changelog:
# rpm -q kernel --changelog | grep negative-dentry-limit
- [fs] fs/dcache: Add sysctl parameter negative-dentry-limit as a soft limit on negative dentries (Waiman Long) [1489573]
  • パッチセットのスニペット:
    [fs] fs/dcache: Add sysctl parameter negative-dentry-limit as a soft limit on negative dentries
------------>8--------------->8----------------->8-------------->8-------------

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1489573
Upstream Status: RHEL only

The upstream kernel is able to gracefully handle an avalanche of new
negative dentries by invoking memory reclaim to free excess dentries.
RHEL7 kernel, however, is unable to gracefully handle that leading to OOM
in some cases. Kernel memory cgroup in RHEL7 is not able to limit memory
consumed by slab cache either. Backporting the relevant upstream patches
will be too intrusive. So we need some RHEL7 specific solution to handle
this problem.

A new sysctl parameter "negative-dentry-limit" is added to /proc/sys/fs
whose value represents a soft limit on the total number of negative
dentries allowable in a system as a multiple of one-thousandth of the
total system memory available. IOW, each unit represents 0.1% of the
total memory. The allowable range for this new parameter is 0-100
where 0 means no soft limit and 100 means 10% of total system memory.

The actual dentry reclaim to enforce the limit will be done in a
subsequent patch.
------------>8--------------->8----------------->8-------------->8-------------

</snip>

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments