summaryrefslogtreecommitdiff
path: root/db/docs/ref/log/limits.html
blob: 4d69722263a02bb162b0198ca8b83f62c4bdad6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!--$Id: limits.so,v 10.26 2004/08/13 03:48:05 bostic Exp $-->
<!--Copyright 1997-2006 by Oracle Corporation-->
<!--All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB Reference Guide: Log file limits</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<a name="2"><!--meow--></a>
<table width="100%"><tr valign=top>
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Logging Subsystem</dl></h3></td>
<td align=right><a href="../log/config.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../mp/intro.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p>
<h3 align=center>Log file limits</h3>
<p>Log filenames and sizes impose a limit on how long databases may be
used in a Berkeley DB database environment.  It is quite unlikely that an
application will reach this limit; however, if the limit is reached,
the Berkeley DB environment's databases must be dumped and reloaded.</p>
<p>The log filename consists of <b>log.</b> followed by 10 digits, with
a maximum of 2,000,000,000 log files.  Consider an application performing
6000 transactions per second for 24 hours a day, logged into 10MB log
files, in which each transaction is logging approximately 500 bytes of data.
The following calculation:</p>
<blockquote><pre>(10 * 2^20 * 2000000000) / (6000 * 500 * 365 * 60 * 60 * 24) = ~221</pre></blockquote>
<p>indicates that the system will run out of log filenames in roughly 221
years.</p>
<p>There is no way to reset the log filename space in Berkeley DB.  If your
application is reaching the end of its log filename space, you must do
the following:</p>
<ol>
<p><li>Archive your databases as if to prepare for catastrophic failure (see
<a href="../../ref/transapp/archival.html">Database and log file archival</a>
for more information).
<p><li>Reset the database's log sequence numbers (see the <b>-r</b> option
to the <a href="../../utility/db_load.html">db_load</a> utility for more information).
<p><li>Remove all of the log files from the database environment.  (This is the
only situation in which all the log files are removed from an environment;
in all other cases, at least a single log file is retained.)
<p><li>Restart your application.
</ol>
<table width="100%"><tr><td><br></td><td align=right><a href="../log/config.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../mp/intro.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996-2006 Oracle Corporation - All rights reserved.</font>
</body>
</html>