You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Kunal Shah <ku...@gmail.com> on 2008/04/22 20:02:08 UTC

[users@httpd] Using mod_mem_cache with MPM

Is mod_mem_cache modules "cache" is shared among the Multiple processes
started using MPM module?  Is there any special configuration needed?

My tests with mod_disk_cache works with MPM module, since all processes
points to the same "cache directory" and finds it.

If this can't be done using httpd (with MPM worker), does anybody know any
other open-source solution available doing memory caching? (other than
squid)

Thanks,
Kunal

Re: [users@httpd] Using mod_mem_cache with MPM

Posted by Kunal Shah <ku...@gmail.com>.
Thanks Joshua for your response.  I hope this is documented somewhere.

I was wondering if any other disk operation e.g. cleanup would interfere and
degrade the overall performance.

Thanks,
Kunal

On Tue, Apr 22, 2008 at 1:22 PM, Joshua Slive <jo...@slive.ca> wrote:

> On Tue, Apr 22, 2008 at 2:02 PM, Kunal Shah
> <ku...@gmail.com> wrote:
> > Is mod_mem_cache modules "cache" is shared among the Multiple processes
> > started using MPM module?  Is there any special configuration needed?
>
> The cache is shared between all works in the same process. That means
> it will be mostly-shared when using threaded mpms (worker/event) but
> not when using process-based mpms (prefork).
>
> >
> > My tests with mod_disk_cache works with MPM module, since all processes
> > points to the same "cache directory" and finds it.
>
> Yes, the disk cache is shared.
>
> As I've already mentioned this week, in many circumstances the disk
> cache will outperform the memory cache because it offloads the work of
> cache and memory management to the highly-optimized kernel filesystem
> code. A modern OS will keep frequently-accessed parts of the cache in
> the buffer cache, so you don't suffer a speed penalty from the disk
> access.
>
> 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
>
>

Re: [users@httpd] Using mod_mem_cache with MPM

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, Apr 22, 2008 at 2:02 PM, Kunal Shah
<ku...@gmail.com> wrote:
> Is mod_mem_cache modules "cache" is shared among the Multiple processes
> started using MPM module?  Is there any special configuration needed?

The cache is shared between all works in the same process. That means
it will be mostly-shared when using threaded mpms (worker/event) but
not when using process-based mpms (prefork).

>
> My tests with mod_disk_cache works with MPM module, since all processes
> points to the same "cache directory" and finds it.

Yes, the disk cache is shared.

As I've already mentioned this week, in many circumstances the disk
cache will outperform the memory cache because it offloads the work of
cache and memory management to the highly-optimized kernel filesystem
code. A modern OS will keep frequently-accessed parts of the cache in
the buffer cache, so you don't suffer a speed penalty from the disk
access.

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