To read all comments associated with this story, please click here.
There's a difference between having a library in disk cache, and having it actually loaded and mapped in to the system. In theory, once the library is loaded and mapped, at that point it can only take VM space (not necessarily physical memory space). Which basically comes down to if the library is swapped out, is that better, worse, or the same as having the library not loaded at all. That I don't know, and I don't know if any of this has actual impact on the user experience.
Prefetch doesn't "waste disk cache". Disk cache starts empty and provides no boost until it gets content and begins to eliminate the need to physically read disk blocks. As you read-in blocks, it attempts to get rid of useless disk cache blocks based on a algorithm like "get rid of least recently used." The only way prefetch could hurt would be if the algorithm mistakenly thought there was a higher likelyhood the prefetched blocks would be used than some other recently read blocks. That is unlikely.
I guess a highly aggressive prefetch might cause problems. It's one thing to fill disk cache with potentially useful blocks just after booting--that's pretty harmless-- and another thing to start reading-in files for one application while another application is running because you expect the user to do it next. I think it all depends on how aggressive the prefetch is.







Member since:
2006-05-19
I always thought that disk cache was meant to speed up operating system and applications performance? Why use "prefetch" and waste disk cache now?
What the point of copying libraries TWICE (first time prefetch and second actual launch)- you do run application from hard drive, not from memory I presume.