Ok, I'm seriously confused ;-)

I created a startup.pl that allocated 10MB and a handler that allocated 20MB. I removed all other vhosts on the machine and didn't preload any modules.

On an OS X box running Apache 1.3 (not directly comparable but all I had to hand):

10mb startup.pl

root 2902 0.0 0.4 57664 6872 ?? Ss 9:51PM 0:00.18 /usr/sbin/httpd www 2903 0.0 0.0 47696 676 ?? S 9:51PM 0:00.00 /usr/sbin/httpd www 2904 0.0 0.0 47696 676 ?? S 9:51PM 0:00.00 /usr/sbin/httpd

one 20mb hit later

root 2902 0.0 0.4 57664 6460 ?? Ss 9:51PM 0:00.18 /usr/sbin/httpd www 2903 0.0 2.8 89692 43672 ?? S 9:51PM 0:00.13 /usr/sbin/httpd www 2904 0.0 0.0 47696 608 ?? S 9:51PM 0:00.00 /usr/sbin/httpd

And now on a FreeBSD 6.0 box running Apache 2:

10mb startup.pl

root 64655 2.4 5.8 97408 60564 ?? Ss 10:14PM 0:00.35 /usr/ local/sbin/httpd www 64656 0.0 5.8 97408 60576 ?? S 10:14PM 0:00.00 /usr/ local/sbin/httpd www 64657 0.0 5.8 97408 60576 ?? S 10:14PM 0:00.00 /usr/ local/sbin/httpd

one 20mb hit later

root 64655 0.0 5.8 97408 60564 ?? Ss 10:14PM 0:00.35 /usr/ local/sbin/httpd www 64657 0.0 5.8 97408 60576 ?? I 10:14PM 0:00.00 /usr/ local/sbin/httpd www 64835 0.0 5.8 97408 60576 ?? S 10:15PM 0:00.00 /usr/ local/sbin/httpd

I'm not clear on how these numbers are interpreted, but it looks to me that the FreeBSD is allocating all 30MB at startup. Have I missed something in httpd.conf that will cause this? It also looks like 64656 has been replaced by 64835 but I don't see any errors in the error log.

If I then modify the handler to return the $max_rss and $max_ixrss from BSD::Resource:

10mb startup.pl

root 65678 15.9 5.8 97408 60564 ?? Ss 10:32PM 0:00.35 /usr/ local/sbin/httpd www 65679 0.0 5.8 97408 60576 ?? S 10:32PM 0:00.00 /usr/ local/sbin/httpd www 65680 0.0 5.8 97408 60576 ?? S 10:32PM 0:00.00 /usr/ local/sbin/httpd

one 20mb hit later

root 65678 4.5 5.8 97408 60564 ?? Ss 10:32PM 0:00.35 /usr/ local/sbin/httpd www 65679 2.2 9.8 163224 101764 ?? S 10:32PM 0:00.14 / usr/local/sbin/httpd www 65680 0.0 5.8 97408 60576 ?? S 10:32PM 0:00.00 /usr/ local/sbin/httpd

Where did 163MB come from?!

That handler prints (max_rss, then max_ixrss):

101700     # stays the same
4          # goes up 2 or 3 each time

On OS X it said both were 0, which I presume means it doesn't work properly on OS X.

root    60641 22.6  5.8 73068 60492  ??  Ss    8:25PM   0:02.08
73MB thats nothing for mod_perl + php its fairly typical actually.

That's somewhat reassuring.

These numbers seem really high to me. I have both mod_perl and mod_php installed and am running two perl sites and four php sites.
You should separate these out to separate apache instances.... unless you've a good
reason not to.

I've been meaning to do something like that for while, but I work on something else during the day so my only reason is a lack of time. What benefits can I expect from doing this? The only things that searching have turned up are that a years ago they stamped all over each other but I haven't had any such issues so I assume that has been fixed.

Thanks for your help.

Jonathan

Reply via email to