[tahoe-dev] Debugging memory leaks with guppy

David-Sarah Hopwood david-sarah at jacaranda.org
Sat Oct 23 01:07:03 UTC 2010

Brian Warner wrote:
> Hmmm. Can you locate the ResponseCache instance and look at
> 'self.cache.keys()' ? In particular, I'm interested in the number of
> 'verinfo' values in there:
>  verinfos = set([verinfo for (verinfo,shnum) in cache.keys()])
>  print len(verinfos)
> My suspicion is that the ResponseCache object is living a lot longer
> than expected, and it's accumulating cached responses from lots and lots
> of generations ("versions") of the mutable file that contains a
> directory which is being modified heavily. When you say your test
> "deleted about 1000 very small files from a single directory", you're
> really making 1000 sequential changes to the same directory, right? So
> there will be 1000 mutable file writes to the same file? If my suspicion
> is right, there will be 1000 different 'verinfos' values (and N times as
> many keys in self.cache, each of which may have multiple strings in the
> set, resulting in a large number of strings left around).

If this is the problem, then also try applying

David-Sarah Hopwood  ⚥  http://davidsarah.livejournal.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 292 bytes
Desc: OpenPGP digital signature
URL: <http://tahoe-lafs.org/pipermail/tahoe-dev/attachments/20101023/33bcc770/attachment.asc>

More information about the tahoe-dev mailing list