Translated message

A translation of this page exists in English.

dentry_cache / dentry slab 缓存大小在 Red Hat Enterprise Linux 上持续增长

Solution In Progress - Updated -

Issue

  • 应用程序创建大量(约15,000 个/小时)唯一命名的文件,这些文件在一定时间后会被删除
  • 任何给定时间仅有大约 ~5000 个文件存在
  • free 报告的内存使用率变得非常高
  • 调查显示 dentry 结构的内核内存 slab 缓存(在 RHEL4 或 RHEL5 中称为 dentry_cache ,在 RHEL6 或 RHEL7 中称为 dentry)是高使用率的原因
  • 当 dentry_cache 耗尽可用(缓存的/空闲)内存时,会发生什么情况?
  • 在删除文件后,为什么 dentry 对象没有被释放?进程所有者?由于 java delete 方法,某处可能有一个隐藏的回收站?
  • 您可以更详细地解释 vfs_cache_pressure 吗?
  • 我们可以通过什么方法来减小 dentry_cache 大小?
  • 可以使用 vm.drop_caches=2 吗?  有不同的/首选方法吗?安全吗?我们可以运行此 cron 作业吗?

Environment

  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content