Keep a file in memory an any cost

Joe Zeff joe at zeff.us
Wed May 11 19:33:52 UTC 2011


On 05/11/2011 12:19 PM, Bryn M. Reeves wrote:
> And have it all chucked onto the swap device when we're under memory pressure
> and reclaiming user pages that haven't been touched in a while? How does that help?

It's much less likely, especially if you're using that file often enough 
to worry about saving time on accessing the index.  And, although I'm no 
expert on the subject, I'd guess that data in a disk cache would be 
swapped out long before data that the program's written into its own 
data space.  And, of course, there's the advantage that you're not 
depending on system calls that may or may not be honored the way you want.


More information about the users mailing list