summaryrefslogtreecommitdiff
path: root/docs/programmer_reference/mp_config.html
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-02-17 17:25:57 +0000
committer <>2015-03-17 16:26:24 +0000
commit780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch)
tree598f8b9fa431b228d29897e798de4ac0c1d3d970 /docs/programmer_reference/mp_config.html
parent7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff)
downloadberkeleydb-master.tar.gz
Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz.HEADdb-6.1.23master
Diffstat (limited to 'docs/programmer_reference/mp_config.html')
-rw-r--r--docs/programmer_reference/mp_config.html111
1 files changed, 60 insertions, 51 deletions
diff --git a/docs/programmer_reference/mp_config.html b/docs/programmer_reference/mp_config.html
index ae7083aa..1c585e4b 100644
--- a/docs/programmer_reference/mp_config.html
+++ b/docs/programmer_reference/mp_config.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -22,9 +22,7 @@
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="mp.html">Prev</a> </td>
- <th width="60%" align="center">Chapter 18. 
- The Memory Pool Subsystem
- </th>
+ <th width="60%" align="center">Chapter 18.  The Memory Pool Subsystem </th>
<td width="20%" align="right"> <a accesskey="n" href="mp_warm.html">Next</a></td>
</tr>
</table>
@@ -38,52 +36,65 @@
</div>
</div>
</div>
- <p>There are two issues to consider when configuring the memory pool.</p>
- <p>The first issue, the most important tuning parameter for Berkeley DB
-applications, is the size of the memory pool. There are two ways to
-specify the pool size. First, calling the <a href="../api_reference/C/envset_cachesize.html" class="olink">DB_ENV-&gt;set_cachesize()</a> method
-specifies the pool size for all of the applications sharing the Berkeley DB
-environment. Second, the <a href="../api_reference/C/dbset_cachesize.html" class="olink">DB-&gt;set_cachesize()</a> method only specifies a
-pool size for the specific database. Note: It is meaningless to call
-<a href="../api_reference/C/dbset_cachesize.html" class="olink">DB-&gt;set_cachesize()</a> for a database opened inside of a Berkeley DB
-environment because the environment pool size will override any pool
-size specified for a single database. For information on tuning the
-Berkeley DB cache size, see
-<a class="xref" href="general_am_conf.html#am_conf_cachesize" title="Selecting a cache size">Selecting a cache size</a>.</p>
<p>
- Note the memory pool defaults to assuming that the average page size is
- 4k. This factor is used to determine the size of the hash table used
- to locate pages in the memory pool. The size of the hash table is
- calculated to so that on average 2.5 pages will be in each hash table
- entry. Each page requires a mutex be allocated to it and the average
- page size is used to determine the number of mutexes to allocate to the
- memory pool.
-</p>
+ There are two issues to consider when configuring the memory
+ pool.
+ </p>
<p>
- Normally you should see good results by using the default values for
- the page size, but in some cases you may be able to achieve better
- performance by manually configuring the page size. The expected page
- size, hash table size and mutex count can be set via the methods:
- <a href="../api_reference/C/envset_mp_pagesize.html" class="olink">DB_ENV-&gt;set_mp_pagesize()</a>, <a href="../api_reference/C/envset_mp_tablesize.html" class="olink">DB_ENV-&gt;set_mp_tablesize()</a>, and <a href="../api_reference/C/envset_mp_mtxcount.html" class="olink">DB_ENV-&gt;set_mp_mtxcount()</a>.
-</p>
- <p>The second memory pool configuration issue is the maximum size an
-underlying file can be and still be mapped into the process address
-space (instead of reading the file's pages into the cache). Mapping
-files into the process address space can result in better performance
-because available virtual memory is often much larger than the local
-cache, and page faults are faster than page copying on many systems.
-However, in the presence of limited virtual memory, it can cause
-resource starvation; and in the presence of large databases, it can
-result in immense process sizes. In addition, because of the
-requirements of the Berkeley DB transactional implementation, only read-only
-files can be mapped into process memory.</p>
- <p>To specify that no files are to be mapped into the process address
-space, specify the <a href="../api_reference/C/dbopen.html#open_DB_NOMMAP" class="olink">DB_NOMMAP</a> flag to the
-<a href="../api_reference/C/envset_flags.html" class="olink">DB_ENV-&gt;set_flags()</a> method. To specify that any individual file should
-not be mapped into the process address space, specify the
-<a href="../api_reference/C/dbopen.html#open_DB_NOMMAP" class="olink">DB_NOMMAP</a> flag to the <a href="../api_reference/C/mempfopen.html" class="olink">DB_MPOOLFILE-&gt;open()</a> interface. To limit
-the size of files mapped into the process address space, use the
-<a href="../api_reference/C/envset_mp_mmapsize.html" class="olink">DB_ENV-&gt;set_mp_mmapsize()</a> method.</p>
+ The first issue, the most important tuning parameter for
+ Berkeley DB applications, is the size of the memory pool.
+ There are two ways to specify the pool size. First, calling
+ the <a href="../api_reference/C/envset_cachesize.html" class="olink">DB_ENV-&gt;set_cachesize()</a> method specifies the pool size for all
+ of the applications sharing the Berkeley DB environment.
+ Second, the <a href="../api_reference/C/dbset_cachesize.html" class="olink">DB-&gt;set_cachesize()</a> method only specifies a pool
+ size for the specific database. Note: It is meaningless to
+ call <a href="../api_reference/C/dbset_cachesize.html" class="olink">DB-&gt;set_cachesize()</a> for a database opened inside of a
+ Berkeley DB environment because the environment pool size will
+ override any pool size specified for a single database. For
+ information on tuning the Berkeley DB cache size, see <a class="xref" href="general_am_conf.html#am_conf_cachesize" title="Selecting a cache size">Selecting a cache size</a>.
+ </p>
+ <p>
+ Note the memory pool defaults to assuming that the average
+ page size is 4k. This factor is used to determine the size of
+ the hash table used to locate pages in the memory pool. The
+ size of the hash table is calculated to so that on average 2.5
+ pages will be in each hash table entry. Each page requires a
+ mutex be allocated to it and the average page size is used to
+ determine the number of mutexes to allocate to the memory
+ pool.
+ </p>
+ <p>
+ Normally you should see good results by using the default
+ values for the page size, but in some cases you may be able to
+ achieve better performance by manually configuring the page
+ size. The expected page size, hash table size and mutex count
+ can be set via the methods: <a href="../api_reference/C/envset_mp_pagesize.html" class="olink">DB_ENV-&gt;set_mp_pagesize()</a>,
+ <a href="../api_reference/C/envset_mp_tablesize.html" class="olink">DB_ENV-&gt;set_mp_tablesize()</a>, and <a href="../api_reference/C/envset_mp_mtxcount.html" class="olink">DB_ENV-&gt;set_mp_mtxcount()</a>.
+ </p>
+ <p>
+ The second memory pool configuration issue is the maximum
+ size an underlying file can be and still be mapped into the
+ process address space (instead of reading the file's pages
+ into the cache). Mapping files into the process address space
+ can result in better performance because available virtual
+ memory is often much larger than the local cache, and page
+ faults are faster than page copying on many systems. However,
+ in the presence of limited virtual memory, it can cause
+ resource starvation; and in the presence of large databases,
+ it can result in immense process sizes. In addition, because
+ of the requirements of the Berkeley DB transactional
+ implementation, only read-only files can be mapped into
+ process memory.
+ </p>
+ <p>
+ To specify that no files are to be mapped into the process
+ address space, specify the <a href="../api_reference/C/dbopen.html#open_DB_NOMMAP" class="olink">DB_NOMMAP</a> flag to the
+ <a href="../api_reference/C/envset_flags.html" class="olink">DB_ENV-&gt;set_flags()</a> method. To specify that any individual file
+ should not be mapped into the process address space, specify
+ the <a href="../api_reference/C/dbopen.html#open_DB_NOMMAP" class="olink">DB_NOMMAP</a> flag to the <a href="../api_reference/C/mempfopen.html" class="olink">DB_MPOOLFILE-&gt;open()</a> interface. To limit
+ the size of files mapped into the process address space, use
+ the <a href="../api_reference/C/envset_mp_mmapsize.html" class="olink">DB_ENV-&gt;set_mp_mmapsize()</a> method.
+ </p>
</div>
<div class="navfooter">
<hr />
@@ -96,9 +107,7 @@ the size of files mapped into the process address space, use the
<td width="40%" align="right"> <a accesskey="n" href="mp_warm.html">Next</a></td>
</tr>
<tr>
- <td width="40%" align="left" valign="top">Chapter 18. 
- The Memory Pool Subsystem
-  </td>
+ <td width="40%" align="left" valign="top">Chapter 18.  The Memory Pool Subsystem  </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>