Finding Average size of single Apache process for setting MaxClients
i tried pmap pgrep apache2
|grep total on ubuntu 10.4 running Apache and the o/p was like this:
total 47768K
total 48048K
total 48048K
total 48048K
total 48048K
total 48048K
does this means that each child process is taking 48 MB of RAM.Can you help me in finding the exact memory usage of each process.Expecting a reply
This is what I use for an approximation of the average httpd (substitute apache2 if on Debian distro) process size:
ps -ylC httpd --sort:rss | awk '{sum+=$8; ++n} END {print "Tot="sum"("n")";print "Avg="sum"/"n"="sum/n/1024"MB"}'
Like symcbean said you should take about 80% of the server's memory and divide it by the average process size to determine your upper limit MaxClients.
Cheers