httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] mod_mem_cache question...
Date Sat, 02 Sep 2006 01:55:04 GMT
On 9/1/06, apacheuser123@aim.com <apacheuser123@aim.com> wrote:
>
>
> Hi,
>
>  I have an Apache 2.2.2 setup on a Redhat box. Caching is implemented using
> mod_mem_cache.
>  Apache was built to use worker MPM. Here are the relevant sections from
> httpd.conf
>
>  #
>  # mod_cache/mod_mem_cache settings
>  #
>  <IfModule cache_module>
>  <IfModule mem_cache_module>
>     CacheEnable mem /
>     CacheStoreNoStore On
>     MCacheSize  4096
>     MCacheMaxObjectCount 200
>     MCacheMinObjectSize 1
>     MCacheMaxObjectSize 524288
>  </IfModule>
>  </IfModule>
>
>  #
>  # Worker MPM settings
>  #
>  <IfModule mpm_worker_module>
>  StartServers 1
>  MaxClients 250
>  ThreadsPerChild 50
>  MinSpareThreads 25
>  MaxSpareThreads 75
>  </IfModule>
>
>  When I startup Apache, I notice there are multiple httpd( 1 parent and 2
> child ) instances.
>  Question I had is,
>
>  1. Does this mean that at any time there are could be multiple memory
> caches equal to the number of running
>  httpd instances ? or is the cache somehow shared between child processes ?

Yes, there is a separate cache for each child process.

>
>  2. How are requests handled ? For instance, do all requests go the first
> child process, till it has no
>  more free threads at which point the the second child process is called
> into action ?

The allocation is essentially random depending on who is holding the
accept mutex.

You should really consider using mod_disk_cache instead.  It uses a
cache that is shared between all processes, and is often as fast or
faster than mod_mem_cache because the OS can optimize the memory
caching part.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message