[Zope-CVS] CVS: Products/DBTab - StorageTypes.py:1.6 dbtab.conf.in:1.4
Shane Hathaway
shane@zope.com
Wed, 18 Dec 2002 17:19:34 -0500
Update of /cvs-repository/Products/DBTab
In directory cvs.zope.org:/tmp/cvs-serv15988
Modified Files:
StorageTypes.py dbtab.conf.in
Log Message:
Used BDBStorage in place of bsddb3storage. Added the BDB configuration options to dbtab.conf.in.
=== Products/DBTab/StorageTypes.py 1.5 => 1.6 ===
--- Products/DBTab/StorageTypes.py:1.5 Tue Dec 10 17:52:34 2002
+++ Products/DBTab/StorageTypes.py Wed Dec 18 17:19:33 2002
@@ -106,7 +106,7 @@
def convertBDBStorageArgs(**kw):
- from bsddb3Storage.BerkeleyBase import BerkeleyConfig
+ from BDBStorage.BerkeleyBase import BerkeleyConfig
config = BerkeleyConfig()
for name in dir(BerkeleyConfig):
if name.startswith('_'):
@@ -129,8 +129,8 @@
'MappingStorage': ('ZODB.MappingStorage', None),
'TemporaryStorage': ('Products.TemporaryFolder.TemporaryStorage', None),
'ClientStorage': ('ZEO.ClientStorage', convertClientStorageArgs),
- 'Full': ('bsddb3Storage.Full', convertBDBStorageArgs),
- 'Minimal': ('bsddb3Storage.Minimal', convertBDBStorageArgs),
+ 'Full': ('BDBStorage.Full', convertBDBStorageArgs),
+ 'Minimal': ('BDBStorage.Minimal', convertBDBStorageArgs),
'Zope2FSStorage': ('Products.AdaptableStorage.Zope2FS', None),
'Zope2SQLStorage': ('Products.AdaptableStorage.Zope2SQL', None),
}
=== Products/DBTab/dbtab.conf.in 1.3 => 1.4 ===
--- Products/DBTab/dbtab.conf.in:1.3 Tue Oct 29 13:20:04 2002
+++ Products/DBTab/dbtab.conf.in Wed Dec 18 17:19:33 2002
@@ -423,6 +423,115 @@
# read_only_fallback=0
+
+######################################################################
+##
+## If you have BDBStorage installed, here is how to set up a
+## Berkeley-backed storage. (A lot of these directions are copied
+## from BerkeleyBase.py.)
+##
+## BDBStorage provides two variants: Full and Minimal. Full provides
+## undo and versioning, while Minimal does not. Choose which one to
+## use in the "type" field.
+##
+######################################################################
+
+# [Storage: Example]
+# type=Full # or Minimal
+
+## Optional env, if given, is a string that names the database
+## environment, i.e. essentially the name of a directory into which
+## BerkeleyDB will store all its supporting files. It is passed
+## directly to DbEnv().open(), which in turn is passed to the
+## BerkeleyDB function DBEnv->open() as the db_home parameter.
+##
+## Note that if you want to customize the underlying Berkeley DB
+## parameters, this directory can contain a DB_CONFIG file as per the
+## Sleepycat documentation.
+
+# env=
+
+## Optional prefix is the string to prepend to name when passed to
+## DB.open() as the dbname parameter. In other words, (prefix +
+## storage name) is passed to the BerkeleyDb function DB->open() as
+## the database parameter. It defaults to "zodb_".
+
+# prefix=zodb_
+
+## Berkeley storages need to be checkpointed occasionally, otherwise
+## automatic recover can take a huge amount of time. You should set
+## up a checkpointing policy which trades off the amount of work done
+## periodically against the recovery time. Note that the Berkeley
+## environment is automatically, and forcefully, checkpointed twice
+## when it is closed.
+##
+## interval indicates how often, in seconds, a Berkeley checkpoint is
+## performed. If this is non-zero, checkpointing is performed by a
+## background thread. Otherwise checkpointing will only be done when
+## the storage is closed. You really want to enable checkpointing. ;
+
+# interval=120
+
+## kbytes is passed directly to txn_checkpoint().
+
+# kbyte=0
+
+## min is passed directly to txn_checkpoint().
+
+# min=0
+
+## You can acheive one of the biggest performance wins by moving the
+## Berkeley log files to a different disk than the data files. We saw
+## between 2.5 and 7 times better performance this way. If not None,
+## logdir is passed to the environment's set_lg_dir() method before it
+## is opened.
+
+# logdir=
+
+## You can also improve performance by tweaking the Berkeley cache
+## size. Berkeley's default cache size is 256KB which is usually too
+## small. Our default cache size is 128MB which seems like a useful
+## tradeoff between resource consumption and improved performance.
+## You might be able to get slightly better results by turning up the
+## cache size, although be mindful of your system's limits. See here
+## for more details:
+##
+## http://www.sleepycat.com/docs/ref/am_conf/cachesize.html
+##
+## cachesize should be the size of the cache in bytes.
+
+# cachesize=135000000
+
+## These attributes control the autopacking thread: ## frequency is
+## the time in seconds after which an autopack phase will be
+## performed. E.g. if frequency is 3600, an autopack will be done
+## once per hour. Set frequency to 0 to disable autopacking (the
+## default).
+
+# frequency=0
+
+## packtime is the time in seconds marking the moment in the past at
+## which to autopack to. E.g. if packtime is 14400, autopack will
+## pack to 4 hours in the past. For Minimal storage, this value is
+## ignored.
+
+# packtime=14400
+
+## classicpack is an integer indicating how often an autopack phase
+## should do a full classic pack. E.g. if classicpack is 24 and
+## frequency is 3600, a classic pack will be performed once per day.
+## Set to zero to never automatically do classic packs. For Minimal
+## storage, this value is ignored -- all packs are classic packs.
+
+# classicpack=0
+
+## read_only causes ReadOnlyError's to be raised whenever any
+## operation (except pack!) might modify the underlying database.
+
+# read_only=0
+
+
+
######################################################################
##
## You can also use custom storages not known to DBTab. Prefix the