reduce Apache memory usage?

nullspace

New member
Joined
Oct 28, 2008
Messages
1
What changes can I make to Apache to reduce it's memory consumption? My site is pretty low-usage, and I'm continually bumping up against my VPS memory limit.

I see from running 'top' that I have 6 httpd processes running at the moment, despite there being no one currently browsing the site.
 
StartServers 5
MinSpareServers 5
MaxSpareServers 10
ServerLimit 450
MaxClients 450
MaxRequestsPerChild 0

These settings should be in /etc/httpd/conf/extra/httpd-mpm.conf

or if you didnt install via custombuild maybe just in /etc/httpd/conf/httpd.conf
 
How do you know you're bumping up your memory limit. If you're seeing it in top then you should know that top will always show most of your memory as used, because the Linux kernel is managing the memory to make it more quickly available, and to enable your server to run repeating jobs more quickly.

Note that if you lower the number of spare servers running (the default is five; hence the total of six) it'll take longer for your clients to see your pages.

Jeff
 
Back
Top