0

Most of the answers to related questions here seem to assume the person asking thinks linux is "eating their ram" or come up with workarounds such as dropping caches every minute from cron.

This is not what I want to achieve, instead I want the linux file cache disabled for good and rely solely on the ZFS ARC for caching files in memory.

-1

nocache - minimize filesystem caching effects

https://github.com/Feh/nocache

Might not work with all applications.

6
  • Might not work with all applications. Quite an understatement. Don't use that unless you want to make any multithread process deadlock-prone. If you use that and your process does something as simple as try to fork() then exec() another process, if it tries to close file descriptors between the fork() and the exec() (like lots of things do....), the way that library uses mutexes is going make the child process deadlock-prone. And that's what I get from looking at the code for about three minutes... – Andrew Henle Feb 13 at 17:05
  • @AndrewHenle Patches are welcome :-) I do understand your resentment but no one has written a better utility yet :-) In fact it's the only one for Linux at the moment. – Artem S. Tashkinov Feb 13 at 17:16
  • Resentment? No, I just have higher standards. That code entirely breaks the async-signal-safety of every function it intercepts. Did you even realize that? – Andrew Henle Feb 13 at 20:45
  • So, no patches and downvotes for a single utility which allows to disable caching? What a nice website we have here. – Artem S. Tashkinov Feb 14 at 7:55
  • You posted a link-only answer to unreliable code, then labelled my pointing out some problems with that code as "resentment". And I'm guessing you didn't realize that code breaks the async-signal-safety of every function it intercepts. It isn't even large-file-aware for 32-bit applications, which likely opens the door to data corruption if it's used there - and you've had an open issue on that for almost five years. Deadlocks, broken standards, data corruption? And you complain about this site? Don't push crap code. – Andrew Henle Feb 14 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.