ovdb (5) - Linux Manuals
ovdb: Overview storage method for INN
NAME
ovdb - Overview storage method for INN
DESCRIPTION
Ovdb is a storage method that uses the Berkeley
Ovdb makes use of the full transaction/logging/locking functionality of
the Berkeley
You can override this pathname by adding a path to the option, e.g.,
--with-berkeleydb=/usr/BerkeleyDB.4.4. This directory is expected to
have subdirectories include and lib, containing db.h, and the
library itself, respectively.
The ovdb database may take up more disk space for a given spool than the
other overview methods. Plan on needing at least 1.1
Other parameters for configuring ovdb are in the ovdb.conf(5)
configuration file. See also the sample ovdb.conf.
The lowest allowed minkey is 2. Setting minkey higher than the default is
not recommended, as it will cause the databases to have a lot of overflow
pages. Changing this parameter has no effect on an already-established
database.
If this parameter is set to 0, expireover will compact all newsgroups; if
set to 1, expireover will not compact any newsgroups; and if set to a
value greater than one, expireover will only compact groups that have less
than that number of articles.
Experience has shown that compacting has minimal effect (other than
making expireover take longer) so the default is now 1. This parameter
will probably be removed in the future.
When the readserver parameter is true, the nnrpds will access overview
via a helper server (ovdb_server -- which is started by ovdb_init).
This can also result in cleaner shutdowns for the database, improving
stability and avoiding deadlocks and corrupted databases. If you are
experiencing any instability in ovdb, try setting this parameter to true.
Default is false.
If compression is not enabled (either from the "compress" option in
ovdb.conf or INN was not built from zlib), the database will be backward
compatible with older versions of OVDB. However, if compression is enabled,
the database is marked with a newer version that will prevent older versions
of OVDB from opening the database.
You can upgrade an existing database to use compression simply by setting
compress to true in ovdb.conf. Note that existing records in the
database will remain uncompressed; only new records added after enabling
compression will be compressed.
If you disable compression on a database that previously had it enabled,
new records will be stored uncompressed, but the database will still be
incompatible with older versions of OVDB (and will also be incompatible
with this version of OVDB if it was not built with zlib). So to downgrade
to a completely uncompressed database you will have to rebuild the database
using makehistory.
in the DB_CONFIG file. If the pathname you give starts with a /, it is
treated as an absolute path; otherwise, it is relative to the ``DB_HOME''
directory. Make sure that any directories you specify exist and have
proper ownership/mode before starting INN, because they won't be created
automatically. Also, don't change the DB_CONFIG file while anything that
uses ovdb is running.
Another thing that you can do with this file is to split the overview
database across multiple disks. In the DB_CONFIG file, you can list
directories that Berkeley
For example, let's say that you have pathoverview set to
/mnt/overview and you have four additional file systems created on
/mnt/ov?. You would create a file ``/mnt/overview/DB_CONFIG'' containing
the following lines:
Distribute your ovNNNNN files into the four filesystems. (say, 8 each).
When called upon to open a database file, the db library will look for it
in each of the specified directories (in order). If said file is not
found, one will be created in the first of those directories.
Whenever you change DB_CONFIG or move database files around, make sure all
news processes that use the database are shut down first (including
nnrpds).
The DB_CONFIG functionality is part of Berkeley
And when stopping INN, rc.news kills the ovdb_monitor processes after
the other INN processes have been shut down.
INN programs that use overview will fail to start up if the ovdb_monitor
processes aren't running. Be sure to run ovdb_init before running
anything that accesses overview.
Also, INN programs that use overview will fail to start up if the user
running them is not the ``news'' user.
If a program accessing the database crashes, or otherwise exits uncleanly,
it might leave a stale lock in the database. This lock could cause other
processes to deadlock on that stale lock. To fix this, shut down all news
processes (using "kill -9" if necessary) and then restart. ovdb_init
should perform a recovery operation which will remove the locks and repair
damage caused by killing the deadlocked processes.
$Id: ovdb.pod 9577 2013-12-06 03:54:44Z eagle $
Berkeley
UPGRADING
This is version 2 of ovdb. If you have a database created with a previous
version of ovdb (such as the one shipped with INN INSTALLATION
To build ovdb support into INN, specify the option --with-berkeleydb
when running the configure script. By default, configure will search
for Berkeley CONFIGURATION
To enable ovdb, set the ovmethod parameter in inn.conf to "ovdb".
The ovdb database is stored in the directory specified by the
pathoverview parameter in inn.conf. This is the ``DB_HOME'' directory.
To start out, this directory should be empty (other than an optional
DB_CONFIG file; see DB_CONFIG for details) and innd (or
makehistory) will create the files as necessary in that directory.
Make sure the directory is owned by the news user.
default_minkey = MAX(2, pagesize / 2600) if compress is false
default_minkey = MAX(2, pagesize / 1500) if compress is true
COMPRESSION
New in this version of OVDB is the ability to compress overview data
before it is stored into the database. In addition to consuming less disk
space, compression keeps the average size of the database keys smaller.
This in turn increases the average number of keys per page, which can
significantly improve performance and also helps keep the database more
compact. This feature requires that INN be built with zlib. Only records
larger than 600 bytes get compressed, because that is the point at which
compression starts to become significant.
DB_CONFIG
A file called DB_CONFIG may be placed in the database directory to
customize where the various database files and transaction logs are
written. By default, all of the files are written in the ``DB_HOME''
directory. One way to improve performance is to put the transaction logs
on a different disk. To do this, put:
DB_LOG_DIR /path/to/logs
set_data_dir /mnt/overview
set_data_dir /mnt/ov1
set_data_dir /mnt/ov2
set_data_dir /mnt/ov3
set_data_dir /mnt/ov4
RUNNING
When starting the news system, rc.news will invoke ovdb_init.
ovdb_init must be run before using the database. It performs the
following tasks:
DIAGNOSTICS
Problems relating to ovdb are logged to news.err with ``OVDB'' in the error
message.
FILES
TO DO
Implement a way to limit how many databases can be open at once (to reduce
file descriptor usage); maybe using something similar to the cache code in
ov3.c
HISTORY
Written by Heath Kehoe <hakehoe [at] avalon.net> for InterNetNews
SEE ALSO
inn.conf(5), innd(8), nnrpd(8), ovdb_init(8), ovdb_monitor(8),
ovdb_stat(8)