'leaks' Branch objects
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| Bazaar | Confirmed | Low | Unassigned | ||
| loggerhead | Triaged | High | Unassigned | ||
Bug Description
I think this possibly needs fixes in both bzrlib as well as in Loggerhead.
Basically, we seem to get a lot of stale BzrBranch7 objects lying around in memory, waiting for the garbage collector to run to clear them all out.
After starting a test "bzr serve --http", and then poking at a bunch of pages, memory consumption goes up a fair amount. (Initial memory is 24MB VmRSS / 117MB VmPeak, after browsing just /changes it goes to 35/201MB, after a bunch of browsing it gets to 368/580MB)
I wrote this patch:
lp:~jameinel/loggerhead/meliae-dump
Which lets me hit a "+memdump" URL and get a Meliae dump of the memory. Digging through it shows *5* BzrBranch7 objects, along with their associated CHKInventoryRep
Also digging through it shows lots of instancemethod(
Off-hand, I'm thinking we should add a Branch.finalize() method, so that loggerhead (and other long-lived apps) can say "I don't need you any more, release all of your references and go away". Ideally it wouldn't be needed in a gc language like python, but 300+MB sitting around doing nothing is pretty bad.
| Changed in loggerhead: | |
| status: | Confirmed → Triaged |
| importance: | Medium → High |
| tags: | added: performance |
| tags: | added: check-for-breezy |
| Changed in loggerhead-breezy: | |
| status: | New → Triaged |
| importance: | Undecided → High |
Also assigning bzr because I think it is cleanest as a Branch.finalize sort of action.