[Petal] Another reason to choose Petal....

Jean-Michel Hiver jhiver@mkdoc.com
Mon, 14 Oct 2002 16:51:06 +0100


> 	"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."
> 
> I'm surprised at such a low setting. How much memory are these 
> applications leaking?!? Although I haven't benchmarked my code yet, I'd be 
> amazed to see memory leaks that require such low maxrequests settings. My 
> Apache setup sets MaxRequestsPerChild to 0. Perhaps I'm overly optimistic 
> about my code. What are other mod_perl/Petal developers using? Is this yet 
> another reason to choose Petal?

We use MaxRequestPerChild 80 for MKDoc because there is a memory leak,
probably in the Unicode::Transliterate library (which is written in
C/XS).

I don't think that Petal leaks unless any of the libraries underneath
(XML::Parser or HTML::TreeBuilder) do, but I have not ran any extensive
tests yet regarding memory leakage.

If you have $Petal::MEMORY_CACHE though, processes using Petal should
grow until all the templates have been compiled into memory.

Anyway it's good to know that we're not the only people on the planet to
have troube with memory leaks. They are very hard to track down and
debug, especially in large applications where they are likely to happen.

So I guess that most people (including me) feel that a
MaxRequestPerChild directive and getting a couple of extra dimms is
better than banging your head on the computer :-)

Cheers,
-- 
IT'S TIME FOR A DIFFERENT KIND OF WEB
================================================================
  Jean-Michel Hiver - Software Director
  jhiver@mkdoc.com
  +44 (0)114 255 8097
================================================================
                                      VISIT HTTP://WWW.MKDOC.COM