<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to decrease InnoDB shutdown times</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2009/04/15/how-to-decrease-innodb-shutdown-times/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2009/04/15/how-to-decrease-innodb-shutdown-times/</link>
	<description>Everything about MySQL Performance</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:23:57 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: kerja keras</title>
		<link>http://www.mysqlperformanceblog.com/2009/04/15/how-to-decrease-innodb-shutdown-times/comment-page-1/#comment-666392</link>
		<dc:creator>kerja keras</dc:creator>
		<pubDate>Mon, 19 Oct 2009 03:39:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=660#comment-666392</guid>
		<description>great tips, its very helpful. thanks for share</description>
		<content:encoded><![CDATA[<p>great tips, its very helpful. thanks for share</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Baron Schwartz</title>
		<link>http://www.mysqlperformanceblog.com/2009/04/15/how-to-decrease-innodb-shutdown-times/comment-page-1/#comment-561186</link>
		<dc:creator>Baron Schwartz</dc:creator>
		<pubDate>Thu, 14 May 2009 17:36:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=660#comment-561186</guid>
		<description>Kayra, it can become negative because the insert buffer survives after restart and merging can continue after the server is started again.  Peter tells me he has seen servers take weeks to catch up in some cases!</description>
		<content:encoded><![CDATA[<p>Kayra, it can become negative because the insert buffer survives after restart and merging can continue after the server is started again.  Peter tells me he has seen servers take weeks to catch up in some cases!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kayra Otaner</title>
		<link>http://www.mysqlperformanceblog.com/2009/04/15/how-to-decrease-innodb-shutdown-times/comment-page-1/#comment-561178</link>
		<dc:creator>Kayra Otaner</dc:creator>
		<pubDate>Thu, 14 May 2009 16:16:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=660#comment-561178</guid>
		<description>Even after all the updating threads shut down, you&#039;ll see Innodb_buffer_pool_pages_dirty count approaching to 0 but still increasing sometimes. This is because of InnoDB merges, you can observe this using &#039;show engine innodb status\G&#039;. Only when all the merges are completed pages_dirty count will be 0 and stay at zero. To calculate how many merges still need to be done :
Under &quot;INSERT BUFFER AND ADAPTIVE HASH INDEX&quot; section difference between &#039;Inserts&#039; and &#039;merged recs&#039; will show how many to go. Example :

-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 4185, free list len 3748, seg size 7934,
65171060 inserts, 65171060 merged recs, 10552858 merges
Hash table size 7055701, used cells 32410, node heap has 33 buffer(s)

65171060 - 65171060 = 0

this means that Innodb_buffer_pool_pages_dirty should be 0 and stay at 0. Please note this calculation works most of the time, but sometimes &#039;inserts&#039; - &#039;merged recs&#039; value goes negative values.</description>
		<content:encoded><![CDATA[<p>Even after all the updating threads shut down, you&#8217;ll see Innodb_buffer_pool_pages_dirty count approaching to 0 but still increasing sometimes. This is because of InnoDB merges, you can observe this using &#8217;show engine innodb status\G&#8217;. Only when all the merges are completed pages_dirty count will be 0 and stay at zero. To calculate how many merges still need to be done :<br />
Under &#8220;INSERT BUFFER AND ADAPTIVE HASH INDEX&#8221; section difference between &#8216;Inserts&#8217; and &#8216;merged recs&#8217; will show how many to go. Example :</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
INSERT BUFFER AND ADAPTIVE HASH INDEX<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Ibuf: size 4185, free list len 3748, seg size 7934,<br />
65171060 inserts, 65171060 merged recs, 10552858 merges<br />
Hash table size 7055701, used cells 32410, node heap has 33 buffer(s)</p>
<p>65171060 &#8211; 65171060 = 0</p>
<p>this means that Innodb_buffer_pool_pages_dirty should be 0 and stay at 0. Please note this calculation works most of the time, but sometimes &#8216;inserts&#8217; &#8211; &#8216;merged recs&#8217; value goes negative values.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wagner Bianchi</title>
		<link>http://www.mysqlperformanceblog.com/2009/04/15/how-to-decrease-innodb-shutdown-times/comment-page-1/#comment-542369</link>
		<dc:creator>Wagner Bianchi</dc:creator>
		<pubDate>Sat, 18 Apr 2009 01:47:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=660#comment-542369</guid>
		<description>This is a very good idea.
So nice.</description>
		<content:encoded><![CDATA[<p>This is a very good idea.<br />
So nice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Burton</title>
		<link>http://www.mysqlperformanceblog.com/2009/04/15/how-to-decrease-innodb-shutdown-times/comment-page-1/#comment-541960</link>
		<dc:creator>Kevin Burton</dc:creator>
		<pubDate>Fri, 17 Apr 2009 16:51:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=660#comment-541960</guid>
		<description>Another note... we have three replicas of everything.

When we restart an InnoDB box it is taken out of production and does not serve requests.

Then we flush the innodb buffer pools, then restart it.

The script I linked to above is just added as a one liner to our /etc/init.d/mysql script.... if InnoDB isn&#039;t running on this box it isn&#039;t run.  

We have about 1/2 of our cluster on MyISAM without InnoDB enabled so this would break otherwise.</description>
		<content:encoded><![CDATA[<p>Another note&#8230; we have three replicas of everything.</p>
<p>When we restart an InnoDB box it is taken out of production and does not serve requests.</p>
<p>Then we flush the innodb buffer pools, then restart it.</p>
<p>The script I linked to above is just added as a one liner to our /etc/init.d/mysql script&#8230;. if InnoDB isn&#8217;t running on this box it isn&#8217;t run.  </p>
<p>We have about 1/2 of our cluster on MyISAM without InnoDB enabled so this would break otherwise.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Burton</title>
		<link>http://www.mysqlperformanceblog.com/2009/04/15/how-to-decrease-innodb-shutdown-times/comment-page-1/#comment-541959</link>
		<dc:creator>Kevin Burton</dc:creator>
		<pubDate>Fri, 17 Apr 2009 16:49:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=660#comment-541959</guid>
		<description>Hey Baron.... 

Here&#039;s the script we&#039;re using:

http://pastebin.com/f5ec2f70d

If we were to write it again it would almost certainly be written in python.

Kevin</description>
		<content:encoded><![CDATA[<p>Hey Baron&#8230;. </p>
<p>Here&#8217;s the script we&#8217;re using:</p>
<p><a href="http://pastebin.com/f5ec2f70d" rel="nofollow">http://pastebin.com/f5ec2f70d</a></p>
<p>If we were to write it again it would almost certainly be written in python.</p>
<p>Kevin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Coolyou</title>
		<link>http://www.mysqlperformanceblog.com/2009/04/15/how-to-decrease-innodb-shutdown-times/comment-page-1/#comment-541528</link>
		<dc:creator>Coolyou</dc:creator>
		<pubDate>Fri, 17 Apr 2009 03:29:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=660#comment-541528</guid>
		<description>Kevin, we were about to write one of these scripts ourselves until we realized that we may have an issue with figuring out how far we are with the flushing. Could you please provide us all with the script? It may prove very useful :)

Pat, the whole idea of this is to keep the application online for a longer period of time than having MySQL refuse all connections for that 15 minutes.

However I have noticed that MySQL performance decreases dramatically when innodb_max_dirty_pages_pct = 0 is in effect. That&#039;s not unexpected considering that the dirty pages are immediately flushed to disk. But those with a busy site may want to consider this limitation because this option may even increase the time required to shut down because of the increased load from the application itself and the increased time it takes for the application to respond.</description>
		<content:encoded><![CDATA[<p>Kevin, we were about to write one of these scripts ourselves until we realized that we may have an issue with figuring out how far we are with the flushing. Could you please provide us all with the script? It may prove very useful <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Pat, the whole idea of this is to keep the application online for a longer period of time than having MySQL refuse all connections for that 15 minutes.</p>
<p>However I have noticed that MySQL performance decreases dramatically when innodb_max_dirty_pages_pct = 0 is in effect. That&#8217;s not unexpected considering that the dirty pages are immediately flushed to disk. But those with a busy site may want to consider this limitation because this option may even increase the time required to shut down because of the increased load from the application itself and the increased time it takes for the application to respond.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Baron Schwartz</title>
		<link>http://www.mysqlperformanceblog.com/2009/04/15/how-to-decrease-innodb-shutdown-times/comment-page-1/#comment-541452</link>
		<dc:creator>Baron Schwartz</dc:creator>
		<pubDate>Fri, 17 Apr 2009 02:39:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=660#comment-541452</guid>
		<description>Pat,

If your server takes 15 minutes to shut down, you can keep the application online and responding for some portion of that time, while dirty pages are flushed from the buffer pool.  The alternative is to take the app offline for the whole 15 minutes.  The point is to reduce the amount of time that the server is *actually* shutting down and restarting, by *preparing* it for shutdown.

Kevin, can you post your shutdown script?  Maybe put it on your blog and link to it here?  Maybe contribute it to your favorite distro?  It sounds useful.</description>
		<content:encoded><![CDATA[<p>Pat,</p>
<p>If your server takes 15 minutes to shut down, you can keep the application online and responding for some portion of that time, while dirty pages are flushed from the buffer pool.  The alternative is to take the app offline for the whole 15 minutes.  The point is to reduce the amount of time that the server is *actually* shutting down and restarting, by *preparing* it for shutdown.</p>
<p>Kevin, can you post your shutdown script?  Maybe put it on your blog and link to it here?  Maybe contribute it to your favorite distro?  It sounds useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Burton</title>
		<link>http://www.mysqlperformanceblog.com/2009/04/15/how-to-decrease-innodb-shutdown-times/comment-page-1/#comment-541283</link>
		<dc:creator>Kevin Burton</dc:creator>
		<pubDate>Fri, 17 Apr 2009 00:14:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=660#comment-541283</guid>
		<description>pat,

If you&#039;re new to MySQL and your DB is taking 12 minutes to shutdown, and the port is closed, one might assume that the DB is broken and kill -9 it.. 

Our script actually prints that it&#039;s flushing the buffer pool and prints percentage until complete numbers.</description>
		<content:encoded><![CDATA[<p>pat,</p>
<p>If you&#8217;re new to MySQL and your DB is taking 12 minutes to shutdown, and the port is closed, one might assume that the DB is broken and kill -9 it.. </p>
<p>Our script actually prints that it&#8217;s flushing the buffer pool and prints percentage until complete numbers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pat</title>
		<link>http://www.mysqlperformanceblog.com/2009/04/15/how-to-decrease-innodb-shutdown-times/comment-page-1/#comment-541253</link>
		<dc:creator>pat</dc:creator>
		<pubDate>Thu, 16 Apr 2009 23:47:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=660#comment-541253</guid>
		<description>Is this really shutting down my server any faster in wall clock time?

Without setting the max_dirty_pages flag to zero, say it takes me 15 minutes to shut down.

If I do set it, doesn&#039;t it just take me 14 minutes for dirty pages to drop to zero and 1 minute for the shutdown?

Seems like it might make the shutdown *command* take less time, but the actual elapsed time from the moment you decide to shut down the server to the time mysqld terminates isn&#039;t decreasing is it?</description>
		<content:encoded><![CDATA[<p>Is this really shutting down my server any faster in wall clock time?</p>
<p>Without setting the max_dirty_pages flag to zero, say it takes me 15 minutes to shut down.</p>
<p>If I do set it, doesn&#8217;t it just take me 14 minutes for dirty pages to drop to zero and 1 minute for the shutdown?</p>
<p>Seems like it might make the shutdown *command* take less time, but the actual elapsed time from the moment you decide to shut down the server to the time mysqld terminates isn&#8217;t decreasing is it?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
