Thanks Joshua for the quick reply. Guess this means using mod_mem_cache will not give me the best cache hit/miss ratio as compared to mod_disk_cache ?

Is the way I have configured apache wrong ? Is it possible to run only 1 instance of httpd on a box to maximize the cache hit/miss ratio ? Would this approach cause other problems ? Is there any other MPM I should look at ?

I will look into mod_disk_cache as well..but can you please help  me with the above questions...Thanks in advance...

 
 
-----Original Message-----
From: [EMAIL PROTECTED]
To: users@httpd.apache.org
Sent: Fri, 1 Sep 2006 6:55 PM
Subject: Re: [EMAIL PROTECTED] mod_mem_cache question...

On 9/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] 
  " from the digest: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 
 

Check Out the new free AIM(R) Mail -- 2 GB of storage and industry-leading spam and email virus protection.

Reply via email to