参数项
<p class="shortdesc">本文主要介绍可以通过RDS管理控制台修改的主要参数。</p>
<section class="section" id="Supported_Parameters__section_ph4_pyz_jsb"><h2 class="doc-tairway">背景信息</h2>
<p class="p">RDS-MySQL服务提供了参数管理功能,您可以根据业务需求,设置MySQL引擎相关的高级参数,进行性能调优。</p>
</section>
<section class="section" id="Supported_Parameters__section_jgx_4yz_jsb"><h2 class="doc-tairway">参数说明</h2>
<table class="table" id="Supported_Parameters__table_khs_1q5_n5b"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead">
<tr class="row">
<th class="entry" id="Supported_Parameters__table_khs_1q5_n5b__entry__1">
<p class="p">参数</p>
</th>
<th class="entry" id="Supported_Parameters__table_khs_1q5_n5b__entry__2">
<p class="p">默认值</p>
</th>
<th class="entry" id="Supported_Parameters__table_khs_1q5_n5b__entry__3">
<p class="p">是否需要重启实例</p>
</th>
<th class="entry" id="Supported_Parameters__table_khs_1q5_n5b__entry__4">
<p class="p">说明</p>
</th>
</tr>
</thead><tbody class="tbody">
<tr class="row">
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__1 ">
<p class="p">back_log</p>
</td>
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__2 ">
<p class="p">3000</p>
</td>
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__3 ">
<p class="p">是</p>
</td>
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__4 ">
<p class="p">MySQL每处理一个连接请求时都会创建一个新线程与之对应。在主线程创建新线程期间,如果前端应用有大量的短连接请求到达数据库,如果等待的连接数量超过back_log的值,则MySQL将不会接受新的连接请求。如果需要MySQL能够处理大量的短连接,需要提高此参数的大小。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__1 ">
<p class="p">innodb_autoinc_lock_mode</p>
</td>
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__2 ">
<p class="p">1</p>
</td>
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__3 ">
<p class="p">是</p>
</td>
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__4 ">
<p class="p">自增主键的锁机制:</p>
<ul class="ul" id="Supported_Parameters__ul_lhs_1q5_n5b">
<li class="li">0:传统模式</li>
<li class="li">1:递增模式</li>
<li class="li">2:无锁定</li>
</ul>
<p class="p">RDS-MySQL默认取值为1,表示InnoDB使用轻量级别的mutex锁来获取自增锁,替代最原始的表级锁。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__1 ">
<p class="p">query_cache_size</p>
</td>
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__2 ">
<p class="p">3145728</p>
</td>
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__3 ">
<p class="p">否</p>
</td>
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__4 ">
<p class="p">查询缓冲区的最大长度。</p>
<p class="p">默认情况下,不开启,最大缓冲区最大长度为0。</p>
<p class="p">取值需为1024的倍数,否则会向下取最接近的数值。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__1 ">
<p class="p">net_write_timeout</p>
</td>
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__2 ">
<p class="p">60</p>
</td>
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__3 ">
<p class="p">否</p>
</td>
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__4 ">
<p class="p">等待将一个block发送给客户端的超时时间。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__1 ">
<p class="p">tmp_table_size</p>
</td>
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__2 ">
<p class="p">33554432</p>
</td>
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__3 ">
<p class="p">否</p>
</td>
<td class="entry" headers="Supported_Parameters__table_khs_1q5_n5b__entry__4 ">
<p class="p">内部内存临时表的最大值。</p>
<p class="p">如果内存临时表超出了限制,MySQL会自动地把它转化为基于磁盘的MyISAM表。</p>
</td>
</tr>
</tbody></table>
</section>
提交成功!非常感谢您的反馈,我们会继续努力做到更好!