<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="mysql-cluster-config-send-buffers">
      </a>
      25.4.3.14 Configuring NDB Cluster Send Buffer Parameters
     </h4>
    </div>
   </div>
  </div>
  <p>
   The
   <code class="literal">
    NDB
   </code>
   kernel employs a unified send buffer
        whose memory is allocated dynamically from a pool shared by all
        transporters. This means that the size of the send buffer can be
        adjusted as necessary. Configuration of the unified send buffer
        can accomplished by setting the following parameters:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <b>
       TotalSendBufferMemory.
      </b>
      This parameter can be set for all types of NDB Cluster
              nodes—that is, it can be set in the
      <code class="literal">
       [ndbd]
      </code>
      ,
      <code class="literal">
       [mgm]
      </code>
      , and
      <code class="literal">
       [api]
      </code>
      (or
      <code class="literal">
       [mysql]
      </code>
      )
              sections of the
      <code class="filename">
       config.ini
      </code>
      file. It
              represents the total amount of memory (in bytes) to be
              allocated by each node for which it is set for use among
              all configured transporters. If set, its minimum is 256KB;
              the maximum is 4294967039.
     </p>
     <p>
      To be backward-compatible with existing configurations, this
            parameter takes as its default value the sum of the maximum
            send buffer sizes of all configured transporters, plus an
            additional 32KB (one page) per transporter. The maximum
            depends on the type of transporter, as shown in the
            following table:
     </p>
     <div class="table">
      <a name="idm46045108533600">
      </a>
      <p class="title">
       <b>
        Table 25.22 Transporter types with maximum send buffer sizes
       </b>
      </p>
      <div class="table-contents">
       <table>
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <thead>
         <tr>
          <th>
           Transporter
          </th>
          <th>
           Maximum Send Buffer Size (bytes)
          </th>
         </tr>
        </thead>
        <tbody>
         <tr>
          <td>
           TCP
          </td>
          <td>
           <a class="link" href="mysql-cluster-tcp-definition.html#ndbparam-tcp-sendbuffermemory">
            <code class="literal">
             SendBufferMemory
            </code>
           </a>
           (default = 2M)
          </td>
         </tr>
         <tr>
          <td>
           SHM
          </td>
          <td>
           20K
          </td>
         </tr>
        </tbody>
       </table>
      </div>
     </div>
     <br class="table-break"/>
     <p>
      This enables existing configurations to function in close to
            the same way as they did with NDB Cluster 6.3 and earlier,
            with the same amount of memory and send buffer space
            available to each transporter. However, memory that is
            unused by one transporter is not available to other
            transporters.
     </p>
    </li>
    <li class="listitem">
     <p>
      <b>
       OverloadLimit.
      </b>
      This parameter is used in the
      <code class="literal">
       config.ini
      </code>
      file
      <code class="literal">
       [tcp]
      </code>
      section, and denotes the amount
              of unsent data (in bytes) that must be present in the send
              buffer before the connection is considered overloaded.
              When such an overload condition occurs, transactions that
              affect the overloaded connection fail with NDB API Error
              1218 (
      <span class="errortext">
       Send Buffers overloaded in NDB
              kernel
      </span>
      ) until the overload status passes. The
              default value is 0, in which case the effective overload
              limit is calculated as
      <code class="literal">
       SendBufferMemory *
              0.8
      </code>
      for a given connection. The maximum value
              for this parameter is 4G.
     </p>
    </li>
    <li class="listitem">
     <p>
      <b>
       SendBufferMemory.
      </b>
      This value denotes a hard limit for the amount of memory
              that may be used by a single transporter out of the entire
              pool specified by
      <a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-totalsendbuffermemory">
       <code class="literal">
        TotalSendBufferMemory
       </code>
      </a>
      .
              However, the sum of
      <code class="literal">
       SendBufferMemory
      </code>
      for all configured transporters may be greater than the
      <a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-totalsendbuffermemory">
       <code class="literal">
        TotalSendBufferMemory
       </code>
      </a>
      that is set for a given node. This is a way to save memory
              when many nodes are in use, as long as the maximum amount
              of memory is never required by all transporters at the
              same time.
     </p>
    </li>
   </ul>
  </div>
  <p>
   You can use the
   <a class="link" href="mysql-cluster-ndbinfo-transporters.html" title="25.6.17.66 The ndbinfo transporters Table">
    <code class="literal">
     ndbinfo.transporters
    </code>
   </a>
   table to
        monitor send buffer memory usage, and to detect slowdown and
        overload conditions that can adversely affect performance.
  </p>
 </div>
 <br/>
</div>
