<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="innodb-dedicated-server">
      </a>
      17.8.12 Enabling Automatic InnoDB Configuration for a Dedicated MySQL Server
     </h3>
    </div>
   </div>
  </div>
  <p>
   When the server is started with
   <a class="link" href="innodb-parameters.html#option_mysqld_innodb-dedicated-server">
    <code class="option">
     --innodb-dedicated-server
    </code>
   </a>
   ,
   <code class="literal">
    InnoDB
   </code>
   automatically calculates values for and
      sets the following system variables:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_size">
       <code class="literal">
        innodb_buffer_pool_size
       </code>
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="innodb-parameters.html#sysvar_innodb_redo_log_capacity">
       <code class="literal">
        innodb_redo_log_capacity
       </code>
      </a>
     </p>
    </li>
   </ul>
  </div>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    <code class="literal">
     innodb_redo_log_capacity
    </code>
    supersedes both
    <a class="link" href="innodb-parameters.html#sysvar_innodb_log_file_size">
     <code class="literal">
      innodb_log_file_size
     </code>
    </a>
    and
    <a class="link" href="innodb-parameters.html#sysvar_innodb_log_files_in_group">
     <code class="literal">
      innodb_log_files_in_group
     </code>
    </a>
    ,
        which were set by
    <code class="option">
     --innodb-dedicated-server
    </code>
    in
        older versions of MySQL, but which have since been deprecated.
        You should expect
    <code class="literal">
     innodb_log_file_size
    </code>
    and
    <code class="literal">
     innodb_log_files_in_group
    </code>
    to be removed in a
        future version of MySQL.
   </p>
   <p>
    In MySQL 8.0,
    <a class="link" href="innodb-parameters.html#sysvar_innodb_flush_method">
     <code class="literal">
      innodb_flush_method
     </code>
    </a>
    was also
        set automatically by this option, but in MySQL 8.4, this is no
        longer the case.
   </p>
  </div>
  <p>
   You should consider using
   <code class="option">
    --innodb-dedicated-server
   </code>
   only if the MySQL
      instance resides on a dedicated server where it can use all
      available system resources—for example, if you run MySQL
      Server in a Docker container or dedicated VM that runs MySQL only.
      using
   <code class="option">
    --innodb-dedicated-server
   </code>
   is not
      recommended if the MySQL instance shares system resources with
      other applications.
  </p>
  <p>
   The value for each affected variable is determined and applied by
   <code class="option">
    --innodb-dedicated-server
   </code>
   as described in the
      following list:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_size">
       <code class="literal">
        innodb_buffer_pool_size
       </code>
      </a>
     </p>
     <p>
      Buffer pool size is calculated according to the amount of
          memory detected on the server, as shown in the following
          table:
     </p>
     <div class="table">
      <a name="dedicated-server-buffer-pool-size">
      </a>
      <p class="title">
       <b>
        Table 17.8 Automatically Configured Buffer Pool Size
       </b>
      </p>
      <div class="table-contents">
       <table summary="The first column           shows the amount of server memory detected. The second column shows           the buffer pool size which is automatically determined.">
        <colgroup>
         <col style="width: 50%"/>
         <col style="width: 50%"/>
        </colgroup>
        <thead>
         <tr>
          <th>
           Detected Server Memory
          </th>
          <th>
           Buffer Pool Size
          </th>
         </tr>
        </thead>
        <tbody>
         <tr>
          <td>
           Less than 1GB
          </td>
          <td>
           128MB (the default value)
          </td>
         </tr>
         <tr>
          <td>
           1GB to 4GB
          </td>
          <td>
           <em class="replaceable">
            <code>
             detected server memory
            </code>
           </em>
           * 0.5
          </td>
         </tr>
         <tr>
          <td>
           Greater than 4GB
          </td>
          <td>
           <em class="replaceable">
            <code>
             detected server memory
            </code>
           </em>
           * 0.75
          </td>
         </tr>
        </tbody>
       </table>
      </div>
     </div>
     <br class="table-break"/>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="innodb-parameters.html#sysvar_innodb_redo_log_capacity">
       <code class="literal">
        innodb_redo_log_capacity
       </code>
      </a>
     </p>
     <p>
      Redo log capacity is calculated according to the number of
          logical processors available on the server. The formula is
          (number of available logical processors / 2) GB, with a
          maximum dynamic default value of 16 GB.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="innodb-parameters.html#sysvar_innodb_log_file_size">
       <code class="literal">
        innodb_log_file_size
       </code>
      </a>
      (deprecated)
     </p>
     <p>
      Log file size is set according to the automatically configured
          buffer pool size, as shown in the following table:
     </p>
     <div class="table">
      <a name="dedicated-server-log-file-size">
      </a>
      <p class="title">
       <b>
        Table 17.9 Automatically Configured Log File Size
       </b>
      </p>
      <div class="table-contents">
       <table summary="The first column           shows the buffer pool size. The second column shows the log file size           which is automatically determined.">
        <colgroup>
         <col style="width: 50%"/>
         <col style="width: 50%"/>
        </colgroup>
        <thead>
         <tr>
          <th>
           Buffer Pool Size
          </th>
          <th>
           Log File Size
          </th>
         </tr>
        </thead>
        <tbody>
         <tr>
          <td>
           Less than 8GB
          </td>
          <td>
           512MB
          </td>
         </tr>
         <tr>
          <td>
           8GB to 128GB
          </td>
          <td>
           1024MB
          </td>
         </tr>
         <tr>
          <td>
           Greater than 128GB
          </td>
          <td>
           2048MB
          </td>
         </tr>
        </tbody>
       </table>
      </div>
     </div>
     <br class="table-break"/>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="innodb-parameters.html#sysvar_innodb_log_files_in_group">
       <code class="literal">
        innodb_log_files_in_group
       </code>
      </a>
      (deprecated)
     </p>
     <p>
      The number of log files is determined according to the
          automatically configured buffer pool size, as shown in the
          following table:
     </p>
     <div class="table">
      <a name="dedicated-server-log-files">
      </a>
      <p class="title">
       <b>
        Table 17.10 Automatically Configured Number of Log Files
       </b>
      </p>
      <div class="table-contents">
       <table summary="The first column shows           the buffer pool size. The second column shows the number of log files           which is automatically determined.">
        <colgroup>
         <col style="width: 50%"/>
         <col style="width: 50%"/>
        </colgroup>
        <thead>
         <tr>
          <th>
           Buffer Pool Size
          </th>
          <th>
           Number of Log Files
          </th>
         </tr>
        </thead>
        <tbody>
         <tr>
          <td>
           Less than 8GB
          </td>
          <td>
           round(
           <em class="replaceable">
            <code>
             buffer pool size
            </code>
           </em>
           )
          </td>
         </tr>
         <tr>
          <td>
           8GB to 128GB
          </td>
          <td>
           round(
           <em class="replaceable">
            <code>
             buffer pool size
            </code>
           </em>
           * 0.75)
          </td>
         </tr>
         <tr>
          <td>
           Greater than 128GB
          </td>
          <td>
           64
          </td>
         </tr>
        </tbody>
       </table>
      </div>
     </div>
     <br class="table-break"/>
     <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
      <div class="admon-title">
       Note
      </div>
      <p>
       The minimum value for
       <code class="literal">
        innodb_log_files_in_group
       </code>
       value is
       <code class="literal">
        2
       </code>
       ; this lower limit is enforced if the
            rounded buffer pool size value is less than this number.
      </p>
     </div>
    </li>
   </ul>
  </div>
  <p>
   If one of the variables listed previously is set explicitly in an
      option file or elsewhere, this explicit value is used, and a
      startup warning similar to this one is printed to
   <code class="literal">
    stderr
   </code>
   :
  </p>
  <p>
   <span class="errortext">
    [Warning] [000000] InnoDB: Option
      innodb_dedicated_server is ignored for innodb_buffer_pool_size
      because innodb_buffer_pool_size=134217728 is specified
      explicitly.
   </span>
  </p>
  <p>
   Setting one variable explicitly does not prevent the automatic
      configuration of other options.
  </p>
  <p>
   If the server is started with
   <code class="option">
    --innodb-dedicated-server
   </code>
   and
   <a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_size">
    <code class="literal">
     innodb_buffer_pool_size
    </code>
   </a>
   is set
      explicitly, variable settings based on buffer pool size use the
      buffer pool size value calculated according to the amount of
      memory detected on the server rather than the explicitly defined
      buffer pool size value.
  </p>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    Automatic configuration settings are applied by
    <code class="option">
     --innodb-dedicated-server
    </code>
    <span class="emphasis">
     <em>
      only
     </em>
    </span>
    when the MySQL server is started. If
        you later set any of the affected variables explicitly, this
        overrides its predetermined value, and the value that was
        explicitly set is applied. Setting one of these variables to
    <code class="literal">
     DEFAULT
    </code>
    causes it to be set to the actual
        default value as shown in the variable's description in the
        Manual, and does
    <span class="emphasis">
     <em>
      not
     </em>
    </span>
    cause it to revert to
        the value set by
    <code class="option">
     --innodb-dedicated-server
    </code>
    . The
        corresponding system variable
    <code class="literal">
     innodb_dedicated_server
    </code>
    is changed only by
        starting the server with
    <code class="option">
     --innodb-dedicated-server
    </code>
    (or with
    <code class="option">
     --innodb-dedicated-server=ON
    </code>
    or
    <code class="option">
     --innodb-dedicated-server=OFF
    </code>
    ); it is otherwise
        read-only.
   </p>
  </div>
 </div>
 <br/>
</div>
