Hi everyone, I'm wondering about caching of file reads. My site is on shared hosting. I may put it on a VPS to get the advantage of xcache, but that is for PHP opcodes.
Suppose you have in a script:
include( 'filename.ext' );
Does this require disk I/O on every request? Or does Linux cache the file read?
This page: http://stackoverflow.com/questions/7118543/does-the-linux-filesystem-cache-files-efficiently
indicates that the OS caches the data from the read so that the next time the PHP interpreter tries to retrieve the file, it may look like disk I/O from the PHP point of view, but the data comes from a memory cache.
But that's assuming a more or less standard physical machine, maybe dedicated to the web server role. I'm wondering whether this also happens on Dreamhost shared hosting, and whether it is true on a VPS.
I looked in this forum and in the wiki and found nothing really on point (the nearest I found was https://discussion.dreamhost.com/thread-137778.html , but it is only incidentally relevant).