[users@httpd] Appropiate Configuration of No. of Startup and Standby Servers

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

 



Hello Apache Users/Admins,

I think I have a performance issue in that the master httpd
cannot fork enough children
to satisfy all concurrent connect requests,
because I get these in error_log:

# grep server\ seems\ busy $SERVERROOT/logs/error_log|tail
[Wed Aug 09 21:21:27 2006] [info] server seems busy, (you may
need to increase StartServers, or Min/MaxSpareServers), spawning
8 children, there are 18 idle, and 48 total children
[Wed Aug 09 21:43:25 2006] [info] server seems busy, (you may
need to increase StartServers, or Min/MaxSpareServers), spawning
8 children, there are 19 idle, and 57 total children
[Thu Aug 10 12:43:10 2006] [info] server seems busy, (you may
need to increase StartServers, or Min/MaxSpareServers), spawning
8 children, there are 36 idle, and 68 total children
[Sun Aug 13 17:55:04 2006] [info] server seems busy, (you may
need to increase StartServers, or Min/MaxSpareServers), spawning
8 children, there are 38 idle, and 73 total children
[Mon Aug 14 08:29:56 2006] [info] server seems busy, (you may
need to increase StartServers, or Min/MaxSpareServers), spawning
8 children, there are 38 idle, and 84 total children
[Mon Aug 14 10:20:25 2006] [info] server seems busy, (you may
need to increase StartServers, or Min/MaxSpareServers), spawning
8 children, there are 39 idle, and 92 total children
[Mon Aug 14 11:40:27 2006] [info] server seems busy, (you may
need to increase StartServers, or Min/MaxSpareServers), spawning
8 children, there are 39 idle, and 96 total children
[Wed Aug 16 14:05:01 2006] [info] server seems busy, (you may
need to increase StartServers, or Min/MaxSpareServers), spawning
8 children, there are 37 idle, and 88 total children
[Wed Aug 16 17:35:38 2006] [info] server seems busy, (you may
need to increase StartServers, or Min/MaxSpareServers), spawning
8 children, there are 36 idle, and 75 total children
[Thu Aug 17 09:13:36 2006] [info] server seems busy, (you may
need to increase StartServers, or Min/MaxSpareServers), spawning
8 children, there are 36 idle, and 71 total children


I already increased MaxClients, StartServers, Min|MaxSpareServers
and thought they were high enough.

# sed -n '/^<IfModule prefork/,/^<\/IfModule/p'
$SERVERROOT/conf/httpd.conf
<IfModule prefork.c>
StartServers      40 
MinSpareServers   40
MaxSpareServers   80
ServerLimit      512
MaxClients       512
MaxRequestsPerChild  4000
</IfModule>


The machine has 4 GB of physical memory, and a 2 GB swap device

# free -mt
             total       used       free     shared    buffers
cached
Mem:          4047       3906        141          0        488
2435
-/+ buffers/cache:        982       3065
Swap:         1960          0       1960
Total:        6008       3906       2102
 

# swapon -s
Filename                                Type            Size
Used    Priority
/dev/md2                                partition       2007992
176     -1



This is the Webserver version, and module support

# /usr/sbin/httpd -v
Server version: Apache/2.0.52
Server built:   Oct 15 2004 11:39:29
 
# /usr/sbin/httpd -l
Compiled in modules:
  core.c
  prefork.c
  http_core.c
  mod_so.c


This is the OS and kernel version

# cat /etc/redhat-release 
Fedora Core release 3 (Heidelberg)
 
# uname -srvmio
Linux 2.6.9-1.667smp #1 SMP Tue Nov 2 14:59:52 EST 2004 i686 i386
GNU/Linux



I have read the explanations to the above mentioned httpd.conf
directives
from http://httpd.apache.org/docs/2.0/mod/prefork.html several
times.
But to be honest, the more I read them the more contradicting
they seem to me.
I ask, why can't the master httpd spawn enough children fast
enough
when it always has according to the error_log entries well over
30 idle servers,
and the MinSpareServer was configured to such a high value as 40?
Why are the error_log entries suggesting I even need to raise
them?
I would assume that in such a case it had to spawn even more
children to arrive at
the lower MinSpareServers, being even more occupied with the task
to service pending
connect requests.
Any suggestion as how to tune the prefork params would be highly
appreciated.


Regards

Ralph


P.S.


Although this may undermine list policies,
I have attached three rrdtool charts of weekly 
scoreboard stats, apache procs, and memory usage.
You may notice the sudden leap of "waiting for connect" children 
in the scoreboard chart from last Thursday onwards.
This was when I already doubled the parameter values.
In the charts I never can see a shortage but only lingering idle
children.

Attachment: apache_stats-week.png
Description: apache_stats-week.png

Attachment: apache_processes-week.png
Description: apache_processes-week.png

Attachment: memory-week.png
Description: memory-week.png

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