On Tue, 9 Jan 2001, Rob Bloodgood wrote:
> > > I like the idea of Apache::SizeLimit, to no longer worry about
> > > setting MaxRequestsPerChild. That just seems smart, and might
> > > get maximum usage out of each Apache child.
> > >
> > > What I would like to see though is instead of killing the
> > > child based on VmRSS on Linux, which seems to be the apparent
> > > size of the process in virtual memory RAM, I would like to
> > > kill it based on the amount of unshared RAM, which is ultimately
> > > what we care about.
> >
> > It exists for a long time: Apache::GTopLimit. Of course if you have GTop.
> > And it's in the guide including all the calculations of the real memory
> > used (used by Apache::VMonitor)
>
> So, forgive me for not "getting it," but is there a way to do this without
> endless retries and experimentation? It seems to me that blocking on a
> per-child size usage is silly (even tho I'm shure it's what is available at
> the programming level).
>
> I mean,
> I have a machine w/ 512MB of ram.
> unload the webserver, see that I have, say, 450MB free.
> So I would like to tell apache that it is allowed to use at most 425MB.
>
> It's not out there as far as I can find.
>
> So far all I've been able to find is:
> Run your service for awhile.
> Do some math and guesswork about size/totals/available.
> Run it again.
> Recheck your math.
> Use (per-process limiting module).
> Pray that your processes never grow because of rarely used
> functionality/peak usage/larger than usual queries ...
>
> because then all of your hard work before goes RIGHT out the window, and I'm
> talking about a 10-15 MB difference between JUST FINE and DEATH SPIRAL,
> because we've now just crossed that horrible, horrible threshold of (say it
> quietly now) swapping! <shudder>
>
> Have I jumped to the wrong conclusion? Is there a module (or usage) I've
> missed? Somehow I doubt I'm the only one who sees the problem in these
> terms... has anybody seen the SOLUTION in these terms??
it's all explained here:
http://perl.apache.org/guide/performance.html#Choosing_MaxClients
Using GTopLimit you delimit the upper and lower memory boundaries, which
allows you to calculate the optimal MaxClients for a given memory size.
And it'll never go over this size (well may be for a few secs for a few
MBs if the process is still running, since the killing happens at the end
of the request).
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/