summaryrefslogtreecommitdiff
path: root/docs/programmer_reference/env_size.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/env_size.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/env_size.html')
-rw-r--r--docs/programmer_reference/env_size.html139
1 files changed, 72 insertions, 67 deletions
diff --git a/docs/programmer_reference/env_size.html b/docs/programmer_reference/env_size.html
index 78f1398d..de849860 100644
--- a/docs/programmer_reference/env_size.html
+++ b/docs/programmer_reference/env_size.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="env_create.html">Prev</a> </td>
- <th width="60%" align="center">Chapter 9. 
- The Berkeley DB Environment
- </th>
+ <th width="60%" align="center">Chapter 9.  The Berkeley DB Environment </th>
<td width="20%" align="right"> <a accesskey="n" href="env_open.html">Next</a></td>
</tr>
</table>
@@ -40,15 +38,16 @@
</div>
<p>
The Berkeley DB environment allocates memory to hold shared
- structures, either in shared regions or in process data space (if the
- <a href="../api_reference/C/envopen.html#envopen_DB_PRIVATE" class="olink">DB_PRIVATE</a> flag is specified). There are three distinct memory
- regions:
+ structures, either in shared regions or in process data space
+ (if the <a href="../api_reference/C/envopen.html#envopen_DB_PRIVATE" class="olink">DB_PRIVATE</a> flag is specified). There are three
+ distinct memory regions:
</p>
<div class="itemizedlist">
<ul type="disc">
<li>
<p>
- The memory pool (also known as the database page cache),
+ The memory pool (also known as the database page
+ cache),
</p>
</li>
<li>
@@ -57,32 +56,32 @@
</p>
</li>
<li>
- <p>
- the main region which holds all other shared structures.
+ <p>
+ the main region which holds all other shared
+ structures.
</p>
</li>
</ul>
</div>
<p>
- The shared structures in the main region are used by the lock,
- transaction, logging, thread and replicatoin subsystems.
+ The shared structures in the main region are used by the
+ lock, transaction, logging, thread and replicatoin subsystems.
</p>
<p>
- Determining the amount of space allocated for each of these shared
- structures is dependent upon the structure in question. The sizing
- of the memory pool is discussed in
- <a class="xref" href="mp_config.html" title="Configuring the memory pool">Configuring the memory pool</a>. The amount
- of memory needed for mutexes is calculated from the number of
- mutexes needed by various subsystems and can be adjusted using the
- <a href="../api_reference/C/mutexset_increment.html" class="olink">DB_ENV-&gt;mutex_set_increment()</a> method.
+ Determining the amount of space allocated for each of these
+ shared structures is dependent upon the structure in question.
+ The sizing of the memory pool is discussed in <a class="xref" href="mp_config.html" title="Configuring the memory pool">Configuring the memory pool</a>. The
+ amount of memory needed for mutexes is calculated from the
+ number of mutexes needed by various subsystems and can be
+ adjusted using the <a href="../api_reference/C/mutexset_increment.html" class="olink">DB_ENV-&gt;mutex_set_increment()</a> method.
</p>
<p>
- For applications using shared memory (that is, they do not specify
- <a href="../api_reference/C/envopen.html#envopen_DB_PRIVATE" class="olink">DB_PRIVATE</a>), a maximum memory size for the main region must be
- specified or left to default. The maximum memory size is specified
- using the <a href="../api_reference/C/envset_memory_max.html" class="olink">DB_ENV-&gt;set_memory_max()</a> method.
+ For applications using shared memory (that is, they do not
+ specify <a href="../api_reference/C/envopen.html#envopen_DB_PRIVATE" class="olink">DB_PRIVATE</a>), a maximum memory size for the main
+ region must be specified or left to default. The maximum
+ memory size is specified using the <a href="../api_reference/C/envset_memory_max.html" class="olink">DB_ENV-&gt;set_memory_max()</a> method.
</p>
- <p>
+ <p>
The amount of memory needed by an application is dependent
on the resources that the application uses. For a very rough
estimate, add all of the following together:
@@ -90,37 +89,40 @@
<div class="orderedlist">
<ol type="1">
<li>
- <p>
- The environment has an overhead of about 80 kilobytes
- without statistics enabled or 250 kilobytes with statistics
- enabled.
+ <p>
+ The environment has an overhead of about 80
+ kilobytes without statistics enabled or 250 kilobytes
+ with statistics enabled.
</p>
</li>
<li>
<p>
- Identify the amount of space you require for your locks:
+ Identify the amount of space you require for your
+ locks:
</p>
<div class="orderedlist">
<ol type="a">
<li>
- <p>
- Estimate the number of threads of control that will
- simultaneously access the environment.
+ <p>
+ Estimate the number of threads of control
+ that will simultaneously access the
+ environment.
</p>
</li>
<li>
- <p>
- Estimate the number of concurrency locks that, on average,
- will be required by each thread. For information on
- sizing concurrency locks, see
- <a class="xref" href="lock_max.html" title="Configuring locking: sizing the system">Configuring locking: sizing the system</a>.
+ <p>
+ Estimate the number of concurrency locks
+ that, on average, will be required by each
+ thread. For information on sizing concurrency
+ locks, see <a class="xref" href="lock_max.html" title="Configuring locking: sizing the system">Configuring locking: sizing the
+ system</a>.
</p>
</li>
<li>
- <p>
- Multiply these two numbers, then multiply by 1/2 to
- arrive at the number of kilobytes required to
- service your locks.
+ <p>
+ Multiply these two numbers, then multiply
+ by 1/2 to arrive at the number of kilobytes
+ required to service your locks.
</p>
</li>
</ol>
@@ -128,44 +130,45 @@
</li>
<li>
<p>
- Estimate the number of open database handles you will use
- at any given time. For each database handle, there is an
- overhead of about 1/2 kilobyte.
+ Estimate the number of open database handles you
+ will use at any given time. For each database handle,
+ there is an overhead of about 1/2 kilobyte.
</p>
</li>
<li>
<p>
- Add 1 kilobyte for each active transaction.
+ Add 1 kilobyte for each active transaction.
</p>
</li>
</ol>
</div>
<p>
Note that these are very rough guidelines. It is best to
- overestimate the needs of your applications, because if the memory
- allocation is exhausted the application must be shutdown to
- increase the allocation.
+ overestimate the needs of your applications, because if the
+ memory allocation is exhausted the application must be
+ shutdown to increase the allocation.
</p>
<p>
The estimate for maximum memory need not be exact. In most
- situations there is little penalty for over estimating. For systems
- using memory mapped files for the shared environment, this only
- allocates the address space in the process to hold the maximum
- memory. The backing file will only be extended as needed. For
- systems running with <a href="../api_reference/C/envopen.html#envopen_DB_PRIVATE" class="olink">DB_PRIVATE</a> specified, the maximum memory
- serves only as a limit and memory is allocated from the process
- data space as needed. No maximum need be set for private
- environments.
+ situations there is little penalty for over estimating. For
+ systems using memory mapped files for the shared environment,
+ this only allocates the address space in the process to hold
+ the maximum memory. The backing file will only be extended as
+ needed. For systems running with <a href="../api_reference/C/envopen.html#envopen_DB_PRIVATE" class="olink">DB_PRIVATE</a> specified, the
+ maximum memory serves only as a limit and memory is allocated
+ from the process data space as needed. No maximum need be set
+ for private environments.
</p>
- <p>
- For locking and thread information, groups of objects are allocated
- when needed so that there is less contention in the allocator
- during performance critical operations. Once allocated to a
- particular use, this memory will only be used for that structure.
- To avoid runtime contention, or to ensure a minimum number of a
- particular type of object, the <a href="../api_reference/C/envset_memory_init.html" class="olink">DB_ENV-&gt;set_memory_init()</a> method can be
- used. This method can set the initial numbers of particular types
- of structures to allocate at environment creation time.
+ <p>
+ For locking and thread information, groups of objects are
+ allocated when needed so that there is less contention in the
+ allocator during performance critical operations. Once
+ allocated to a particular use, this memory will only be used
+ for that structure. To avoid runtime contention, or to ensure
+ a minimum number of a particular type of object, the
+ <a href="../api_reference/C/envset_memory_init.html" class="olink">DB_ENV-&gt;set_memory_init()</a> method can be used. This method can set
+ the initial numbers of particular types of structures to
+ allocate at environment creation time.
</p>
</div>
<div class="navfooter">
@@ -179,11 +182,13 @@
<td width="40%" align="right"> <a accesskey="n" href="env_open.html">Next</a></td>
</tr>
<tr>
- <td width="40%" align="left" valign="top">Creating a database environment </td>
+ <td width="40%" align="left" valign="top">Creating a database
+ environment </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
- <td width="40%" align="right" valign="top"> Opening databases within the environment</td>
+ <td width="40%" align="right" valign="top"> Opening databases within the
+ environment</td>
</tr>
</table>
</div>