You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jay Hannah <jh...@omnihotels.com> on 2004/03/19 17:51:14 UTC

[mp2] httpd, perl process memory usage expectations; Gobs of OO Perl

Hola --

We're playing with a large OO Perl 5 project under mod_perl.

Apache/2.0.48 (Unix) mod_perl/1.99_13 Perl/v5.8.3 mod_ssl/2.0.48 OpenSSL/0.9.7d
Linux 2.4.21-192-default #1 i686 i686 i386 GNU/Linux
(SuSe) 

The project is a beast: some 150 OO classes are used to perform operations. The memory footprint under command-line perl runs up to 30MB per process. We're trying to launch all that goo up front with a startup:

   PerlRequire /usr/local/apache2/conf/startup.pl

And it seems to "work" -- the httpd threads immediately jump to 30MB or so on Apache launch w/ no client activity.

If we're using mod_perl (and startup.pl) correctly what ballpark memory footprint should we expect to see when we run, say, 10 simultaneous clients against the server?

Should we expect a RAM footprint something like
   10 30MB httpd's
   10 30MB perl's
   (600MB total)

? Or should we expect something more like
   10 30MB httpd's
   10 4MB perl's
   (340MB total)

? Or should there be no perl processes running at all because perl is embedded in httpd?

Just looking for super-rough ballparks of where we should be setting our expectations. Right now we're seeing the first behavior, which makes me think we're doing something wrong...?
   
Thanks,

Jay Hannah
Director of Development
Omni Hotels Reservation Center
Tel: (402) 952-6573


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] httpd, perl process memory usage expectations; Gobs of OO Perl

Posted by Perrin Harkins <pe...@elem.com>.
On Fri, 2004-03-19 at 11:51, Jay Hannah wrote:
> If we're using mod_perl (and startup.pl) correctly what ballpark
> memory footprint should we expect to see when we run, say, 10
> simultaneous clients against the server?
> 
> Should we expect a RAM footprint something like
>    10 30MB httpd's
>    10 30MB perl's
>    (600MB total)
> 
> ? Or should we expect something more like
>    10 30MB httpd's
>    10 4MB perl's
>    (340MB total)
> 
> ? Or should there be no perl processes running at all because perl is
> embedded in httpd?

There will be no separate perl processes running.  The httpds will not
really be taking up 30MB of RAM, because of copy-on-write.  Read this
for more details:
http://perl.apache.org/docs/1.0/guide/performance.html#Sharing_Memory

- Perrin


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] httpd, perl process memory usage expectations; Gobs of OO Perl

Posted by Stas Bekman <st...@stason.org>.
Ged Haywood wrote:
[...]
> There's a lot of useful information about performance tuning in the
> mod_perl Guide, including suggestions for things like proxy setups
> where a few mod_perl servers do the heavy Perl processing and a lot
> of small non-mod_perl servers do most of the communicating with clients.

And the chapter that you want to read (to get the details on what Ged is 
describing) is:
http://perl.apache.org/docs/1.0/guide/strategy.html

if you have the "practical mod_perl" book, you want to spend the time reading 
through "mod_perl Performance" section of the book. in particular chapter 12. 
Server Setup Strategies.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] httpd, perl process memory usage expectations; Gobs of OO Perl

Posted by Ged Haywood <ge...@jubileegroup.co.uk>.
Hi there,

On Fri, 19 Mar 2004, Jay Hannah wrote:

> We're playing with a large OO Perl 5 project under mod_perl.

:(

> Apache/2.0.48 (Unix) mod_perl/1.99_13 Perl/v5.8.3 mod_ssl/2.0.48 OpenSSL/0.9.7d
> Linux 2.4.21-192-default #1 i686 i686 i386 GNU/Linux
> (SuSe)

That's an old kernel, I'd think it worth upgrading.

> should there be no perl processes running at all because perl is embedded in httpd?

Yes and no.  If you are launching Perl scripts via CGI for example,
you'll still be running Perl interpreters separately.  Don't do it. :)

> Just looking for super-rough ballparks of where we should be setting
> our expectations. Right now we're seeing the first behavior, which
> makes me think we're doing something wrong...?

You might just be misreading what the tools tell you.  Are you using
'top' to see the processes?  Older versions will tell you that each
thread is consuming memory, which isn't true.  Newer versions will
know the difference between processes and threads.  How much RAM do
you have anyway?

There's a lot of useful information about performance tuning in the
mod_perl Guide, including suggestions for things like proxy setups
where a few mod_perl servers do the heavy Perl processing and a lot
of small non-mod_perl servers do most of the communicating with clients.

Broadly speaking you will have one mod_perl process per simultaneous
client connection if you have only a mod_perl Apache running and yes,
that can get a bit heavy on memory if you have a lot of simultaneous
mod_perl clients.

73,
Ged.


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html