<!--$Id: extentsize.so,v 1.2 2000/11/20 21:45:19 bostic Exp $--><!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.--><!--All rights reserved.--><html><head><title>Berkeley DB Reference Guide: Selecting a Queue extent size</title><metaname="description"content="Berkeley DB: An embedded database programmatic toolkit."><metaname="keywords"content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++"></head><bodybgcolor=white><aname="2"><!--meow--></a><table><trvalign=top><td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Access Methods</dl></h3></td><tdwidth="1%"><ahref="../../ref/am_conf/recno.html"><imgsrc="../../images/prev.gif"alt="Prev"></a><ahref="../../ref/toc.html"><imgsrc="../../images/ref.gif"alt="Ref"></a><ahref="../../ref/am_conf/re_source.html"><imgsrc="../../images/next.gif"alt="Next"></a></td></tr></table><p><h1align=center>Selecting a Queue extent size</h1><p>In Queue databases, records are allocated sequentially and directlymapped to an offset within the file storage for the database. Asrecords are deleted from the Queue, pages will become empty and willnot be reused in normal queue operations. To facilitate the reclamationof disk space a Queue may be partitioned into extents. Each extent iskept in a separate physical file. Extent files are automaticallycreated as needed and destroyed when they are emptied of records.<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 asingle file and disk space is not reclaimed. In choosing an extent sizethere is a tradeoff between the amount of disk space used and theoverhead of creating and deleting files. If the extent size is toosmall, the system will pay a performance penalty, creating and deletingfiles frequently. In addition, if the active part of the queue spansmany files, all those files will need to be open at the same time,consuming system and process file resources.<table><tr><td><br></td><tdwidth="1%"><ahref="../../ref/am_conf/recno.html"><imgsrc="../../images/prev.gif"alt="Prev"></a><ahref="../../ref/toc.html"><imgsrc="../../images/ref.gif"alt="Ref"></a><ahref="../../ref/am_conf/re_source.html"><imgsrc="../../images/next.gif"alt="Next"></a></td></tr></table><p><fontsize=1><ahref="http://www.sleepycat.com">Copyright Sleepycat Software</a></font></body></html>