- application creates a large number (~15,000/hour) of uniquely named files which are deleted after a certain time
- Only about ~5000 files exist at any given time
- The memory usage reported by free becomes very high
- Investigation shows that the kernel memory slab cache of dentry structures (called
dentry_cachein RHEL4 or RHEL5, called
dentryin RHEL6 or RHEL7) is the cause of high usage
- What will happen when the dentry_cache exhausts the available (cached/free) memory?
- Why are dentry objects not freed after deletion of the file? The process owner? Could there be a hidden recycle bin somewhere due to the java delete method?
- Can you explain the vfs_cache_pressure in more detail?
- What other means can we do to reduce the dentry_cache size?
- Can vm.drop_caches=2 be used? Is there a different/preferred method? How safe is it? Can we run this a cron job?
- Red Hat Enterprise Linux 4
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.