tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Kernel VS application file caching

On Thu, Jan 21, 2010 at 9:25 AM, Sad Clouds
<> wrote:
> As far as I know Unix kernels will transparently cache files into any
> available memory to speed up future I/O on those files.
> For applications like Internet servers, which serve many static files from
> disk, is there any point in implementing file caching at application level? It
> seems like you would end up with 2 copies of the same data - one copy cached
> by kernel, another copy cached by application.
> Another question is this: is it possible for userlevel applications to tell
> kernel not to cache certain files? For example application might want to keep
> frequently accesses .html .jpeg files in memory and not cache rarely accessed
> huge files, which would evict many other files when loaded into core.

Yes, you should use mod_cache with apache if you have free memory and
use memcached if you're using a database and have free memory in the
case of php, perl, python, etc.

Home | Main Index | Thread Index | Old Index