Re: MaxRequestsPerChild for worker mpm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- "alin vasile" <alinachegalati@xxxxxxxxx> wrote:

> > Maybe they die due to MaxSpareThreads though.  Try setting it equal
> > to MaxClients.
> 
> 
> Thanks Eric, I put MaxSpareThreads  to be 15% of MaxClients and
> changed the 
> restarting behaviour. Is there a formula or some guidelines for this
> directive?

For MaxClients, yes:
http://wiki.apache.org/httpd/PerformanceScalingUp#Sizing_MaxClients

For everything else: Yesno.

It's easier to make these statements for a preforking deamon, so I'll
start from there:

Generally you should see to spawning all your children at server startup
and have as little as possible fluctuation, i.e.: insensible killing off
and spawning of children, just because of your fancy values.

MaxClients is the most important tool you have in your box, with this
you can define the size of the server. The others help you triangulate
the responsiveness. MaxRequestsPerChild, in the end, determines how much
a child will be allowed to be blown in memory, when it leaks, and again,
adds a new parameter in the killing off and spawning new children equation.

Coming back to reality, lets take a look at the default values for
worker mpm, as per:
https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/extra/httpd-mpm.conf.in

<IfModule mpm_worker_module>
    StartServers             2
    MaxClients             150
    MinSpareThreads         25
    MaxSpareThreads         75 
    ThreadsPerChild         25
    MaxConnectionsPerChild   0
</IfModule>

That means: We spawn 2 children, each with 25 threads, readily available.
When necessary, the children will spawn up to 75 threads, each.

75 MaxSpareThreads * 2 StartServers == 150 MaxClients

If one child dies, worker MPM will spawn new one. If one child reaches
MaxConnectionsPerChild, worker MPM will spawn a new one.
Worker MPM will *never* spawn more than StartServers children.


I hope that helps lift some fog.

so long,
i

-- 
Igor GaliÄ

Tel: +43 (0) 664 886 22 883
Mail: i.galic@xxxxxxxxxxxxxx
URL: http://brainsware.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux