[ZODB-Dev] Increasing ZODB cache size

Toby Dickenson tdickenson@geminidataloggers.com
Thu, 11 Oct 2001 09:43:08 +0100


On Wed, 10 Oct 2001 12:16:27 -0400, Neil Schemenauer
<nas@mems-exchange.org> wrote:

>Imagine that my entire ZODB database fits into RAM.  What are the cache
>settings that I can use to make ZODB keep everything in memory and only
>use the disk for committing transactions?  The connection methods
>setCacheSize, setCacheDeactivateAfter and setPoolSize sound promising
>but I can't find any documentation on what they actually do.
>
>Thanks for any help.

Those parameters affect the incremental garbage collector which Zope
calls between every transaction.

I assume you are not using Zope..... if you are not using the
incremental collector then they dont apply to you at all.

The incremental collector purges objects that have not been accessed
in the time set by setCacheDeactivateAfter. If the cache size is less
than the limit set by setCacheSize then it only checks a 'small'
number objects each call. If the cache size increases above that limit
then it trawls through more objects, and reduces the time.

setPoolSize controls the size of connection pool (one connection is
used per thread).

Toby Dickenson
tdickenson@geminidataloggers.com