Linux – Number of workers on the Apache 2.2 status page (Scoreboard)

apache-2.2configurationdebianlinuxmpm-prefork

I installed Apache 2.2 from the Debian repository (6.0/Squeeze). By default, Debian installs the prefork module and comes with the following (default) configuration:

<IfModule mpm_prefork_module>
  StartServers          5
  MinSpareServers       5
  MaxSpareServers      10
  MaxClients          150
  MaxRequestsPerChild   0
</IfModule>

Looking at the scoreboard on the status page, I see there are 256 workers available:

Current Time: Sunday, 05-Jun-2011 22:50:00 CEST
Restart Time: Saturday, 04-Jun-2011 05:49:50 CEST
Parent Server Generation: 3
Server uptime: 1 day 17 hours 9 seconds
Total accesses: 208737 - Total Traffic: 4.6 GB
CPU Usage: u1.08 s.18 cu0 cs0 - .000854% CPU load
1.41 requests/sec - 32.6 kB/second - 23.0 kB/request
1 requests currently being processed, 9 idle workers

.______W__.._...................................................
................................................................
................................................................
................................................................

I wonder whether it actually is 256, since the list of requests ranges from 0 to 149. Due to a (yet-to-be-discovered) bug, Apache grinds to a halt with 150 active servers, which matches the MaxClients setting. I wonder if the display with 4 rows of 64 characters is misleading and should display 150 characters in total.

Best Answer

To answer my own question, it seems that the scoreboard is based on the ServerLimit instead of MaxClients. The Apache documentation is not really explicit about the default value of ServerLimit in case of prefork, which turned out to be 256.