You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Sean Kelly <S....@newcastle.ac.uk> on 2000/07/27 21:35:17 UTC

Seeking advice on excessive memory usage

Hello there,

	I'm currently developing a few web based applications using
Apache, mod_perl, Perl 5 and the Postgres relational database.  This
applications are running on an Intel Linux 2.0.38 machine, with 32Mb
memory.

	Now I know I'm dealing with limited resources here, but for the
moment this is what I am playing with :(

	Looking at the output from 'top' I see that each of my 3 mod_perl
enabled http servers are reporting between 25 and 30% memory usage.  To
cut down on this, I turned to the performance tuning guide and the user
guide from perl.apache.org.  As suggested, I tried preloading some modules
in a 'startup.pl' file called from httpd.conf on server startup.

	However, this has had little effect it would seem, with the
processes still using the same amount of memory.

	Is there any advice that people could give to me as to where to
look now?  Has anyone else had what appears to be excessive memory usage
and managed to tune the server?

	A colleague is suggesting that PHP would be leaner on the server,
but I am relunctant to move away from my Perl code and hence am trying to
track possible issues down.

	Thanks for your time,

--
Sean Kelly <S....@ncl.ac.uk>
"The best way to predict the future is to invent it" - Alan Kay


Re: Seeking advice on excessive memory usage

Posted by David Hodgkinson <da...@hodgkinson.org>.
Sean Kelly <S....@newcastle.ac.uk> writes:

> Hello there,
> 
> 	I'm currently developing a few web based applications using
> Apache, mod_perl, Perl 5 and the Postgres relational database.  This
> applications are running on an Intel Linux 2.0.38 machine, with 32Mb
> memory.

I have to say, 32M is cutting it _very_ fine, especially if you're
running a database as well. 

-- 
Dave Hodgkinson,                             http://www.hodgkinson.org
Editor-in-chief, The Highway Star           http://www.deep-purple.com
      Apache, mod_perl, MySQL, Sybase hired gun for, well, hire
  -----------------------------------------------------------------

Re: Seeking advice on excessive memory usage

Posted by Vivek Khera <kh...@kciLink.com>.
>>>>> "SK" == Sean Kelly <S....@newcastle.ac.uk> writes:

SK> 	However, this has had little effect it would seem, with the
SK> processes still using the same amount of memory.

How do you know this for sure?  The processes still report that they
use the same amount of virtual memory, but much of that is physically
shared.  The virtual memory usage remains the same.  You need to check
your system-wide physical resource usage to see if there were any
changes before and after your tuning efforts.

SK> 	Is there any advice that people could give to me as to where to
SK> look now?  Has anyone else had what appears to be excessive memory usage
SK> and managed to tune the server?

The tuning guide that comes with modperl and the tuning sections in
The Guide are your best resources.

Also, write leaner code ;-)

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@kciLink.com       Rockville, MD       +1-301-545-6996
GPG & MIME spoken here            http://www.khera.org/~vivek/