httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davi Arnaut <>
Subject Re: svn commit: r468373 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_cache.c modules/cache/mod_cache.h modules/cache/mod_disk_cache.c modules/cache/mod_disk_cache.h modules/cache/mod_mem_cache.c
Date Fri, 27 Oct 2006 19:14:27 GMT
Greg Marr wrote:
> At 01:41 PM 10/27/2006, Davi Arnaut wrote:
>> Niklas Edmundsson wrote:
>>> And when you have a file backend, you want to hit your disk cache 
>> and
>>> not the backend when delivering data to a client. People might 
>> think
>>> that this doesn't matter, but for large files, especially larger 
>> than
>>> RAM in your machine, you usually go disk-bound without much help 
>> from
>>> the OS disk cache.
>> But that's a corner case. There is no reason in doing this for small
>> files (common case). For example, in a enterprise grade server 
>> memory is
>> cheap and permanent storage is slow and expensive.
> So why would this server be using mod_disk_cache in that 
> case?  Shouldn't this server be using mod_mem_cache?  Selecting 
> mod_disk_cache over mod_mem_cache means it's better to serve the 
> cache from disk rather than from memory.  If serving from the disk on 
> the original request is too slow, then wouldn't serving from the disk 
> on the subsequent requests be too slow as well?

Because the data is already in memory. Why should I write something to
disk, erase it from memory, and read it again shortly ? Why should I
take care of something that is the job of the OS ? Why should I trash
the VM constantly ?

A proxy/cache common purpose is to cache web content, this means we have
a large number of small files (think html pages, images, etc) that we
must keep in a permanent storage, but if we have memory, let's use it!

Davi Arnaut

View raw message