3 ms·
> That page that got pushed to swap might be better used for serving disk cache, for example. > If you don't have enough RAM (even for spikes), a preemptive pu
by mason55 7y ago
> That page that got pushed to swap might be better used for serving disk cache, for example.
> If you don't have enough RAM (even for spikes), a preemptive push when things aren't busy might mean that when the do become busy, you won't have to wait.
> At least, that's the theory as I understand it. Whether or not it works in practice, IDK.
These are the ideas that I hoped the original post was going to be about.
Disk cache is a good one. I'm not knowledgeable enough about this, will the Linux kernel automatically start using RAM as disk cache if there's enough free space? Is it smart enough to prioritize disk cache over infrequently used pages and then know to discard the disk cache if it does need to page stuff back in from swap?
- FBT 7y agoThe original post does talk about it, but it skips the basics, presumably on the assumption that they're already known. > will the Linux kernel automatically start using RAM as disk cache if there's enough free space? Yes, exactly. > Is it smart enough to prioritize disk cache over infrequently used pages and then know to discard the disk cache if it does need to page stuff back in from swap? It is, and this is what's controlled by the vm.vfs_cache_pressure sysctl that the post discusses how best to configure.