httpd and memory usage

Chuck Swiger cswiger at
Sat Jun 11 18:40:03 GMT 2005

David Banning wrote:
> I seem to have a lot of memory being eaten by httpd (part output of top);
> 62310 nobody          18   0 26792K 21516K lockf    0:04  0.00%  0.00% httpd
[ ... ]
> I have changed the timeout in httpd.conf from 300 to 100 which does not
> seem to help.

It wouldn't.  Apache is normally run in a prefork mode, which means it keeps 
lots of children (default is 5, plus the master) running all of the time.

> Any ideas to have httpd timeout sooner to preserve memory?

If you want to reduce the memory usage, avoid using mod_perl or PHP.  httpd 
ought to shrink down to ~5MB or so per process.


More information about the freebsd-questions mailing list