Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-testing > by-pkgid > 91128064e1b251eab84e1c0e3ea0dd7a > files > 196

lib64mysql-devel-5.0.51a-8mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Adaptive Send Algorithm</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.5 -->
<div class="contents">
<h1><a class="anchor" name="secAdapt">Adaptive Send Algorithm </a></h1>At the time of "sending" a transaction (using <a class="el" href="classNdbTransaction.html#361d5a82078f86a5d18923f56d43cc84">NdbTransaction::execute()</a>), the transactions are in reality <em>not</em> immediately transfered to the NDB Kernel. Instead, the "sent" transactions are only kept in a special send list (buffer) in the <a class="el" href="classNdb.html" title="Represents the NDB kernel and is the main class of the NDB API.">Ndb</a> object to which they belong. The adaptive send algorithm decides when transactions should actually be transferred to the NDB kernel.<p>
The NDB API is designed as a multi-threaded interface and so it is often desirable to transfer database operations from more than one thread at a time. The NDB API keeps track of which <a class="el" href="classNdb.html" title="Represents the NDB kernel and is the main class of the NDB API.">Ndb</a> objects are active in transferring information to the NDB kernel and the expected amount of threads to interact with the NDB kernel. Note that a given instance of <a class="el" href="classNdb.html" title="Represents the NDB kernel and is the main class of the NDB API.">Ndb</a> should be used in at most one thread; different threads should <em>not</em> use the same <a class="el" href="classNdb.html" title="Represents the NDB kernel and is the main class of the NDB API.">Ndb</a> object.<p>
There are four conditions leading to the transfer of database operations from <a class="el" href="classNdb.html" title="Represents the NDB kernel and is the main class of the NDB API.">Ndb</a> object buffers to the NDB kernel:<ol type=1>
<li>The NDB Transporter (TCP/IP, OSE, SCI or shared memory) decides that a buffer is full and sends it off. The buffer size is implementation-dependent and may change between MySQL Cluster releases. On TCP/IP the buffer size is usually around 64 KB; on OSE/Delta it is usually less than 2000 bytes. Since each <a class="el" href="classNdb.html" title="Represents the NDB kernel and is the main class of the NDB API.">Ndb</a> object provides a single buffer per storage node, the notion of a "full" buffer is local to this storage node.</li><li>The accumulation of statistical data on transferred information may force sending of buffers to all storage nodes.</li><li>Every 10 ms, a special transmission thread checks whether or not any send activity has occurred. If not, then the thread will force transmission to all nodes. This means that 20 ms is the maximum time database operations are kept waiting before being sent off. The 10-millisecond limit is likely to become a configuration parameter in future releases of MySQL Cluster; however, for checks that are more frequent than each 10 ms, additional support from the operating system is required.</li><li>For methods that are affected by the adaptive send alorithm (such as <a class="el" href="classNdbTransaction.html#361d5a82078f86a5d18923f56d43cc84">NdbTransaction::execute()</a>), there is a <em>force</em> parameter that overrides its default behaviour in this regard and forces immediate transmission to all nodes. See the inidvidual NDB API class listings for more information.</li></ol>
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>The conditions listed above are subject to change in future releases of MySQL Cluster. </dd></dl>
</div>
<hr>
<address>
<small>
<center>
Documentation generated Sun Apr 20 06:25:31 2008 from mysql source files.<br>
&copy; 2003-2004 
<a href="http://www.mysql.com">MySQL AB</a>
<br>
</center>
</small></address>
</body>
</html>