<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="mysql-cluster-ndbinfo-counters">
      </a>
      25.6.17.13 The ndbinfo counters Table
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045090132512">
  </a>
  <p>
   The
   <code class="literal">
    counters
   </code>
   table provides running totals of
        events such as reads and writes for specific kernel blocks and
        data nodes. Counts are kept from the most recent node start or
        restart; a node start or restart resets all counters on that
        node. Not all kernel blocks have all types of counters.
  </p>
  <p>
   The
   <code class="literal">
    counters
   </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 data node ID
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       block_name
      </code>
     </p>
     <p>
      Name of the associated NDB kernel block (see
      <a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks.html" target="_top">
       NDB Kernel Blocks
      </a>
      ).
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       block_instance
      </code>
     </p>
     <p>
      Block instance
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       counter_id
      </code>
     </p>
     <p>
      The counter's internal ID number; normally an integer
            between 1 and 10, inclusive.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       counter_name
      </code>
     </p>
     <p>
      The name of the counter. See text for names of individual
            counters and the NDB kernel block with which each counter is
            associated.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       val
      </code>
     </p>
     <p>
      The counter's value
     </p>
    </li>
   </ul>
  </div>
  <h5>
   <a name="idm46045090115664">
   </a>
   Notes
  </h5>
  <p>
   Each counter is associated with a particular NDB kernel block.
  </p>
  <p>
   The
   <code class="literal">
    OPERATIONS
   </code>
   counter is associated with the
   <a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks-dblqh.html" target="_top">
    <code class="literal">
     DBLQH
    </code>
   </a>
   (local query handler)
        kernel block. A primary-key read counts as one operation, as
        does a primary-key update. For reads, there is one operation in
   <a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks-dblqh.html" target="_top">
    <code class="literal">
     DBLQH
    </code>
   </a>
   per operation in
   <a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks-dbtc.html" target="_top">
    <code class="literal">
     DBTC
    </code>
   </a>
   . For writes, there is
        one operation counted per fragment replica.
  </p>
  <p>
   The
   <code class="literal">
    ATTRINFO
   </code>
   ,
   <code class="literal">
    TRANSACTIONS
   </code>
   ,
   <code class="literal">
    COMMITS
   </code>
   ,
   <code class="literal">
    READS
   </code>
   ,
   <code class="literal">
    LOCAL_READS
   </code>
   ,
   <code class="literal">
    SIMPLE_READS
   </code>
   ,
   <code class="literal">
    WRITES
   </code>
   ,
   <code class="literal">
    LOCAL_WRITES
   </code>
   ,
   <code class="literal">
    ABORTS
   </code>
   ,
   <code class="literal">
    TABLE_SCANS
   </code>
   , and
   <code class="literal">
    RANGE_SCANS
   </code>
   counters are associated with the
   <a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks-dbtc.html" target="_top">
    <code class="literal">
     DBTC
    </code>
   </a>
   (transaction
        co-ordinator) kernel block.
  </p>
  <p>
   <code class="literal">
    LOCAL_WRITES
   </code>
   and
   <code class="literal">
    LOCAL_READS
   </code>
   are primary-key operations using
        a transaction coordinator in a node that also holds the primary
        fragment replica of the record.
  </p>
  <p>
   The
   <code class="literal">
    READS
   </code>
   counter includes all reads.
   <code class="literal">
    LOCAL_READS
   </code>
   includes only those reads of the
        primary fragment replica on the same node as this transaction
        coordinator.
   <code class="literal">
    SIMPLE_READS
   </code>
   includes only those
        reads in which the read operation is the beginning and ending
        operation for a given transaction. Simple reads do not hold
        locks but are part of a transaction, in that they observe
        uncommitted changes made by the transaction containing them but
        not of any other uncommitted transactions. Such reads are
   <span class="quote">
    “
    <span class="quote">
     simple
    </span>
    ”
   </span>
   from the point of view of the TC block;
        since they hold no locks they are not durable, and once
   <a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks-dbtc.html" target="_top">
    <code class="literal">
     DBTC
    </code>
   </a>
   has routed them to the
        relevant LQH block, it holds no state for them.
  </p>
  <p>
   <code class="literal">
    ATTRINFO
   </code>
   keeps a count of the number of times
        an interpreted program is sent to the data node. See
   <a class="ulink" href="/doc/ndb-internals/en/ndb-internals-ndb-protocol-messages.html" target="_top">
    NDB Protocol Messages
   </a>
   , for more
        information about
   <code class="literal">
    ATTRINFO
   </code>
   messages in the
   <code class="literal">
    NDB
   </code>
   kernel.
  </p>
  <p>
   The
   <code class="literal">
    LOCAL_TABLE_SCANS_SENT
   </code>
   ,
   <code class="literal">
    READS_RECEIVED
   </code>
   ,
   <code class="literal">
    PRUNED_RANGE_SCANS_RECEIVED
   </code>
   ,
   <code class="literal">
    RANGE_SCANS_RECEIVED
   </code>
   ,
   <code class="literal">
    LOCAL_READS_SENT
   </code>
   ,
   <code class="literal">
    CONST_PRUNED_RANGE_SCANS_RECEIVED
   </code>
   ,
   <code class="literal">
    LOCAL_RANGE_SCANS_SENT
   </code>
   ,
   <code class="literal">
    REMOTE_READS_SENT
   </code>
   ,
   <code class="literal">
    REMOTE_RANGE_SCANS_SENT
   </code>
   ,
   <code class="literal">
    READS_NOT_FOUND
   </code>
   ,
   <code class="literal">
    SCAN_BATCHES_RETURNED
   </code>
   ,
   <code class="literal">
    TABLE_SCANS_RECEIVED
   </code>
   , and
   <code class="literal">
    SCAN_ROWS_RETURNED
   </code>
   counters are associated
        with the
   <a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks-dbspj.html" target="_top">
    <code class="literal">
     DBSPJ
    </code>
   </a>
   (select
        push-down join) kernel block.
  </p>
  <p>
   The
   <code class="literal">
    block_name
   </code>
   and
   <code class="literal">
    block_instance
   </code>
   columns provide, respectively,
        the applicable NDB kernel block name and instance number. You
        can use these to obtain information about specific threads from
        the
   <a class="link" href="mysql-cluster-ndbinfo-threadblocks.html" title="25.6.17.62 The ndbinfo threadblocks Table">
    <code class="literal">
     threadblocks
    </code>
   </a>
   table.
  </p>
  <p>
   A number of counters provide information about transporter
        overload and send buffer sizing when troubleshooting such
        issues. For each LQH instance, there is one instance of each
        counter in the following list:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       LQHKEY_OVERLOAD
      </code>
      : Number of primary key
            requests rejected at the LQH block instance due to
            transporter overload
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LQHKEY_OVERLOAD_TC
      </code>
      : Count of instances of
      <code class="literal">
       LQHKEY_OVERLOAD
      </code>
      where the TC node
            transporter was overloaded
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LQHKEY_OVERLOAD_READER
      </code>
      : Count of
            instances of
      <code class="literal">
       LQHKEY_OVERLOAD
      </code>
      where the
            API reader (reads only) node was overloaded.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LQHKEY_OVERLOAD_NODE_PEER
      </code>
      : Count of
            instances of
      <code class="literal">
       LQHKEY_OVERLOAD
      </code>
      where the
            next backup data node (writes only) was overloaded
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LQHKEY_OVERLOAD_SUBSCRIBER
      </code>
      : Count of
            instances of
      <code class="literal">
       LQHKEY_OVERLOAD
      </code>
      where a
            event subscriber (writes only) was overloaded.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LQHSCAN_SLOWDOWNS
      </code>
      : Count of instances
            where a fragment scan batch size was reduced due to scanning
            API transporter overload.
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
