Shared cache with IPC::Shareable

2001-09-19 Thread Mark Maunder

Hi all,

I'm sharing memory between httpd processes using IPC::Shareable. It is working
but seems to behave inconsistently (memory is often not being freed etc..). I'm
using it for creating common cached areas for file and database contents shared
between httpd children. Is there a better way to do this i.e. Am I stuck with
IPC::Shareable? I'm running mod_perl and the whole application is running as a
single content handler.

It also isn't as fast as I thought it would be  - sure it takes a long time to
do the initial load of all caches on the first request, but I just thought it
would be a little faster than it is. Are there any performance issues I should
be aware of with IPC::Shareable or shared mem in general?

Thanks!

~mark






Re: Shared cache with IPC::Shareable

2001-09-19 Thread Olivier Poitrey

You should try Apache::Cache, it's under developpement but seem to be
stable.

For a real documentation look at the CVS version, the actual release is
poorelly
documented.

http://www.rhapsodyk.net/cgi-bin/cvsweb/Apache-Cache/

--
___
 O  l  i  v  i  e  rP  o  i  t  r  e  y

USA disaster support http://www.osdn.com/911.shtml
- Original Message -
From: Mark Maunder [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 19, 2001 5:21 PM
Subject: Shared cache with IPC::Shareable


 Hi all,

 I'm sharing memory between httpd processes using IPC::Shareable. It is
working
 but seems to behave inconsistently (memory is often not being freed
etc..). I'm
 using it for creating common cached areas for file and database contents
shared
 between httpd children. Is there a better way to do this i.e. Am I stuck
with
 IPC::Shareable? I'm running mod_perl and the whole application is running
as a
 single content handler.

 It also isn't as fast as I thought it would be  - sure it takes a long
time to
 do the initial load of all caches on the first request, but I just thought
it
 would be a little faster than it is. Are there any performance issues I
should
 be aware of with IPC::Shareable or shared mem in general?

 Thanks!

 ~mark








Re: Shared cache with IPC::Shareable

2001-09-19 Thread Perrin Harkins

 I'm sharing memory between httpd processes using IPC::Shareable. It is
working
 but seems to behave inconsistently (memory is often not being freed
etc..). I'm
 using it for creating common cached areas for file and database contents
shared
 between httpd children. Is there a better way to do this i.e. Am I stuck
with
 IPC::Shareable? I'm running mod_perl and the whole application is running
as a
 single content handler.

 It also isn't as fast as I thought it would be  - sure it takes a long
time to
 do the initial load of all caches on the first request, but I just thought
it
 would be a little faster than it is. Are there any performance issues I
should
 be aware of with IPC::Shareable or shared mem in general?

Yes, shared memory can be pretty slow.  You should look at Cache::Cache
(specifically the file cache) or MLDBM::Sync.
- Perrin