extentsize.html   [plain text]


<!--$Id: extentsize.so,v 1.3 2001/05/02 15:53:22 bostic Exp $-->
<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB Reference Guide: Selecting a Queue extent size</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><b><dl><dt>Berkeley DB Reference Guide:<dd>Access Methods</dl></b></td>
<td align=right><a href="../am_conf/recno.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../am_conf/re_source.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p align=center><b>Selecting a Queue extent size</b></p>
<p>In Queue databases, records are allocated sequentially and directly
mapped to an offset within the file storage for the database.  As
records are deleted from the Queue, pages will become empty and will
not be reused in normal queue operations.  To facilitate the reclamation
of disk space a Queue may be partitioned into extents.  Each extent is
kept in a separate physical file.</p>
<p>Extent files are automatically created as needed and marked for deletion
when the head of the queue moves off the extent.  The extent will not
be deleted until all processes close the extent.  In addition, Berkeley DB
caches a small number of extents that have been recently used; this may
delay when an extent will be deleted. The number of extents left open
depends on queue activity.</p>
<p>The extent size specifies the number of pages that make up each extent.
By default, if no extent size is specified, the Queue resides in a
single file and disk space is not reclaimed.  In choosing an extent size
there is a tradeoff between the amount of disk space used and the
overhead of creating and deleting files.  If the extent size is too
small, the system will pay a performance penalty, creating and deleting
files frequently.  In addition, if the active part of the queue spans
many files, all those files will need to be open at the same time,
consuming system and process file resources.</p>
<table width="100%"><tr><td><br></td><td align=right><a href="../am_conf/recno.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../am_conf/re_source.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
</body>
</html>