[nycbug-talk] apache on freebsd
pete at nomadlogic.org
Wed Aug 23 14:57:09 EDT 2006
> On Aug 23, 2006, at 1:48 PM, Peter Wright wrote:
>>> -D APR_USE_SYSVSEM_SERIALIZE
>>> -D APR_USE_PTHREAD_SERIALIZE
>> uessing here, but the SYSVSEM and PTHREAD options could cause a
>> between memory usuage....this is the output from apachectl -V correct?
>> you are using the prefork model correct (sorry can't remember).
> prefork, yes
> -V, yes ( httpd -V , actually )
> according to the docs, the 2 APR options only have to do with binding
> to the sockets. i could be wrong. but i haven't foudn anything
> that would result in a memory difference like that.
>>> on OSX, immediately after an httpd startup, Apache spawns
>>> 1 parent server 80552 30796
>>> 1 child server 76560 2960
>>> freeBSD spawns
>>> 1 parent 55148 51736
>>> 1 child 55412 51956
>>> After 1 request,
>>> OSX child is + 14mb resident
>>> FreeBSD child is + 120k resident
>> hmm...according to your results httpd on FreeBSD is only taking 120k
>> resident, while OSX is using 14megs resident. the httpd is not
>> taking any
>> requests either during these samples correct?
> no. the numbers above are vsize / resident after startup
> the +120k / +14 mb are the resident sizes after one request
> osx 76560 16960
> freebsd 55412 52070
> memory in mod_perl grows like crazy because of the way variables are
> children tend to double in size within 500 requests-- at which time
> they're killed off my MaxRequestsPerChild and a new server with the
> parent's memory imprint is spawned
> i've been going crazy trying to tame mp-- most developers just toss
> memory at the server and don't care as its 'faster than developer
> time' -- what they fail to remember, is that time is neither created
> nor destroyed. that approach just shifts work onto whomever
> maintains the box.
>> hmm...wierd. never seen the leak restarting apache via rc.d, it
>> as it kills all httpd process the goes through the start function. so
>> that may be a bug.
> i don't use rc.d-- i just use a custom apachectl script (which might
> be similar to rc.d ). i have 4 apaches running on my system (same
> binary, different configurations). one is handled by the rc.d and
> system. the rest have their own setups tailored to specific
> functions, and managed independantly.
> apachectl restart jut reloads the confs and kills off the children.
> if you're using a mod_xxx interpreter, it'll often just double the
> size of whatever it loads. its less of a bug and more of a
> behavior. a hard stop / start is the only way to handle it.
hmm...well you've stumped me on this one :) havn't done mod_perl work in
ages for better or worse (moved to jakarta/tomcat)...
pete at nomadlogic.org
More information about the talk