Closed birdie-github closed 4 years ago
@pavlinux There is no need to be disrespectful to @birdie-github . Please apologize and edit your comment.
Nocache works by intercepting library bindings for syscalls; if pv
(which I’ve never used) is using a syscall that’s not intercepted by nocache, then it will have no effect.
I’d refer you to the README file for an alternative approach to limiting buffer cache size, specifically https://github.com/Feh/nocache/blob/master/README#L141-L158; the phrase “fairly recent Linux kernel” was written about 6 years ago, so this should not be a concern any more.
If you can provide specific ideas which syscall (wrappers) to intercept in addition to the ones already intercepted, please reopen the issue! (You can get these traces e.g. via strace
.)
pv is a standard utility which is available in pretty much all Linux distros.
Its source code is published here: http://www.ivarch.com/programs/pv.shtml
There's this utility pv which allows to see a nice progress of files being read/written and it looks like nocache has no effect on it.
Steps to reproduce:
nocache pv /dev/sda > /dev/null
Buffers/cache still grow.