<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="thread-pool">
      </a>
      7.6.3 MySQL Enterprise Thread Pool
     </h3>
    </div>
   </div>
  </div>
  <div class="toc">
   <dl class="toc">
    <dt>
     <span class="section">
      <a href="thread-pool-elements.html">
       7.6.3.1 Thread Pool Elements
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="thread-pool-installation.html">
       7.6.3.2 Thread Pool Installation
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="thread-pool-operation.html">
       7.6.3.3 Thread Pool Operation
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="thread-pool-tuning.html">
       7.6.3.4 Thread Pool Tuning
      </a>
     </span>
    </dt>
   </dl>
  </div>
  <a class="indexterm" name="idm46045256870816">
  </a>
  <a class="indexterm" name="idm46045256869760">
  </a>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    MySQL Enterprise Thread Pool is an extension included in MySQL Enterprise Edition, a commercial product.
        To learn more about commercial products,
    <a class="ulink" href="https://www.mysql.com/products/" target="_blank">
     https://www.mysql.com/products/
    </a>
    .
   </p>
  </div>
  <p>
   MySQL Enterprise Edition includes MySQL Enterprise Thread Pool, implemented using a server plugin. The
      default thread-handling model in MySQL Server executes statements
      using one thread per client connection. As more clients connect to
      the server and execute statements, overall performance degrades.
      The thread pool plugin provides an alternative thread-handling
      model designed to reduce overhead and improve performance. The
      plugin implements a thread pool that increases server performance
      by efficiently managing statement execution threads for large
      numbers of client connections.
  </p>
  <p>
   The thread pool addresses several problems of the model that uses
      one thread per connection:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      Too many thread stacks make CPU caches almost useless in
          highly parallel execution workloads. The thread pool promotes
          thread stack reuse to minimize the CPU cache footprint.
     </p>
    </li>
    <li class="listitem">
     <p>
      With too many threads executing in parallel, context switching
          overhead is high. This also presents a challenge to the
          operating system scheduler. The thread pool controls the
          number of active threads to keep the parallelism within the
          MySQL server at a level that it can handle and that is
          appropriate for the server host on which MySQL is executing.
     </p>
    </li>
    <li class="listitem">
     <p>
      Too many transactions executing in parallel increases resource
          contention. In
      <a class="link" href="innodb-storage-engine.html" title="Chapter 17 The InnoDB Storage Engine">
       <code class="literal">
        InnoDB
       </code>
      </a>
      , this
          increases the time spent holding central mutexes. The thread
          pool controls when transactions start to ensure that not too
          many execute in parallel.
     </p>
    </li>
   </ul>
  </div>
  <h4>
   <a name="idm46045256860304">
   </a>
   Additional Resources
  </h4>
  <p>
   <a class="xref" href="faqs-thread-pool.html" title="A.15 MySQL 8.4 FAQ: MySQL Enterprise Thread Pool">
    Section A.15, “MySQL 8.4 FAQ: MySQL Enterprise Thread Pool”
   </a>
  </p>
 </div>
 <br/>
</div>
