httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthieu Estrade <>
Subject Re: Mod_MEM_cache doesn't use Pools to allocate cache objects???
Date Tue, 08 Mar 2005 15:08:58 GMT
luca regini wrote:

> Taking a look at mod_mem_cache source code i have seen that it doesn't
> use pools to allocate cache objects but i does so by means of
> reference counting and simple calloc/free calls. I  have also seen
> that this module requires a Threaded apr to work.
If you use prefork, each child is a fork and has it's own memory space, 
so you are unable to share data between child -> bad idea
The way you can do is code a cache module using shared memory but in 
this case, shm and rmm are not using pools, and i think there will be 
performances issues.

It depend on what you want to do with your cache module. Actually, in a 
threaded mpm, each child and the threads inside are sharing common data. 
So you have duplicated cache data in each forked child. The performance 
depend on how you setup your server. low child number and high thread 
number = few request on backend and only few duplicated data.

Coding a cache module using shared memory is huge work.
Good luck if you choose to do it


View raw message