Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Note that to check memory usage by processes you need to look at the -/+ buffers/cache line; however in this case the change is comparable. Depending on how apache has been tuned, it may start with just a couple of processes ready for handling requests; after a period of many concurrent requests there will probably more processes forked to handle the load. The number of idle processes can also be tuned. So if apache grows to use too much memory, you need to do some tuning. Commented Feb 27, 2015 at 10:28
  • I'm OK at Apache server configuration but haven't done a huge amount in terms of performance tuning for Apache in the past. Any suggestions on which directives I should be looking at or guides? Is there a configuration setting I can enable to tell Apache to kill off forked processes after a certain amount of time? (It seems that Apache doesn't do this by default for some reason.) Commented Feb 27, 2015 at 23:51
  • This is the exact reason I've moved away from Apache... try Nginx or even Lighttpd. Commented Feb 28, 2015 at 7:46
  • Interesting. Heard good things about nginx so maybe it's time we give it a try, but honestly, I've been using Apache for years and never had any major problems. Magento really chews memory though. Commented Feb 28, 2015 at 10:23
  • 1
    Note that your script to calculate the average memory usage includes the low memory usage of the grep httpd-process (at least for me). To fix that i would recommend to exclude that line from the calculation like this: ps aux | grep 'httpd' | grep -v grep | awk '{print $6/1024;}' | awk '{avg += ($1 - avg) / NR;} END {print avg " MB";}' Commented Apr 4, 2019 at 8:50