I manage a Centos 6.6 server (with cpanel expired license / maybe it's not important) with 8 cores and 64GB RAM and my HTTP server becomes very slow when it reaches between 250 and 300 simultaneous connections.
When I found about mpm prefork configuration as a solution to increase server performance I've looked for the parameters within the httpd.conf file and all its includes, but nothing was there. It looks like my apache uses default mpm parameters.
So I've tried to add a new configuration and noticed some changes in maximum number of clients via my mod_status web page. When I put values for ServerLimit and MaxClients less than 256, server-status display changes, but when I try a value larger than 256, it simply stops at 256.
Here's a concise version of the server-status page, with MaxClients and ServerLimit set to 257, it however displays exactly 256 slots in 4 lines of 64 workers. copmare with http://apache.org/server-status
Server Version: Apache/2.4.10 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4
Server MPM: prefork
Server Built: Jan 23 2015 21:04:30
--------------------------------------------------------------------
Current Time: Thursday, 12-Feb-2015 19:15:49 CET
Restart Time: Thursday, 12-Feb-2015 19:13:41 CET
Parent Server Config. Generation: 266
Parent Server MPM Generation: 265
Server uptime: 2 minutes 8 seconds
Server load: 0.76 0.66 0.63
Total accesses: 7771 - Total Traffic: 296.0 MB
CPU Usage: u3.76 s.62 cu77.6 cs7.05 - 69.6% CPU load
60.7 requests/sec - 2.3 MB/second - 39.0 kB/request
256 requests currently being processed, 0 idle workers
WWWWWKWKWKWWRRWWWKKWKKWWWKKWWWCKKKWWWWWKKWCWWWWWKKCWWKKWKCWKRCWW
WWWKKKKKWKWKWWWCWWKKWWRWKKRWWCWKWWWWKKKKKKWKCKWKKKKKWCWKCWWWKWRW
KWKKCKKKWKWKWWKLWWWKWWKCCCWKWWKKKKKWKWWKWWKKKWKWWCCRKKCCWKKWKWCW
CWKKRKKWWKRKKWWWWKWWWKWWKKWKKKWWWKWWWKLKWWKWWKKKKWWWKWWKRKWKWCWW
How can I solve this problem ? Actually I need to tune prefork parameters in order to serve 10000 clients at the same time. Using NGINX to serve static files is not possible for me.
I also want to have more information about MPM configuration during runtime.
Any clues ?
Edit : Here is the segment of mpm configuration I've added
<IfModule prefork.c>
Mutex default mpm-accept
# BEGIN : CUSTOM CONFIGURATION - all the following code is added by me
# StartServers 6
# MinSpareServers 6
# MaxSpareServers 12
## Whatever the value (> 256) I enter for those two parameters, it doesn't exceed 256 in runtime (as shown in server-status page)
ServerLimit 512
MaxClients 512
# END : CUSTOM CONFIGURATION
</IfModule>
With the two uncommented parameters above, I couldn't figure how to have the 256 limit increased. Is there something missing ?
MaxClients
is just the maximum, but you have idle workers, so why would it spawn more than it needs to?