You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Daniel Lopez <da...@rawbyte.com> on 2001/12/19 23:18:12 UTC

ServerLimit, MaxClients

I am trying to make sense of the following directives:

MaxClients, ServerLimit, ThreadLimit, ThreadsPerChild

As I understand:

MaxClients <= ServerLimit in prefork

ThreadsPerChild <= ThreadLimit

MaxClients <= Serverlimit * ThreadLimit in worker


Can be MaxClients and ThreadLimit eliminated?

ServerLimit will be the equivalent of Maxclients in prefork.
ThreadsPerChild will be the equivalent of ThreadLimit and MaxClients could
be calculated as ServerLimit * ThreadsPerChild in worker

I read Jeff Trawick thread but I still am confused why you need to have one
directive to limit the value of another one.

Best regards

Daniel


Re: ServerLimit, MaxClients

Posted by Jeff Trawick <tr...@attglobal.net>.
Daniel Lopez <da...@rawbyte.com> writes:

> Can be MaxClients and ThreadLimit eliminated?

Sure, but...

Here is how I would have them configured with prefork:

  MaxClients:       big enough to handle normal, expected load
  ServerLimit:      as large as is reasonable for the machine without
                    wasting a lot of shared memory

If my server load goes up and clients start to get big delays or even
get connection-refused from the kernel because the queues are growing
too long, then I'd want to bump up MaxClients and do a graceful
restart and keep everybody happy.

If you limit yourself to only one directive to control this then you
either have painful, connection-dropping restarts to deal with
unexpectedly high activity or you allow Apache to grow into
unexpectedly high resource usage without you being in on the
decision, because our simple method of dealing with graceful restart
requires that the allocated size of the scoreboard stay the same.

Most folks aren't going to deal with ServerLimit or ThreadLimit
because the default values are reasonable (or we ought to fix them!),
or at least reasonable for the smaller machines.

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...