Subject: Re: swap
To: None <netbsd@purk.ee>
From: Chris Wareham <chris.wareham@iosystems.co.uk>
List: netbsd-help
Date: 04/09/2002 17:12:10
netbsd@purk.ee wrote:
> 
> Why httpd eating so much memory...?Is there any reasonable
> answer?:)
> 

I don't have access to a NetBSD machine running apache at the
moment (all my NetBSD machines run a dubious homemade webserver),
but it certainly looks like it's hogging the memory. Are you
using any extra apache modules, as things like mod_perl have had
a reputation for memory leaks in the past.

One thing though, output from top and ps can be deceptive, as
they don't necessarily show you if those httpd processes are
sharing data and read only segments. Check the manual pages to
be sure.

If you are just running apache on a workstation (either for
serving up local documentation or developing web applications),
then you could try fine tuning its configuration. Look at the
apache documentation for the following options:

MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150
MaxRequestsPerChild 0

For web development it can actually be very useful if apache
doesn't fork any children, as you can then attach to the
httpd process using a debugger like gdb - great for debugging
troublesome modules.

Chris

-- 
chris.wareham@iosystems.co.uk (work)
cwareham@btinternet.com (home)