Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2809643
  • 博文数量: 587
  • 博客积分: 6356
  • 博客等级: 准将
  • 技术积分: 6410
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-23 10:54
个人简介

器量大者,福泽必厚

文章分类

全部博文(587)

文章存档

2019年(3)

2018年(1)

2017年(29)

2016年(39)

2015年(66)

2014年(117)

2013年(136)

2012年(58)

2011年(34)

2010年(50)

2009年(38)

2008年(16)

分类: LINUX

2016-07-28 11:01:00

How to decrease InnoDB shutdown times

  | April 15, 2009 |  Posted In: Insight for DBAs

Sometimes a MySQL server running InnoDB takes a long time to shut down. The usual culprit is flushing dirty pages from the buffer pool. These are pages that have been modified in memory, but not on disk.

If you kill the server before it finishes this process, it will just go through the recovery phase on startup, which can be even slower in stock InnoDB than the shutdown process, for a variety of reasons.

One way to decrease the shutdown time is to pre-flush the dirty pages, like this:



Now run the following command:


And wait until it approaches zero. (If the server is being actively used, it won’t get to zero.)

Once it’s pretty low, you can perform the shutdown and there’ll be a lot less unfinished work to do, so the server should shut down more quickly.
我的例子:
 mysqladmin -uroot -p'***1' ext -i 1 |grep "Innodb_buffer_pool_pages_dirty"
会看到数目一直在减少,当减少接近于0时关闭即可!

阅读(1531) | 评论(0) | 转发(0) |
0

上一篇:yum repository 不可用

下一篇:zabbix 断图处理

给主人留下些什么吧!~~