###

Berkeley DB Reference Guide:
  Logging Subsystem

# Configuring logging

The two aspects of logging that may be configured are the size of log files on disk and the size of the log buffer in memory. The DBENV->set_lg_max interface specifies the individual log file size for all of the applications sharing the Berkeley DB environment. Setting the log file size is largely a matter of convenience, and a reflection of the application's preferences in backup media and frequency. However, setting the log file size too low can potentially cause problems as it would be possible to run out of log sequence numbers, which requires a full archival and application restart to reset. See the Log file limits section for more information.

The DBENV->set_lg_bsize interface specifies the size of the in-memory log buffer, in bytes. Log information is stored in memory until the buffer fills up or transaction commit forces the buffer to be written to disk. Larger buffer sizes can significantly increase throughput in the presence of long running transactions, highly concurrent applications, or transactions producing large amounts of data. By default, the buffer is 32KB.

Copyright Sleepycat Software