• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt/router/db-4.8.30/docs/programmer_reference/
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6    <title>Configuring logging</title>
7    <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
8    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9    <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" />
10    <link rel="up" href="log.html" title="Chapter��16.�� The Logging Subsystem" />
11    <link rel="prev" href="log.html" title="Chapter��16.�� The Logging Subsystem" />
12    <link rel="next" href="log_limits.html" title="Log file limits" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">Configuring logging</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="log.html">Prev</a>��</td>
22          <th width="60%" align="center">Chapter��16.��
23		The Logging Subsystem
24        </th>
25          <td width="20%" align="right">��<a accesskey="n" href="log_limits.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="log_config"></a>Configuring logging</h2>
35          </div>
36        </div>
37      </div>
38      <p>The aspects of logging that may be configured are the size of the
39logging subsystem's region, the size of the log files on disk and the
40size of the log buffer in memory.  The <a href="../api_reference/C/envset_lg_regionmax.html" class="olink">DB_ENV-&gt;set_lg_regionmax()</a> method
41specifies the size of the logging subsystem's region, in bytes.  The
42logging subsystem's default size is approximately 60KB.  This value may
43need to be increased if a large number of files are registered with the
44Berkeley DB log manager, for example, by opening a large number of Berkeley DB
45database files in a transactional application.</p>
46      <p>The <a href="../api_reference/C/envset_lg_max.html" class="olink">DB_ENV-&gt;set_lg_max()</a> method specifies the individual log file size for
47all the applications sharing the Berkeley DB environment.  Setting the log
48file size is largely a matter of convenience and a reflection of the
49application's preferences in backup media and frequency.  However,
50setting the log file size too low can potentially cause problems because
51it would be possible to run out of log sequence numbers, which requires
52a full archival and application restart to reset.  See
53<a class="xref" href="log_limits.html" title="Log file limits">Log file limits</a> for more
54information.</p>
55      <p>The <a href="../api_reference/C/envset_lg_bsize.html" class="olink">DB_ENV-&gt;set_lg_bsize()</a> method specifies the size of the in-memory log
56buffer, in bytes.  Log information is stored in memory until the buffer
57fills up or transaction commit forces the buffer to be written to disk.
58Larger buffer sizes can significantly increase throughput in the
59presence of long-running transactions, highly concurrent applications,
60or transactions producing large amounts of data.  By default, the buffer
61is approximately 32KB.</p>
62      <p>The <a href="../api_reference/C/envset_lg_dir.html" class="olink">DB_ENV-&gt;set_lg_dir()</a> method specifies the directory in which
63log files will be placed.  By default, log files are placed in
64the environment home directory.</p>
65      <p>The <a href="../api_reference/C/envset_lg_filemode.html" class="olink">DB_ENV-&gt;set_lg_filemode()</a> method specifies the absolute file mode for
66created log files.  This method is only useful for the rare Berkeley DB
67application that does not control its umask value.</p>
68      <p>The <a href="../api_reference/C/envlog_set_config.html" class="olink">DB_ENV-&gt;log_set_config()</a> method configures several boolean parameters
69that control the use of file system controls such as O_DIRECT and O_DSYNC,
70automatic removal of log files, in-memory logging, and pre-zeroing of logfiles.</p>
71    </div>
72    <div class="navfooter">
73      <hr />
74      <table width="100%" summary="Navigation footer">
75        <tr>
76          <td width="40%" align="left"><a accesskey="p" href="log.html">Prev</a>��</td>
77          <td width="20%" align="center">
78            <a accesskey="u" href="log.html">Up</a>
79          </td>
80          <td width="40%" align="right">��<a accesskey="n" href="log_limits.html">Next</a></td>
81        </tr>
82        <tr>
83          <td width="40%" align="left" valign="top">Chapter��16.��
84		The Logging Subsystem
85        ��</td>
86          <td width="20%" align="center">
87            <a accesskey="h" href="index.html">Home</a>
88          </td>
89          <td width="40%" align="right" valign="top">��Log file limits</td>
90        </tr>
91      </table>
92    </div>
93  </body>
94</html>
95