[Zope] Zope config : cache-size and Zeo

Tim Peters tim.peters at gmail.com
Tue Mar 8 12:03:34 EST 2005


[Pascal Peregrina]
> I would like to know if, for a Zeo Storage, increasing the
> <zodb_db></zodb_db> cache-size param value (per connection target number of
> cached objects) is useful, specially if I already have a high cache-size
> param value in the <zeoclient></zeoclient> subsection (global Zeo objects
> target cache size in bytes).

These are two distinct caches.  The "ZODB cache" applies to every way
of using ZODB, and is an in-memory cache associated with a Connection.
 The least-recently used objects are booted out at transaction
boundaries, trying to reduce the number of objects in the in-memory
cache to the number you specified.

The ZEO client cache is a second-level, disk-based cache, specific to
ZEO.  It only sees requests for objects _not_ satisfied by the
in-memory Connection cache.

Of course it's faster to satisfy a reference from memory than from any
disk-based cache.

Whether it will help you to boost the number of objects in the
in-memory cache depends on many details you haven't revealed (and may
not even know).  Try it.  A downside is that the RAM needed for the
in-memory cache will increase, taking away RAM available for other
uses.  Do too much of that, and you'll start swapping out RAM to disk.

The default sizes for the in-memory Connection cache and the ZEO
disk-based cache were set years ago, when "typical" RAM and disk sizes
were much smaller than they are now.  It will probably help to boost
both -- up to some point that depends on details of your HW and object
reference patterns.


More information about the Zope mailing list