<?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 estimate time it takes Innodb to Recover ?</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2007/05/09/how-to-estimate-time-it-takes-innodb-to-recover/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2007/05/09/how-to-estimate-time-it-takes-innodb-to-recover/</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: Ash</title>
		<link>http://www.mysqlperformanceblog.com/2007/05/09/how-to-estimate-time-it-takes-innodb-to-recover/comment-page-1/#comment-318052</link>
		<dc:creator>Ash</dc:creator>
		<pubDate>Thu, 26 Jun 2008 04:02:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/05/09/how-to-estimate-time-it-takes-innodb-to-recover/#comment-318052</guid>
		<description>Hi all,

PROBLEM: mysqld frequently restarts w/o apparent or visible reasons yet:
Would this be related to long INNODB recovery time, to the point it will do self service-restart?

In hopes to clear confusions with the problem Im getting w/ our servers: Here is a snippet from our error.log:

************
080625 23:53:28 [Note] /usr/sbin/mysqld: ready for connections.
Version: &#039;5.0.51a-community-log&#039;  socket: &#039;/var/lib/mysql/mysql.sock&#039;  port: 3306  MySQL Community Edition (GPL)
080625 23:53:28 [Note] Slave SQL thread initialized, starting replication in log &#039;bin.000025&#039; at position 12410321, relay log &#039;/var/log/mysql/relay.000086&#039; position: 4837623
080625 23:53:28 [Note] Slave I/O thread: connected to master &#039;repl@10.16.82.132:3306&#039;,  replication started in log &#039;bin.000025&#039; at position 12410321

Number of processes running now: 0
080626 00:06:16  mysqld restarted
InnoDB: Log scan progressed past the checkpoint lsn 16 3276587130
080626  0:06:16  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 16 3276588706
080626  0:06:19  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
InnoDB: In a MySQL replication slave the last master binlog file
InnoDB: position 0 12501110, file name bin.000025
InnoDB: Last MySQL binlog file position 0 90914, file name /var/log/mysql/bin.000027
080626  0:06:20  InnoDB: Started; log sequence number 16 3276588706
080626  0:06:20 [Note] Recovering after a crash using /var/log/mysql/bin
080626  0:06:20 [Note] Starting crash recovery...
080626  0:06:20 [Note] Crash recovery finished.
080626  0:06:20 [Note] /usr/sbin/mysqld: ready for connections.
Version: &#039;5.0.51a-community-log&#039;  socket: &#039;/var/lib/mysql/mysql.sock&#039;  port: 3306  MySQL Community Edition (GPL)
080626  0:06:20 [Note] Slave SQL thread initialized, starting replication in log &#039;bin.000025&#039; at position 12501137, relay log &#039;/var/log/mysql/relay.000088&#039; position: 85644
080626  0:06:20 [Note] Slave I/O thread: connected to master &#039;repl@10.16.82.132:3306&#039;,  replication started in log &#039;bin.000025&#039; at position 12501137

**************


System background: 
-------------------
No of servers in replication chain: 20
-&gt; 1a 2a 3a 4a 5a 6a 7a 8a 9a 10a -&gt;
-&gt; 1b 2b 3b 4b 5b 6b 7b 8b 9b 10b -&gt;
where 10b is master of 1a

mysql&gt; show master status;
+------------+----------+-------------------------------------------+------------------+
&#124; File       &#124; Position &#124; Binlog_Do_DB                              &#124; Binlog_Ignore_DB &#124;
+------------+----------+-------------------------------------------+------------------+
&#124; bin.000030 &#124;     9462 &#124; db1,db2,db3,db1,db2,db3                   &#124;                  &#124;
+------------+----------+-------------------------------------------+------------------+
1 row in set (0.00 sec)

*** All db in replicated mode are using INNODB

OS (all): Linux  2.6.9-42.0.8.ELsmp #1 SMP Tue Jan 23 12:49:51 EST 2007 x86_64 x86_64 x86_64 GNU/Linux

Also currently: these config (my.cnf) were all disabled from 20 servers:
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql/
#innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 384M
#innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 100M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50



Thanks in adv,
Ash</description>
		<content:encoded><![CDATA[<p>Hi all,</p>
<p>PROBLEM: mysqld frequently restarts w/o apparent or visible reasons yet:<br />
Would this be related to long INNODB recovery time, to the point it will do self service-restart?</p>
<p>In hopes to clear confusions with the problem Im getting w/ our servers: Here is a snippet from our error.log:</p>
<p>************<br />
080625 23:53:28 [Note] /usr/sbin/mysqld: ready for connections.<br />
Version: &#8216;5.0.51a-community-log&#8217;  socket: &#8216;/var/lib/mysql/mysql.sock&#8217;  port: 3306  MySQL Community Edition (GPL)<br />
080625 23:53:28 [Note] Slave SQL thread initialized, starting replication in log &#8216;bin.000025&#8242; at position 12410321, relay log &#8216;/var/log/mysql/relay.000086&#8242; position: 4837623<br />
080625 23:53:28 [Note] Slave I/O thread: connected to master &#8216;repl@10.16.82.132:3306&#8242;,  replication started in log &#8216;bin.000025&#8242; at position 12410321</p>
<p>Number of processes running now: 0<br />
080626 00:06:16  mysqld restarted<br />
InnoDB: Log scan progressed past the checkpoint lsn 16 3276587130<br />
080626  0:06:16  InnoDB: Database was not shut down normally!<br />
InnoDB: Starting crash recovery.<br />
InnoDB: Reading tablespace information from the .ibd files&#8230;<br />
InnoDB: Restoring possible half-written data pages from the doublewrite<br />
InnoDB: buffer&#8230;<br />
InnoDB: Doing recovery: scanned up to log sequence number 16 3276588706<br />
080626  0:06:19  InnoDB: Starting an apply batch of log records to the database&#8230;<br />
InnoDB: Progress in percents: 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99<br />
InnoDB: Apply batch completed<br />
InnoDB: In a MySQL replication slave the last master binlog file<br />
InnoDB: position 0 12501110, file name bin.000025<br />
InnoDB: Last MySQL binlog file position 0 90914, file name /var/log/mysql/bin.000027<br />
080626  0:06:20  InnoDB: Started; log sequence number 16 3276588706<br />
080626  0:06:20 [Note] Recovering after a crash using /var/log/mysql/bin<br />
080626  0:06:20 [Note] Starting crash recovery&#8230;<br />
080626  0:06:20 [Note] Crash recovery finished.<br />
080626  0:06:20 [Note] /usr/sbin/mysqld: ready for connections.<br />
Version: &#8216;5.0.51a-community-log&#8217;  socket: &#8216;/var/lib/mysql/mysql.sock&#8217;  port: 3306  MySQL Community Edition (GPL)<br />
080626  0:06:20 [Note] Slave SQL thread initialized, starting replication in log &#8216;bin.000025&#8242; at position 12501137, relay log &#8216;/var/log/mysql/relay.000088&#8242; position: 85644<br />
080626  0:06:20 [Note] Slave I/O thread: connected to master &#8216;repl@10.16.82.132:3306&#8242;,  replication started in log &#8216;bin.000025&#8242; at position 12501137</p>
<p>**************</p>
<p>System background:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
No of servers in replication chain: 20<br />
-&gt; 1a 2a 3a 4a 5a 6a 7a 8a 9a 10a -&gt;<br />
-&gt; 1b 2b 3b 4b 5b 6b 7b 8b 9b 10b -&gt;<br />
where 10b is master of 1a</p>
<p>mysql&gt; show master status;<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| File       | Position | Binlog_Do_DB                              | Binlog_Ignore_DB |<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| bin.000030 |     9462 | db1,db2,db3,db1,db2,db3                   |                  |<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
1 row in set (0.00 sec)</p>
<p>*** All db in replicated mode are using INNODB</p>
<p>OS (all): Linux  2.6.9-42.0.8.ELsmp #1 SMP Tue Jan 23 12:49:51 EST 2007 x86_64 x86_64 x86_64 GNU/Linux</p>
<p>Also currently: these config (my.cnf) were all disabled from 20 servers:<br />
# Uncomment the following if you are using InnoDB tables<br />
#innodb_data_home_dir = /var/lib/mysql/<br />
#innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend<br />
#innodb_log_group_home_dir = /var/lib/mysql/<br />
#innodb_log_arch_dir = /var/lib/mysql/<br />
# You can set .._buffer_pool_size up to 50 &#8211; 80 %<br />
# of RAM but beware of setting memory usage too high<br />
#innodb_buffer_pool_size = 384M<br />
#innodb_additional_mem_pool_size = 20M<br />
# Set .._log_file_size to 25 % of buffer pool size<br />
#innodb_log_file_size = 100M<br />
#innodb_log_buffer_size = 8M<br />
#innodb_flush_log_at_trx_commit = 1<br />
#innodb_lock_wait_timeout = 50</p>
<p>Thanks in adv,<br />
Ash</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MySQL Replication vs DRBD Battles &#124; MySQL Performance Blog</title>
		<link>http://www.mysqlperformanceblog.com/2007/05/09/how-to-estimate-time-it-takes-innodb-to-recover/comment-page-1/#comment-289603</link>
		<dc:creator>MySQL Replication vs DRBD Battles &#124; MySQL Performance Blog</dc:creator>
		<pubDate>Tue, 29 Apr 2008 03:51:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/05/09/how-to-estimate-time-it-takes-innodb-to-recover/#comment-289603</guid>
		<description>[...] I would also say this implies hidden danger - the time it will take your database to do transactional log recovery is invisible until you get a crash, meaning if your production database size growths load changes or you happen to have failure during activity of certain kind you might have it taking much longer when expected. recovery time depends on a lot of variables. [...]</description>
		<content:encoded><![CDATA[<p>[...] I would also say this implies hidden danger &#8211; the time it will take your database to do transactional log recovery is invisible until you get a crash, meaning if your production database size growths load changes or you happen to have failure during activity of certain kind you might have it taking much longer when expected. recovery time depends on a lot of variables. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2007/05/09/how-to-estimate-time-it-takes-innodb-to-recover/comment-page-1/#comment-250014</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Fri, 07 Mar 2008 23:42:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/05/09/how-to-estimate-time-it-takes-innodb-to-recover/#comment-250014</guid>
		<description>Well REDO phase of recovery is completed before MySQL starts to accept connections. 
Undo phase is in background and is not really visible - you can find it in the error log. Also in SHOW INNODB STATUS you should see undo happening.</description>
		<content:encoded><![CDATA[<p>Well REDO phase of recovery is completed before MySQL starts to accept connections.<br />
Undo phase is in background and is not really visible &#8211; you can find it in the error log. Also in SHOW INNODB STATUS you should see undo happening.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dac</title>
		<link>http://www.mysqlperformanceblog.com/2007/05/09/how-to-estimate-time-it-takes-innodb-to-recover/comment-page-1/#comment-249909</link>
		<dc:creator>dac</dc:creator>
		<pubDate>Fri, 07 Mar 2008 19:05:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/05/09/how-to-estimate-time-it-takes-innodb-to-recover/#comment-249909</guid>
		<description>One issue I have which I have not found an answer to is this:

How do I know when innodb crash recovery has completed from a programmatic stand-point?

Typically on a system start up, mysqld is automatically started, then the application(s) 
are started.  However, if the database is doing recovery, the applications may fail to
connect (say via JDBC) for quite a while or may not start up at all.

How can one check if the database is in recovery mode before proceeding?</description>
		<content:encoded><![CDATA[<p>One issue I have which I have not found an answer to is this:</p>
<p>How do I know when innodb crash recovery has completed from a programmatic stand-point?</p>
<p>Typically on a system start up, mysqld is automatically started, then the application(s)<br />
are started.  However, if the database is doing recovery, the applications may fail to<br />
connect (say via JDBC) for quite a while or may not start up at all.</p>
<p>How can one check if the database is in recovery mode before proceeding?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: What is the longest part of Innodb Recovery Process ? &#124; MySQL Performance Blog</title>
		<link>http://www.mysqlperformanceblog.com/2007/05/09/how-to-estimate-time-it-takes-innodb-to-recover/comment-page-1/#comment-221030</link>
		<dc:creator>What is the longest part of Innodb Recovery Process ? &#124; MySQL Performance Blog</dc:creator>
		<pubDate>Thu, 20 Dec 2007 10:25:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/05/09/how-to-estimate-time-it-takes-innodb-to-recover/#comment-221030</guid>
		<description>[...] In MySQL 4.1 and above the longest part of recovery after crash for Innodb tables could be UNDO stage - it was happening in foreground and was basically unbound - if you have large enough transaction which needed to be undone this could take long hours. REDO stage on other hand always could be regulated by size of your Innodb log files so you could have it as large as you like. Read more about it here. [...]</description>
		<content:encoded><![CDATA[<p>[...] In MySQL 4.1 and above the longest part of recovery after crash for Innodb tables could be UNDO stage &#8211; it was happening in foreground and was basically unbound &#8211; if you have large enough transaction which needed to be undone this could take long hours. REDO stage on other hand always could be regulated by size of your Innodb log files so you could have it as large as you like. Read more about it here. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MySQL Performance Blog &#187; Innodb Recovery - Is large buffer pool always better ?</title>
		<link>http://www.mysqlperformanceblog.com/2007/05/09/how-to-estimate-time-it-takes-innodb-to-recover/comment-page-1/#comment-146246</link>
		<dc:creator>MySQL Performance Blog &#187; Innodb Recovery - Is large buffer pool always better ?</dc:creator>
		<pubDate>Tue, 17 Jul 2007 15:46:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/05/09/how-to-estimate-time-it-takes-innodb-to-recover/#comment-146246</guid>
		<description>[...] positive, Innodb with large buffer pool to performing better. Including Recovery of course. I even blogged about [...]</description>
		<content:encoded><![CDATA[<p>[...] positive, Innodb with large buffer pool to performing better. Including Recovery of course. I even blogged about [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Innodb Recovery &#171; François Schiettecatte&#8217;s Blog</title>
		<link>http://www.mysqlperformanceblog.com/2007/05/09/how-to-estimate-time-it-takes-innodb-to-recover/comment-page-1/#comment-121226</link>
		<dc:creator>Innodb Recovery &#171; François Schiettecatte&#8217;s Blog</dc:creator>
		<pubDate>Wed, 09 May 2007 21:34:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/05/09/how-to-estimate-time-it-takes-innodb-to-recover/#comment-121226</guid>
		<description>[...]  From experience, I can corroborate that Innodb recovery can take what seems to be a fairly random amount of time to [...]</description>
		<content:encoded><![CDATA[<p>[...]  From experience, I can corroborate that Innodb recovery can take what seems to be a fairly random amount of time to [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
