Last active
October 24, 2017 14:23
-
-
Save flannon/eeccd552e34ef846e569bb361decafc6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
list compiled modules | |
$ httpd -l | |
Estimate memory usage per apache process | |
$ ps -lyC httpd --sort:rss | awk '{sum+=$8; ++n} END {print "Tot="sum"("n")";print "Avg="sum"/"n"="sum/n/1024"MB"}' | |
The max value for MaxClients/MaxServers should be set to 80% of memory consumption | |
(i.e. mem per httpd process divided by 80% system memory.) | |
Or, for another version from https://gist.github.com/tbjers/4496984 with slight modifications, try this, | |
ps -ylC httpd --sort:rss | awk '{ s += $8; } END { print "Average Size:", s/(NR-1)/1024, "MB,\nProcesses: ", NR-1, "\nTotal usage: ", (s/(NR-1)/1024)*(NR-1), "MB, \nMax Servers: ", 6500/(s/(NR-1)/1024) }' | |
List open files for apache | |
sudo lsof | grep apache | grep <mount point file pattern> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment