RE: [users@httpd] Server seems busy, StartServers, Min/MaxSpareServers

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

 



Forking new processes does take system resources and may slow down handling of HTTP requests. If you constantly observe that new Apache processes are forked (and that idle Apache processes die), you may want to do something about it. Otherwise not.

One strategy may be to set StartServer to a value that would allow the server to handle the load, let's say 70 percent of the time. In order to avoid the processes forked during server initialisation to be killed because they are idle, you may want to set the value of MaxSpareServers to at least that of StartServer. MinSpareServers should be set to a value big enough to have new processes forked in anticipation of a load increase so that IdleServers never reaches zero. Apache can fork a maximum of 32 processes per second. MinSpareServers must therefore be high enough to absorb a sudden burst of connections while forking additional processes to handle additional load.

When load increases and IdleServers falls below MinSpareServers, new processes will be forked.
When load falls, eventually the processes in excess of MaxSpareServers will be terminated.

You may want to establish a baseline of your Apache server by using the server-status handler. By querying /server-status?auto you may automate data collection from Apache and parse the results to create some statistics about your server's behaviour. The resulting statistics will help you tuning the above parameters.

BR
-ascs

-----Original Message-----
From: Dan Trainor [mailto:info@xxxxxxxxxxxxxxxx] 
Sent: Monday, July 11, 2005 7:41 PM
To: users@xxxxxxxxxxxxxxxx
Subject: [users@httpd] Server seems busy, StartServers, Min/MaxSpareServers

Hello, all -

This is a subject that's been discussed on the list before, but an
answer never was quite found.

I've got a rather busy site, and often times I get some of the following
pieces of info in my log:

[Mon Jul 11 12:33:17 2005] [info] server seems busy, (you may need to
increase StartServers, or Min/MaxSpareServers), spawning 8 children,
there are 55 idle, and 278 total children
[Mon Jul 11 12:33:18 2005] [info] server seems busy, (you may need to
increase StartServers, or Min/MaxSpareServers), spawning 16 children,
there are 60 idle, and 286 total children

Something to that effect.

I was told once that StartServers should be rather high for a busy site.
 StartServers is set to 64.  I was also told that MinSpareServers and
MaxSpareServers should be relative to StartServers, being two's
compliment, but it would take some time to figure out the exact
combination of the three items.  MaxClients is set to 1024, with some
httpd.h editry.  The machine is a P4 2.8 w/1G RAM.  It's not the most
ballsy, but I know it can handle the load.

So I guess I'm wondering now, what would be some more appropriate
settings, so that I do not risk clients being cut off when they visit
the sites.

Of course, any help would be greatly appreciated.

Thanks!
-dant

---------------------------------------------------------------------
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


---------------------------------------------------------------------
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