1

Is there any way to force the kernel to always maintain at least some page cache for writeback caching purposes, even when faced with memory pressure?

I have a rather special use case, where swapping to zswap is much more preferable than not having a large page cache. (I have set the relevant vm.dirty values to allow a lot of write caching)

So what I would like, is set a minimum page cache size (say 10-30% of total RAM), and if memory usage rises, instead of flushing dirty pages, the kernel should start swapping (I am using zswap, so that would just mean compressing pages, but still keeping most of them in RAM)

I have tried raising vm.swappiness to 100, and lowering vm.vfs_cache_pressure to 10, but this does not seem to have cut it.

Your Answer

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

Browse other questions tagged or ask your own question.