perl-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: Apache::Test memory usage
Date Wed, 28 Sep 2005 22:50:46 GMT
Jim Brandt wrote:
> 
> I've been fiddling with my memory test module and I found something  
> strange. I installed a local version for our internal use and was  
> writing some tests for a very simple Registry script that I was sure  
> wasn't leaking. However, much to my surprise, it started failing the  
> tests when I ran 100 or so requests.
> 
> So I started digging in to find the source of this memory growth and  I 
> think I've narrowed it down to the server started by Apache::Test.  I 
> created a script that does nothing but print a header, and ran  tests 
> through an Apache::Test generated server and a server I ran  
> independently using the same system binary. The independent one  seemed 
> memory stable, but the Apache::Test server grew just a little  over time.
> 
> The usage I've seen looks something like this:
> 
>     size    vsize resident    share      rss
>    12.7M    12.7M     6.3M       0k     6.3M
>     264k     264k     560k       0k     560k
>      24k      24k     136k       0k     136k
>      16k      16k      16k       0k      16k
>      16k      16k      16k       0k      16k
>       0k       0k       0k       0k       0k
>       0k       0k       0k       0k       0k
>       0k       0k       0k       0k       0k
>       0k       0k       0k       0k       0k
>       0k       0k       0k       0k       0k
>       0k       0k       0k       0k       0k
>       0k       0k       0k       0k       0k
>       0k       0k       0k       0k       0k
>       0k       0k       0k       0k       0k
>       0k       0k       0k       0k       0k
>       0k       0k       0k       0k       0k
>       0k       0k       0k       0k       0k
>       0k       0k       0k       0k       0k
> --->  8k       8k       8k       0k       8k
> 
> After that, the 8k then pops up every 5 or 6 requests forever.
> 
> My question is, can someone familiar with the innards of Apache::Test  
> shed some light on why it might grow like this? Is it storing some  data 
> such that it gets a little bigger, or might there be an  unintentional 
> leak in there?
> 
> I just don't completely understand what Apache::Test is doing to  start 
> that server, so any info would be helpful.

Jim, it could be anything running inside mod_perl and not necessarily 
Apache-Test. Try bracketing measurements before and after executions?

Otherwise try playing with Devel::Leak
http://search.cpan.org/~ni-s/Devel-Leak-0.03/Leak.pm

You can see how apache starts the server by running t/TEST -start, it 
prints the command that it runs.

-- 
_______________________________________________________________
Stas Bekman mailto:stas@stason.org   | http://stason.org/
MailChannels: Assured Messaging (TM) | http://mailchannels.com/
The "Practical mod_perl" book        | http://modperlbook.org/


Mime
View raw message