perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Vanasco <modperl-l...@2xlp.com>
Subject Re: acceptable memory leaks?
Date Mon, 21 Aug 2006 21:48:23 GMT
I just wanted to give the list an update on my recent  exploits

Devel::Cycle
	Find memory cycles in objects
	pro:
		easy to integrate into mp2 handlers.
	con:
		it only detects one type of leak , which most people avoid creating  
in the first place

Devel::Leak
	Utility for looking for perl objects that are not reclaimed
	pro:
		easy to integrate into mp2 handlers
	con:
		Note that you need a perl built with -DDEBUGGING for sv_dump() to  
print anything, but counts are valid in any perl.

Devel::LeakTrace
	Indicate where leaked variables are coming from
	con:
		I haven't been able to get this to work with mod_perl,  as the  
persistent environment is a bit counterintutive

Devel::LeakObject
	Detect leaks of objects
	con:
		this seems to do nothing in a persistent environment

Devel::GC::Helper
	con:
		doesn't work with DBI installed
	

Dev'ing on OSX is a PITA.  many things won't compile right, the bsd  
layer by apple is  severely crippled ( getrusage barely works,  with  
1/3 the functionality of what it should have.  misc. terminal  
commands like 'top' are similar )


Personally, I found this behavior (approximate) using Devel::Leak:

Starting out my server, i have this many 'objects' when i hit a  
fairly static page (run through template engine, but nothing dynamic  
changes )
	197913

I hit reload
	+20

I hit reload
	+10

I hit reload
	+ 7

I hit reload thereafter
	+1

To me, it seems the +40 etc from the large growths are normal.  the  
+1 however looks to be a leak to me.  hopefully i can track that  
sucker down and end this nightmare.


Mime
View raw message