[Zodb-checkins] CVS: ZODB3/bsddb3Storage/docs - custom_zodb.py:1.4
Barry Warsaw
barry@wooz.org
Sat, 9 Nov 2002 00:32:49 -0500
Update of /cvs-repository/ZODB3/bsddb3Storage/docs
In directory cvs.zope.org:/tmp/cvs-serv26306
Modified Files:
custom_zodb.py
Log Message:
Updated.
=== ZODB3/bsddb3Storage/docs/custom_zodb.py 1.3 => 1.4 ===
--- ZODB3/bsddb3Storage/docs/custom_zodb.py:1.3 Fri Aug 23 13:17:00 2002
+++ ZODB3/bsddb3Storage/docs/custom_zodb.py Sat Nov 9 00:32:49 2002
@@ -1,24 +1,18 @@
import os
-# Use this block for Full storage
-
from bsddb3Storage.BerkeleyBase import BerkeleyConfig
+from bsddb3Storage.Full import Full
+from bsddb3Storage.Minimal import Minimal
+
+# Pick one
+Class = Full
+#Class = Minimal
+
+# The config instance has several attributes which can be used to tune Full
+# storage. See the BerkeleyConfig class docstring for details. You should
+# consider at least setting logdir and frequency.
config = BerkeleyConfig()
-# The config instance has four attributes which can be used to tune Full
-# storage. See the BerkeleyConfig class docstring for details. Briefly,
-# numlocks sizes the Berkeley lock table, interval specifies the number of
-# ZODB commits after which a Berkeley transaction checkpoint is written, and
-# kbyte and min are passed directly to Berkeley's txn_checkpoint() function.
-#
-# The default number of locks is 20000, but it's not impossible to exhaust
-# those if you have transactions with lots of objects in them (e.g. big
-# catalog updates). Cranking this number of does consume system resources.
-config.numlocks = 40000
+config.logdir = '/directory/on/different/disk'
+config.frequency = 3600
-from bsddb3Storage.Full import Full
envpath = os.path.join('var', 'full')
-Storage = Full(envpath, config=config)
-
-# Use this block for Autopack
-##from bsddb3Storage.Autopack import Autopack
-##envpath = os.path.join('var', 'autopack')
-##Storage = Autopack(envpath)
+Storage = Class(envpath, config=config)