On Sun, 11 May 2025 16:36:24 +0800, Yafang Shao wrote: > On our HDFS servers with 12 HDDs per server, a HDFS datanode[0] startup > involves scanning all files and caching their metadata (including dentries > and inodes) in memory. Each HDD contains approximately 2 million files, > resulting in a total of ~20 million cached dentries after initialization. > > To minimize dentry reclamation, we set vfs_cache_pressure to 1. Despite > this configuration, memory pressure conditions can still trigger > reclamation of up to 50% of cached dentries, reducing the cache from 20 > million to approximately 10 million entries. During the subsequent cache > rebuild period, any HDFS datanode restart operation incurs substantial > latency penalties until full cache recovery completes. > > [...] Applied to the vfs-6.16.misc branch of the vfs/vfs.git tree. Patches in the vfs-6.16.misc branch should appear in linux-next soon. Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it. It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated. Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch. tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs-6.16.misc [1/1] vfs: Add sysctl vfs_cache_pressure_denom for bulk file operations https://git.kernel.org/vfs/vfs/c/e7b9cea718ee