OK, been doing some more investigation and so far came up with this:
Apparently the optimal MaxClients setting can be determined by taking the total size physical memory and dividing that by the average size of the httpd process (RSS size in ps aux I think). I'm working with the max size I've seen so far to be on the safe side.
So, if my maths check out, it would be this:
8GB * 1024 = 8192MB
Code:
ps aux | grep httpd
...
...
nobody 10668 0.4 0.1 1039016 11184 ? S 14:23 0:00 /data01/IBMIHS/bin/httpd -d /data01/IBMIHS -k start
...
Which means 8192 / 12 = 682.66. I've since rather based this on the reading based in the free command, specifically the buffers/cache line, which gives me 6192MB / 12 = 540.
Next up, the MaxRequestsPerChild directive should be set, ideally at any rate, to a figure based on the number of requests the server gets per day, divided by the number of Apache processes. I assume the number of Apache processes would be based on the ServerLimit directive.
So, based on that, I think I can put something like this in place on my nonProd server:
Code:
<IfModule worker.c>
ThreadLimit 100
ServerLimit 64
StartServers 8
MaxClients 540
MinSpareThreads 100
MaxSpareThreads 500
ThreadsPerChild 100
MaxRequestsPerChild 2340
</IfModule>
Once that's done, I think the obvious next step would probably be to get some sort of test scheme together and benchmark it with ab or something. I'm hoping it's possible to just output the access file from Prod, stick that in a file, pipe that file into ab and simulate my Prod environment's load against nonProd and see if the new settings work OK or not.
Please feel free to interrupt me if my theory looks daft at any point.