You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Grant Peel <gp...@thenetnow.com> on 2007/11/20 15:28:45 UTC

[users@httpd] Apache Memory Usage,

Hi all,

Does any one have any good tips on makeing apache lean and mean from a 
memory perspective?

I am using apaceh 2.2 on FreeBSD 6.2.

Each one of my deamons is using about 1.8 - 2.5 % of available memory. (1 
GB).

-Grant 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache Memory Usage,

Posted by Sergey Avdushkin <sa...@farpost.com>.
> Does any one have any good tips on makeing apache lean and mean from a 
> memory perspective?
> 
> I am using apaceh 2.2 on FreeBSD 6.2.
> 
> Each one of my deamons is using about 1.8 - 2.5 % of available memory. 
> (1 GB).

Disable any modules you do not use.

If you need PHP, try to use php-fcgi instead of mod_php, this could save 
you a lot of memory.

Strip everything you do not need from VirtualHost entries (they generate 
a lot overhead; on one of my servers, there are ~1000 VirtualHosts & I 
have now 25mb per Apache child on it).

If Apache starts with low memory usage, but grow up after some time -- 
try to reduce MaxRequestsPerChild.

With prefork, try to reduce Min/MaxSpareServers, this would slow things 
a little, but should free some memory.

Also, you could decrease MaxClients to some value, that for sure would 
not put your server out of memory (i.e. it less then 40 in your current 
setup).

--
Sergey Avdushkin.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org