modperl_shared_memory

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



Subject: shared mem [was: mod_perl advocacy project resurrection]
From: Paul <ydbxmhc@yahoo.com>
Date: Wed, 6 Dec 2000 12:42:29 -0800 (PST)

Jim Woodgate <woody@realtime.net> wrote:
[...]
> 2) Sharing information between the processes.  There's lots of
> different ways to do it, but none really jumps out as an end-all
> solution.

Is there no Apache::SharedMemory (or some such)?
If not, does anyone think it would be worth the time for someone (like
me) to sit down and write it?  (Couldn't it be done?)

The parent process could declare a shared memory segment at boot time.
Each child's init could spawn a shared memory interface object.
Wouldn't that allow for some resource pooling to be cleaner?
How would that interact with per-child namespaces (if at all)?

Is there a reasonably safe and useful way for one process to open a
resource (like a DBM or database handle) and then expose it to another
process through a shared memory segment?

===

Subject: Re: shared mem [was: mod_perl advocacy project resurrection]
From: "G.W. Haywood" <ged@www.jubileegroup.co.uk>
Date: Wed, 6 Dec 2000 21:48:25 +0000 (GMT)


Hi Paul,

On Wed, 6 Dec 2000, Paul wrote:

> Is there no Apache::SharedMemory (or some such)?  If not, does
> anyone think it would be worth the time for someone (like me) to sit
> down and write it?  (Couldn't it be done?)

There be dragons.

===

Subject: Re: shared mem [was: mod_perl advocacy project resurrection]
From: John Siracusa <siracusa@mindspring.com>
Date: Wed, 06 Dec 2000 17:11:30 -0500

On 12/6/00 3:42 PM, Paul wrote:
> The parent process could declare a shared memory segment at boot time.
> Each child's init could spawn a shared memory interface object.
> Wouldn't that allow for some resource pooling to be cleaner?
> How would that interact with per-child namespaces (if at all)?

IPC::SharedCache and friends make this pretty simple.

===

Subject: Re: shared mem [was: mod_perl advocacy project resurrection]
From: Paul <ydbxmhc@yahoo.com>
Date: Wed, 6 Dec 2000 15:42:31 -0800 (PST)

G.W. Haywood" <ged@www.jubileegroup.co.uk> wrote:
> Hi Paul,
> 
> On Wed, 6 Dec 2000, Paul wrote:
> 
> > Is there no Apache::SharedMemory (or some such)?  If not, does
> > anyone think it would be worth the time for someone (like me) to
> > sit down and write it?  (Couldn't it be done?)
> 
> There be dragons.

LOL!!! >:O]

I was pointed to IPC::Sharable, IPC::Sharelite.
I'll look at those.

===

Subject: Re: shared mem [was: mod_perl advocacy project resurrection]
From: Perrin Harkins <perrin@primenet.com>
Date: Wed, 6 Dec 2000 16:24:24 -0800 (PST)

On Wed, 6 Dec 2000, Paul wrote:
> I was pointed to IPC::Sharable, IPC::Sharelite.
> I'll look at those.

Take a look at IPC::MM for a shared memory hash implemented in C.  Also,
File::Cache is sometimes faster than the IPC modules.  I don't think any
of these solve problems like sharing sockets and file handles though.

===

Subject: Re: shared mem [was: mod_perl advocacy project resurrection]
From: "Jeremy Howard" <jh_lists@fastmail.fm>
Date: Thu, 7 Dec 2000 15:56:24 +1100

Perrin Harkins wrote:
> On Wed, 6 Dec 2000, Paul wrote:
> > I was pointed to IPC::Sharable, IPC::Sharelite.
> > I'll look at those.
>
> Take a look at IPC::MM for a shared memory hash implemented in C.  Also,
> File::Cache is sometimes faster than the IPC modules.  I don't think any
> of these solve problems like sharing sockets and file handles though.
>
Is there _any_ solution to sharing sockets? My WebMail server keeps a pool
of IMAP connections open (one per user) but it currently needs to create a
connection for every user for every process that they use. This is awfully
inefficient. I'm planning on creating a little Unix Socket daemon that keeps
a single pool of connections, and make all IMAP connections go through the
daemon. This seems like it should be unnecessary though--isn't there some
way of sharing sockets amongst processes?

PS: I second your suggestion to look at File::Cache--I use it for my session
store and find it excellent. Speed depends on your OS's bufferring, however.


===

Subject: Re: shared mem [was: mod_perl advocacy project resurrection]
From: Tim Bunce <Tim.Bunce@ig.co.uk>
Date: Thu, 7 Dec 2000 14:12:35 +0000

On Wed, Dec 06, 2000 at 04:24:24PM -0800, Perrin Harkins wrote:
> On Wed, 6 Dec 2000, Paul wrote:
> > I was pointed to IPC::Sharable, IPC::Sharelite.
> > I'll look at those.
> 
> Take a look at IPC::MM for a shared memory hash implemented in C.  Also,
> File::Cache is sometimes faster than the IPC modules.  I don't think any
> of these solve problems like sharing sockets and file handles though.

Why doesn't the BerkeleyDB module get mentioned whenever this topic comes up?

I think it should.

===

Subject: Re: shared mem [was: mod_perl advocacy project resurrection]
From: Perrin Harkins <perrin@primenet.com>
Date: Thu, 7 Dec 2000 15:00:46 -0800 (PST)


On Thu, 7 Dec 2000, Tim Bunce wrote:
> On Wed, Dec 06, 2000 at 04:24:24PM -0800, Perrin Harkins wrote:
> > On Wed, 6 Dec 2000, Paul wrote:
> > > I was pointed to IPC::Sharable, IPC::Sharelite.
> > > I'll look at those.
> > 
> > Take a look at IPC::MM for a shared memory hash implemented in C.  Also,
> > File::Cache is sometimes faster than the IPC modules.  I don't think any
> > of these solve problems like sharing sockets and file handles though.
> 
> Why doesn't the BerkeleyDB module get mentioned whenever this topic comes up?
> 
> I think it should.

Yes, it should.  I stopped bringing it up because of the problems I
mentioned last time: weak documentation, tricky to install on Red Hat, and
some corruption issues under heavy load.  However, after switching to
database-level locking it's been rock solid for us, so that seems to fix
the most serious problem.

===




the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu