You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Kjetil Kjernsmo <kj...@opera.com> on 2006/11/15 13:48:32 UTC
Setting MaxClients based on SizeLimit
Dahut!
So, I figured that MaxClients doesn't need to be taken out of thin air,
as it can be computed in a PerlSection once you've set a couple of
Apache2::SizeLimit constants. Which isn't taken out of quite as thin
air themselves. That's beautiful.
But I didn't quite understand from the docs how MaxClients would be set.
First, I tried using
Apache2->httpd_conf("MaxClients $maxclients");
but that didn't work.
Now, based on the formula on page 352 in argh and echo's book, I have
$MaxClients=int(($mem-
$Apache2::SizeLimit::MIN_SHARE_SIZE)/($Apache2::SizeLimit::MAX_PROCESS_SIZE-$Apache2::SizeLimit::MIN_SHARE_SIZE));
where $mem is the actual memory of the box, figured out by
checking /proc/meminfo... It sort of looks like the directives can be
set by just putting a $ in front, but does that work for everything?
Cheers,
Kjetil
--
Kjetil Kjernsmo
Information Systems Developer
Opera Software ASA