lkml.org 
[lkml]   [2021]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectPrevent inode/dentry trashing?
Date
Hello,

Similar to
<https://unix.stackexchange.com/questions/202586/limit-the-inode-cache-used-by-a-command>
I would like to prevent certain programs from trashing the inode/dentry
cache, which is a shared resource for all processes:

- For example the nightly <man:updatedb(8)> used <man:find(1) > to
recursively walk the complete file system. As long as `d_name` and the
`d_type` information from <man:readdir(3)> is enough this only pollutes
the dentry cache.

- Similar our backup software, but this also needs to <man:stat(2)> each
path to get the `mtime`, which additionally pollutes the inode cache.

Both examples only walk the tree once (per day). In my case the caches
do not fit into memory completely, so the second process does not even
benefit from the first process filling the cache as that data is already
replaced again.

The trashed caches affect all other processes running in parallel or the
first processes started each morning.

Is it possible to prevent inode/dentry trashing for example by limiting
the cache per process(-group)?
Something like MADV_DONTNEED from <man:madvise(2)> for IO would be nice.

An external knob to limit the cache usage per process(-group) would be
nice, but even a hint for an API for such kind of programs to prevent
trashing would help me.

Thank you in advance.
Philipp

\
 
 \ /
  Last update: 2021-06-07 14:47    [W:0.542 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site