You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Mike Hodson <mi...@mystica.cx> on 2000/08/18 18:42:31 UTC

Large Memory Sizes

Ok. I finally got mod_perl doing what I want it to do.
Except for one problem.  after anywhere from 10 minutes, to half an hour, on a
server with 768megs of ram, it starts eating swap.  

How can I keep the processes small and not growing to ungodly sizes (13 megs
per process, unsure of how much of that is shared)?
I've looked at different documentation, but the methods they give only slow
the use of swap, and the processes keep growing, yet slower..

Thanks in advance
Mike


Re: Large Memory Sizes

Posted by Perrin Harkins <pe...@primenet.com>.
> Ok. I finally got mod_perl doing what I want it to do.
> Except for one problem.  after anywhere from 10 minutes, to half an hour,
on a
> server with 768megs of ram, it starts eating swap.
>
> How can I keep the processes small and not growing to ungodly sizes (13
megs
> per process, unsure of how much of that is shared)?
> I've looked at different documentation, but the methods they give only
slow
> the use of swap, and the processes keep growing, yet slower..

Your processes will grow over time.  You can prevent this from being a
problem by fixing the things in your code that cause them to grow quickly,
and by using something like Apache::SizeLimit to kill processes that get too
big, replacing them with fresh, smaller processes.  Both of these are
documented in the mod_perl guide.

Using up 768 MB in 10 minutes is pretty extreme, and probably means you
either have something you can fix in your code or are allowing Apache to
start too many processes.

- Perrin


Re: Large Memory Sizes

Posted by David Hodgkinson <da...@hodgkinson.org>.
"Mike Hodson" <mi...@mystica.cx> writes:

> I've looked at different documentation, but the methods they give only slow
> the use of swap, and the processes keep growing, yet slower..

And that documentation included:

http://perl.apache.org/guide ?

Re: IPC::Shareable (was Re: Perl module - LWP)

Posted by Greg Cope <gr...@rubberplant.freeserve.co.uk>.
"Alexander Farber (EED)" wrote:
> 
> "David M. Davisson" wrote:
> > Yes, it works fine.  No mods.
> 
> > From: "David Jourard" <cg...@bytesinteractive.com>
> > > Has anyone worked with the LWP module under mod_perl and have they found
> > > that it works with no modification.
> 
> I would like to ask the same question about IPC::Shareable.
> 
> Is anybody successfully using it under Solaris or OpenBSD?
> "make test" hangs for me on these platforms and the module
> author is unreachable :-(
> 
> http://vorpal.mcs.drexel.edu/bsd-ports/helix/shared-memory.html
> doesn't seem to help on OpenBSD (increasing SHMMAXPGS up to 4096)
> 
> If not IPC::Shareable, what module do you use for fast
> communication between Apache-children?

IPC::ShareLite is writen in C (and hence faster (arguably)), but it does
not serial data structures, so either Freeze / Thaw or DataDumper are
you friends here.

I've seen IPC::Sharable working ok on Solaris 2.6 but cannot offer any
guideance as to why it may not work.

Greg

Re: IPC::Shareable (was Re: Perl module - LWP)

Posted by Steven Cotton <st...@cotton.dk>.
On Sat, 21 Oct 2000, Alexander Farber (EED) wrote:

> Is anybody successfully using it under Solaris or OpenBSD?
> "make test" hangs for me on these platforms and the module
> author is unreachable :-(

What version of Perl are you using? I had some problems with make test,
one of the tests doesn't return and I got a few munged shared memory
segment errors, I was attempting to install under Solaris 7 and Perl
5.6.0.

> If not IPC::Shareable, what module do you use for fast
> communication between Apache-children?

I started with IPC::SharedCache since it did most of what I wanted, but
took Sam Tregars advice and went with IPC::ShareLite (and serialised all
data myself with Storables freeze & thaw methods) and it works a dream.
One thing I couldn't seem to do was delete() tied IPC::Shareable hash
elements without getting the aforementioned "munged shared memory segment"
errors, which I can do with IPC::ShareLite.

-- 
steven


IPC::Shareable (was Re: Perl module - LWP)

Posted by "Alexander Farber (EED)" <ee...@eed.ericsson.se>.
"David M. Davisson" wrote:
> Yes, it works fine.  No mods.

> From: "David Jourard" <cg...@bytesinteractive.com>
> > Has anyone worked with the LWP module under mod_perl and have they found
> > that it works with no modification.

I would like to ask the same question about IPC::Shareable.

Is anybody successfully using it under Solaris or OpenBSD?
"make test" hangs for me on these platforms and the module
author is unreachable :-(

http://vorpal.mcs.drexel.edu/bsd-ports/helix/shared-memory.html
doesn't seem to help on OpenBSD (increasing SHMMAXPGS up to 4096)

If not IPC::Shareable, what module do you use for fast
communication between Apache-children?

Re: Perl module - LWP

Posted by "David M. Davisson" <da...@ncal.verio.com>.
Yes, it works fine.  No mods.
---
David M. Davisson
davisson@ncal.verio.com


----- Original Message ----- 
From: "David Jourard" <cg...@bytesinteractive.com>
To: <mo...@apache.org>
Sent: Friday, October 20, 2000 12:33 PM
Subject: Perl module - LWP


> Hi,
> 
> Has anyone worked with the LWP module under mod_perl and have they found 
> that it works with no modification.
> 
> Thanks
> David


Perl module - LWP

Posted by David Jourard <cg...@bytesinteractive.com>.
Hi,

Has anyone worked with the LWP module under mod_perl and have they found 
that it works with no modification.

Thanks
David