How to calculate MaxClients value that can be given in Apache httpd

by rajesh 2012-07-29 13:12:29

Theoretically, Maxclients value can be calculated using the formula

----------------------------------------------------------
MaxClients = (Total Memory - Operating System Memory - MySQL memory) / Size Per Apache process.
----------------------------------------------------------

----------------------------------------------------------
To find OS Memory:
> ps aux | awk '{sum1 +=$4}; END {print sum1}'
This will give value in %.
So if it returns 20 in 5GB RAM server, then 1GB is taken by OS and other things like mail, cpanel in the server. So we are let with 4GB for mysql and apache.
----------------------------------------------------------


----------------------------------------------------------
To find Mysql Memory:


----------------------------------------------------------
Note: use mysqltuner.pl to optimize your mysql settings


----------------------------------------------------------
To find Apache Size per Process use the command "ps -C httpd -O rss"
More details in
http://hiox.org/34346-finding-the.php
----------------------------------------------------------



----------------------------------------------------------
To find in apache has reached MaxClients limit:
http://hiox.org/34345-how-to.php
----------------------------------------------------------
1160
like
0
dislike
0
mail
flag

You must LOGIN to add comments