You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Neeme Vool <ne...@eenet.ee> on 2001/01/30 17:15:57 UTC
LARGE http daemons
Hi, I have Solaris 2.6, 1 GB memory, apache 1.3.14, mod_perl 1.24, embperl
1.3b7.
We have an Embperl+Mysql application with approx 600 simultaneous users.
I'm suspicious that Embperl causes Apache to grow to the limit it can -
httpds keep free physical memory limit constantly on level 30-40 MB. When
tehere are peaks, and we have 70-80 httpds, they are about 20 MB large.
When need for service drops, they grow to 50 MB.
pmap shows:
pmap 8331
8331: /usr/local/apache/bin/httpd
0802B000 116K read/write/exec [ stack ]
08050000 1904K read/exec /usr/local/apache/bin/httpd
0823B000 84K read/write/exec /usr/local/apache/bin/httpd
08250000 46332K read/write/exec [ heap ]
DF410000 4K read/write/exec [ anon ]
I dont blame Embperl, but do I have opportunity to tell, (if the cause is
Embperl of course) how much memory it consumes?
Neeme Vool
Tel: +372 7 302 113
Fax: +372 7 302 111
E-mail: Neeme.Vool@eenet.ee
Re: LARGE http daemons
Posted by "G.Richter" <ri...@ecos.de>.
> >
> Unfortunately I cannot afford a big luxury to do this. We have approx 135
> virtual webservers here and I'm not the developer of these despite I can
> program in perl and embperl. I simply cannot check for 100 users everyday
> work. We have some especially large projects here, which are intensively
> used and changed. I thought that in some point I should have tools or
> knobs as a server admnistrator to keep one user in certain limits and not
> stomping on resources needed for others.
>
Ok, this is another situation that I initial assumed. In this case you
should limit the life time of Apache childs with MaxRequestsPerChild. That
makes sure a child cannot endless allocate resources, also it leaks.
Additionaly you may use Apache::Resource and Apache::GTopLimit and
Apache::RLimit to control the resource usage of Apache.
As already pointed out
http://perl.apache.org/guide/performance.html#Limiting_the_Size_of_the_Proce
ss contains a description of that. The page also contains other usefull
hints, for limiting resource usage
Gerald
Re: LARGE http daemons
Posted by Neeme Vool <ne...@eenet.ee>.
>
> On the other side you should make sure that your code doesn't leak. Normaly,
> if you request the same page over and over, the httpd shouldn't grow after
> the second request. To test this you may start a httpd with -X option, so
> you have only one child to watch and request the page to test via
> ApacheBench (ab), the httpd should have a constant size, if not something
> inside your app is leaking.
>
Unfortunately I cannot afford a big luxury to do this. We have approx 135
virtual webservers here and I'm not the developer of these despite I can
program in perl and embperl. I simply cannot check for 100 users everyday
work. We have some especially large projects here, which are intensively
used and changed. I thought that in some point I should have tools or
knobs as a server admnistrator to keep one user in certain limits and not
stomping on resources needed for others.
Neeme Vool
Re: LARGE http daemons
Posted by Gerald Richter <ri...@ecos.de>.
>
> Hi, I have Solaris 2.6, 1 GB memory, apache 1.3.14, mod_perl 1.24, embperl
> 1.3b7.
> We have an Embperl+Mysql application with approx 600 simultaneous users.
> I'm suspicious that Embperl causes Apache to grow to the limit it can -
> httpds keep free physical memory limit constantly on level 30-40 MB. When
> tehere are peaks, and we have 70-80 httpds, they are about 20 MB large.
> When need for service drops, they grow to 50 MB.
Perl (mod_perl) really needs a lot of memory and Embperl caches any compiled
Perl code for performance resons. So it's not unusual that you are getting
big httpd's. How big it gets depends on the number of Perl/Embperl pages you
have. You may try to loaded your Embperl pages on server startup via
Execute, so they are shared between httpd childs. It depends on our
application if this gives a better memory usage or not.
As Gunnar already pointed out the mod_perl guide
(http://perl.apache.org/guide/performance.html) has a lot of tunning tips.
On the other side you should make sure that your code doesn't leak. Normaly,
if you request the same page over and over, the httpd shouldn't grow after
the second request. To test this you may start a httpd with -X option, so
you have only one child to watch and request the page to test via
ApacheBench (ab), the httpd should have a constant size, if not something
inside your app is leaking.
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------