[ZODB-Dev] memory or cache leak?
Toby Dickenson
tdickenson@geminidataloggers.com
Fri, 02 Nov 2001 08:58:12 +0000
On Thu, 1 Nov 2001 14:21:05 -0500 (EST), jeremy@zope.com (Jeremy
Hylton) wrote:
>When I run the test in that mode, its memory consumption does seem to
>grow quickly. The cacheSize() returns a large number, but I'm not
>sure why.
cacheSize returns the total number of objects in the cache. This
includes ghost and non-ghost objects.
The test case Andrew posted used a persistent dictionary. That
dictionary object is likely to be a non-ghost, since it is frequently
accessed. As long as it is, all of its contained objects will be in
the cache too, although with most of them as ghosts.
This doesnt cause a great deal of memory bloat (maybe a few hundred
bytes per ghost?) but does make the cahce less efficient.
Using some form of BTree will fix this problem.
Toby Dickenson
tdickenson@geminidataloggers.com