httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davi Arnaut <d...@haxent.com.br>
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:34:43 GMT
Davi Arnaut wrote:
> 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 ?

I should note that if there is enough memory those reads will be served
by the page cache. Later we could think about reading directly to
mmapable files, changing it's protection (from rw to ro) as soon as we
are done writing to.

--
Davi Arnaut

Mime
View raw message