1<!--$Id: memp_openfd.so,v 10.4 2007/11/08 16:28:12 bostic Exp $-->
2<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
3<!--See the file LICENSE for redistribution information.-->
4<html>
5<head>
6<title>Berkeley DB: DB_ENV-&gt;set_mp_max_openfd</title>
7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
9</head>
10<body bgcolor=white>
11<table width="100%"><tr valign=top>
12<td>
13<b>DB_ENV-&gt;set_mp_max_openfd</b>
14</td>
15<td align=right>
16<a href="/api_c/api_core.html"><img src="/images/api.gif" alt="API"></a>
17<a href="/ref/toc.html"><img src="/images/ref.gif" alt="Ref"></a></td>
18</tr></table>
19<hr size=1 noshade>
20<tt>
21<b><pre>
22#include &lt;db.h&gt;
23<p>
24int
25DB_ENV-&gt;set_mp_max_openfd(DB_ENV *env, int maxopenfd);
26<p>
27int
28DB_ENV-&gt;get_mp_max_openfd(DB_ENV *env, int *maxopenfdp);
29</pre></b>
30<hr size=1 noshade>
31<b>Description: DB_ENV-&gt;set_mp_max_openfd</b>
32<p>The DB_ENV-&gt;set_mp_max_openfd method limits the number of file descriptors
33the library will open concurrently when flushing dirty pages from the
34cache.</p>
35<p>The database environment's limit on open file descriptors to flush dirty pages may also be configured using the
36environment's <a href="/ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file.  The syntax of the entry in that
37file is a single line with the string "set_max_openfd", one or more whitespace
38characters, and the number of open file descriptors.
39Because the <a href="/ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file is read when the database environment
40is opened, it will silently overrule configuration done before that
41time.</p>
42<p>The <a href="/api_c/memp_maxwrite.html">DB_ENV-&gt;set_mp_max_write</a> method configures a database environment, not only operations
43performed using the specified <a href="/api_c/env_class.html">DB_ENV</a> handle.</p>
44<p>The DB_ENV-&gt;set_mp_max_openfd method
45returns a non-zero error value on failure
46and 0 on success.
47</p>
48<b>Parameters</b> <br>
49 <b>maxopenfd</b><ul compact><li>The maximum number of file descriptors that may be concurrently opened
50by the library when flushing dirty pages from the cache.</ul>
51<br>
52<br><b>Errors</b>
53<p>The DB_ENV-&gt;set_mp_max_openfd method
54may fail and return one of the following non-zero errors:</p>
55<br>
56<b>EINVAL</b><ul compact><li>An
57invalid flag value or parameter was specified.</ul>
58<br>
59<hr size=1 noshade>
60<b>Description: DB_ENV-&gt;get_mp_max_openfd</b>
61<p>The DB_ENV-&gt;get_mp_max_openfd method returns the maximum number of file descriptors open.</p>
62<p>The DB_ENV-&gt;get_mp_max_openfd method may be called at any time during the life of the
63application.</p>
64<p>The DB_ENV-&gt;get_mp_max_openfd method
65returns a non-zero error value on failure
66and 0 on success.
67</p>
68<b>Parameters</b> <br>
69 <b>maxopenfdp</b><ul compact><li>The DB_ENV-&gt;get_mp_max_openfd method returns  the
70maximum number of file descriptors open in <b>maxopenfdp</b>.</ul>
71<br>
72<hr size=1 noshade>
73<br><b>Class</b>
74<a href="/api_c/env_class.html">DB_ENV</a>, <a href="/api_c/mempfile_class.html">DB_MPOOLFILE</a>
75<br><b>See Also</b>
76<a href="/api_c/memp_list.html">Memory Pools and Related Methods</a>
77</tt>
78<table width="100%"><tr><td><br></td><td align=right>
79<a href="/api_c/api_core.html"><img src="/images/api.gif" alt="API"></a><a href="/ref/toc.html"><img src="/images/ref.gif" alt="Ref"></a>
80</td></tr></table>
81<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
82</body>
83</html>
84