Perrin Harkins wrote:
> Josh Chamas wrote:
> 
>>   Set MaxRequestsPerChild to 100 for applications that seem to leak
>>   memory which include Embperl 2.0, HTML::Mason, and Template Toolkit.
>>   This is a more typical setting in a mod_perl type application that
>>   leaks memory, so should be fairly representative benchmark setting.
> 
> 
> 
> Maybe I'm more careful about memory growth than some people, but 100 
> sounds a bit on the low side to me.  I use Apache::SizeLimit instead of 

For the purposes of the benchmark, using Apache::SizeLimit won't do much
the worst results are only showing 3M unshared per process & 8M total
memory per process.  The benchmarks run at 20 MaxClients.

> MaxRequestsPerlChild, but I'm pretty sure every child serves more 
> requests than that.  Did it seem to affect the performance numbers much?
> 

For Embperl 2.x it made a world of difference on the memory side, with
only a slight performance impact of 5-10%, but reduced memory usage
from 60M to 25M for the test.  Gerald & I have found real memory leaks
in Embperl 2.x, where this kind of config is necessary.

> Incidentally, I hate to call this stuff "memory leaks", since it's 
> usually just normal growth as memory gets used.  Calling it "leaks" 

Right... I looked into HTML::Mason today, and agree with you and
David that for HTML::Mason there is not a memory leak, it just uses
more unshared memory than other environments at runtime, and the
MaxRequestsPerChild did not seem to make a difference.  This might
also be true of Template Toolkit.  I'll look into the latter more.
I just assumed if the unshared memory footprint was as high as it
was for these environments, that there must have been a leak like
in Embperl 2.x.  I also looked into AxKit which seems to use more
memory, but it too does not seem to have a leak.

> implies that memory is being wasted as a result of mistakes with 
> pointers or some such.  When people hear "memory leaks" they go running 
> for stuff like Apache::Leak, thinking they can find some problem and fix
> it, which is usually not the case.

Right.  What I go for in the benchmarks as far as a memory leak goes
is do the environments seem to use the same amount of memory at 30 seconds
as they do at 60 seconds.  In the case of Embperl 2.x, this was very different,
but in the case of HTML::Mason, it stays the same.

Thanks as always for your feedback.

--Josh


Reply via email to