perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Brown <>
Subject Re: Perl Registry ... Memory consumption.
Date Mon, 03 Jul 2000 16:50:49 GMT

first off, David Hodgkinson's comments are correct... Stas's guide is very
thorough, and covers pretty much all of this.

On Mon, 3 Jul 2000, Nigel Hamilton wrote:

> Hi,
> 	I've been trying to setup mod_perl in an Apache/Red Hat 
> Linux/mySQL environment for the last couple of weeks.
> 	When running Apache::Registry on production, mod_perl chewed up
> all the available memory (at that stage only 64 Meg) and the system
> started to use swap memory. 
> 	So we doubled the memory to 128 Meg and over the next 10 minutes
> of using the site (having restarted the server) we watched as all the
> extra memory was used up and it went back into swap!
> 	So here are some questions:
> 1. What is a 'ball-park' figure for mod_perl memory requirements?

There is no such thing. It depends entirely on your application. A client
of ours runs a modperl based sniffer, and that familty of mod_perl httpds
can hardly be told appart from a normal family.... but he only has a few
scripts, and they "don't do much" (log some info and throw out a 47 byte
transparent gif).

on the otherhand, if you application deals with big strings, lots of
database queries (per page), etc... then it will be much more resource
> 2. What is the entry level spec for a mod_perl/Apache/Linux server?

depends on your application, but these days I wouldn't even bother staging
a machine with less than 192 meg of RAM.... it is cheap compared to the
cost of having to piss around with your box or buy faster drives.
> 3. Should I reduce the number of Apache child processes (currently 10) ...
> to reduce memory consumption?

you haven't said whether you're using mod_proxy and a front_end/back_end
config (see the guide). You haven't said how many simultaneous hits you

> 4. Will mod_perl always ramp up its memory consumption to whatever is
> available?

> 5. Should we throw money at the problem and just buy more memory?

As I see it, you have two choices: take the time to figure out what part
of your app is using up memory, or buy more memory... 
> 6. I have not been able to get Apache::DBI to work. Will Apache::DBI
> significantly reduce memory consumption (every script opens a DB handle
> for session checking)?

I strongly doubt it. If anything the connection caching is going to cost
you memory... Apache::DBI is intended to save CPU cycles.
> 	Any help, and war stories that you may have would be much
> appreciated ...
> Nige
> On Sun, 2 Jul 2000, Christopher Suarez wrote:
> > I'm running rh linux 6.2 on a laptop and have tried for sometime to get
> > apache::DBI runnning.
> > 
> > modperl wokrs fine with apache but when I add the line 
> > 
> > PerlModule Apache::DBI to srm.conf, httpd.conf or "use Apache::DBI" to
> > and then PerlRequire /path/ to httpd.conf it won't
> > work. apache will start ok(saying it's using mod_perl) but won't shut down
> > ok and error_log doesn't
> > say anythings wrong. 
> > the webserver won't response on contacting in a browser it'll
> > response connection refused. 
> > 
> > versions:
> > 
> > apache-1.3.12-2
> > apache-devel-1.3.12-2
> > perl-2.00503-10
> > perl-DBI-1.13-1
> > perl-DBD-msql-mysql-1.2210-1
> > perl-Apache-DBI-0.01-2
> > perl-Apache-DBILogin-1.5-2
> > perl-Apache-DBILogger-0.93-2
> > perl-Apache-RedirectDBI-0.01-2
> > mod_perl-1.21-10
> > strange???
> > 

----------------------------------------------------------------------   | Don't go around saying the world owes you a living;  | the world owes you nothing; it was here first.
web hosting since '95  | - Mark Twain

View raw message