3 ms·
How to set MaxClients: 1 - restart apache 2 - run a handful of typical requests through it a few times (or just leave it live for a minute) 3 - look for the
by cagenut 16y ago
How to set MaxClients:
1 - restart apache
2 - run a handful of typical requests through it a few times (or just leave it live for a minute)
3 - look for the largest few workers by the RSS column in "ps"
4 - average that, divide it into the amount of memory you consider it acceptable for apache to use (64mb per worker, 512mb available for apache, therefore 8)
voila, thats your maxclients. If its greater than 256, congrats, you have more ram than you need[1], find something else to do with it.
the real trick here is when you realize "oh thats the exact same math I have to do with fastcgi worker processes in nginx" and realize its all the same.
[1] this statement will become untrue somewhere around 2013 when 128-core servers become cheap and standard