<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="mysql-cluster-ndbinfo-memoryusage">
      </a>
      25.6.17.46 The ndbinfo memoryusage Table
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045088880272">
  </a>
  <p>
   Querying this table provides information similar to that
        provided by the
   <a class="link" href="mysql-cluster-mgm-client-commands.html#ndbclient-report">
    <code class="literal">
     ALL REPORT
        MemoryUsage
    </code>
   </a>
   command in the
   <a class="link" href="mysql-cluster-programs-ndb-mgm.html" title="25.5.5 ndb_mgm — The NDB Cluster Management Client">
    <span class="command">
     <strong>
      ndb_mgm
     </strong>
    </span>
   </a>
   client, or logged by
   <a class="ulink" href="/doc/ndb-internals/en/dump-command-1000.html" target="_top">
    <code class="literal">
     ALL DUMP
        1000
    </code>
   </a>
   .
  </p>
  <p>
   The
   <code class="literal">
    memoryusage
   </code>
   table contains the following
        columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       node_id
      </code>
     </p>
     <p>
      The node ID of this data node.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       memory_type
      </code>
     </p>
     <p>
      One of
      <code class="literal">
       Data memory
      </code>
      ,
      <code class="literal">
       Index
            memory
      </code>
      , or
      <code class="literal">
       Long message buffer
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       used
      </code>
     </p>
     <p>
      Number of bytes currently used for data memory or index
            memory by this data node.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       used_pages
      </code>
     </p>
     <p>
      Number of pages currently used for data memory or index
            memory by this data node; see text.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       total
      </code>
     </p>
     <p>
      Total number of bytes of data memory or index memory
            available for this data node; see text.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       total_pages
      </code>
     </p>
     <p>
      Total number of memory pages available for data memory or
            index memory on this data node; see text.
     </p>
    </li>
   </ul>
  </div>
  <h5>
   <a name="idm46045088859200">
   </a>
   Notes
  </h5>
  <p>
   The
   <code class="literal">
    total
   </code>
   column represents the total amount
        of memory in bytes available for the given resource (data memory
        or index memory) on a particular data node. This number should
        be approximately equal to the setting of the corresponding
        configuration parameter in the
   <code class="filename">
    config.ini
   </code>
   file.
  </p>
  <p>
   Suppose that the cluster has 2 data nodes having node IDs
   <code class="literal">
    5
   </code>
   and
   <code class="literal">
    6
   </code>
   , and the
   <code class="filename">
    config.ini
   </code>
   file contains the following:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-ini"><div class="docs-select-all right" id="sa79085299"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ini"><span class="token selector">[ndbd default]</span>
<span class="token constant">DataMemory</span> <span class="token attr-value"><span class="token punctuation">=</span> 1G</span>
<span class="token constant">IndexMemory</span> <span class="token attr-value"><span class="token punctuation">=</span> 1G</span></code></pre>
  </div>
  <p>
   Suppose also that the value of the
   <a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-longmessagebuffer">
    <code class="literal">
     LongMessageBuffer
    </code>
   </a>
   configuration parameter is allowed to assume its default (64
        MB).
  </p>
  <p>
   The following query shows approximately the same values:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa24489953"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> node_id<span class="token punctuation">,</span> memory_type<span class="token punctuation">,</span> total
     <span class="token operator">&gt;</span> <span class="token keyword">FROM</span> ndbinfo<span class="token punctuation">.</span>memoryusage<span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> node_id <span class="token punctuation">|</span> memory_type         <span class="token punctuation">|</span> total      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span>       5 <span class="token punctuation">|</span> Data memory         <span class="token punctuation">|</span> 1073741824 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>       5 <span class="token punctuation">|</span> Index memory        <span class="token punctuation">|</span> 1074003968 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>       5 <span class="token punctuation">|</span> Long message buffer <span class="token punctuation">|</span>   67108864 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>       6 <span class="token punctuation">|</span> Data memory         <span class="token punctuation">|</span> 1073741824 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>       6 <span class="token punctuation">|</span> Index memory        <span class="token punctuation">|</span> 1074003968 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>       6 <span class="token punctuation">|</span> Long message buffer <span class="token punctuation">|</span>   67108864 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">6 rows in set (0.00 sec)</span></code></pre>
  </div>
  <p>
   In this case, the
   <code class="literal">
    total
   </code>
   column values for
        index memory are slightly higher than the value set of
   <a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-indexmemory">
    <code class="literal">
     IndexMemory
    </code>
   </a>
   due to
        internal rounding.
  </p>
  <p>
   For the
   <code class="literal">
    used_pages
   </code>
   and
   <code class="literal">
    total_pages
   </code>
   columns, resources are measured
        in pages, which are 32K in size for
   <a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-datamemory">
    <code class="literal">
     DataMemory
    </code>
   </a>
   and 8K for
   <a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-indexmemory">
    <code class="literal">
     IndexMemory
    </code>
   </a>
   . For long
        message buffer memory, the page size is 256 bytes.
  </p>
 </div>
 <br/>
</div>
