<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MySQL Performance Blog &#187; xtradb</title>
	<atom:link href="http://www.mysqlperformanceblog.com/category/xtradb/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com</link>
	<description>Everything about MySQL Performance</description>
	<lastBuildDate>Thu, 04 Mar 2010 17:59:13 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Maximal write througput in MySQL</title>
		<link>http://www.mysqlperformanceblog.com/2010/02/28/maximal-write-througput-in-mysql/</link>
		<comments>http://www.mysqlperformanceblog.com/2010/02/28/maximal-write-througput-in-mysql/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 06:53:08 +0000</pubDate>
		<dc:creator>Vadim</dc:creator>
				<category><![CDATA[Innodb]]></category>
		<category><![CDATA[benchmarks]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[xtradb]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=2257</guid>
		<description><![CDATA[I recently was asked what maximal amount transactions per second we can get  using MySQL and XtraDB / InnoDB storage engine if we have high-end server. Good questions, though not easy to answer, as it depends on:
- durability setting ( innodb_flush_log_at_trx_commit = 0  or 1 ) ?
- do we use binary logs ( [...]]]></description>
			<content:encoded><![CDATA[<p>I recently was asked what maximal amount transactions per second we can get  using MySQL and XtraDB / InnoDB storage engine if we have high-end server. Good questions, though not easy to answer, as it depends on:</p>
<p>- durability setting ( innodb_flush_log_at_trx_commit = 0  or 1 ) ?<br />
- do we use binary logs ( I used ROW based replication for 5.1)<br />
- do we have sync_binlog options.</p>
<p>So why would not take these as variable parameters and run simple benchmark.<br />
I took sysbench update_key scenario ( update indexed field on simple table)<br />
and used<a href="http://www.percona.com/docs/wiki/benchmark:hardware:R900"> Dell PowerEdge R900</a> with 16 cores, FusionIO as storage for table and RAID 10 with BBU as storage for innodb log files, innodb system table space and binary logs. And I used Percon-XtraDB-5.1.43-9.1 for benchmarks. All used partitions are formatted in XFS and mounted with nobarrier option.</p>
<p>I run update key for various threads and with next parameters</p>
<ul>
<li>trx_commit=0 : innodb_flush_log_at_trx_commit = 0 and no binary logs</li>
<li>trx_commit=1 : innodb_flush_log_at_trx_commit = 1 and no binary logs</li>
<li>trx_commit=0 &#038; binlog :  innodb_flush_log_at_trx_commit = 0 and  binary logs</li>
<li>trx_commit=1 &#038; binlog :  innodb_flush_log_at_trx_commit = 1 and  binary logs</li>
<li>trx_commit=1 &#038; binlog &#038; sync_bin :  innodb_flush_log_at_trx_commit = 1 and  binary logs and sync_binlog=1</li>
<p>There are results I get:<br />
<a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2010/02/sysbench_update_key.png"><img src="http://www.mysqlperformanceblog.com/wp-content/uploads/2010/02/sysbench_update_key.png" alt="" title="sysbench_update_key" width="614" height="435" class="aligncenter size-full wp-image-2258" /></a></p>
<p>I found results being quite interesting.<br />
with innodb_flush_log_at_trx_commit = 0 maximal tps is <strong>36332.02</strong> tps, which drops to <strong>23115.04</strong> tps as<br />
we switch to innodb_flush_log_at_trx_commit = 1. As we use RAID10 with BBU, I did not expect the drops is going to be significant. In second case InnoDB spends</p>
<p>With enabling binary logs, the results drops to <strong>17451.01</strong> tps with innodb_flush_log_at_trx_commit = 0 and to <strong>12097.39</strong> tps with innodb_flush_log_at_trx_commit = 1. So with binary logs serialization is getting even worse.</p>
<p>Enabling sync_binlog makes things really bad, and maximal results I have is<br />
<strong>3086.7</strong> tps. So this is good decision if binary log protection is worth such drop.</p>
<p><strong>UPDATE</strong> ( 3/4/2010 )</p>
<p>Results with innodb_flush_log_at_trx_commit = 2<br />
<a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2010/02/sysbench_update_key_trx_commit.png"><img src="http://www.mysqlperformanceblog.com/wp-content/uploads/2010/02/sysbench_update_key_trx_commit.png" alt="" title="sysbench_update_key_trx_commit" width="553" height="289" class="aligncenter size-full wp-image-2267" /></a><br />
Results with innodb_flush_log_at_trx_commit = 2 and binlogs<br />
<a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2010/02/sysbench_update_key_binlog.png"><img src="http://www.mysqlperformanceblog.com/wp-content/uploads/2010/02/sysbench_update_key_binlog.png" alt="" title="sysbench_update_key_binlog" width="501" height="326" class="aligncenter size-full wp-image-2266" /></a></p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Vadim |
      <a href="http://www.mysqlperformanceblog.com/2010/02/28/maximal-write-througput-in-mysql/#comments">7 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2010/02/28/maximal-write-througput-in-mysql/&amp;title=Maximal write througput in MySQL" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2010/02/28/maximal-write-througput-in-mysql/&amp;title=Maximal write througput in MySQL" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2010/02/28/maximal-write-througput-in-mysql/&amp;title=Maximal write througput in MySQL" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2010/02/28/maximal-write-througput-in-mysql/&amp;T=Maximal write througput in MySQL" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2010/02/28/maximal-write-througput-in-mysql/&amp;title=Maximal write througput in MySQL" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2010/02/28/maximal-write-througput-in-mysql/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>XtraDB feature: save / restore buffer pool</title>
		<link>http://www.mysqlperformanceblog.com/2010/01/20/xtradb-feature-save-restore-buffer-pool/</link>
		<comments>http://www.mysqlperformanceblog.com/2010/01/20/xtradb-feature-save-restore-buffer-pool/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 00:07:20 +0000</pubDate>
		<dc:creator>Vadim</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[xtradb]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=2119</guid>
		<description><![CDATA[We recently released XtraDB-9, and while we did not highlight it in announcement, the release-making feature is ability to save and restore InnoDB buffer pool.
The idea is not new and was originally developed by Jeremy Cole (sorry, I do not have the link on hands) some time ago, and now we implemented it in XtraDB.
Why [...]]]></description>
			<content:encoded><![CDATA[<p>We recently released <a href="http://www.mysqlperformanceblog.com/2010/01/13/xtradb-storage-engine-release-1-0-6-9/">XtraDB-9</a>, and while we did not highlight it in announcement, the release-making feature is ability to <strong>save and restore InnoDB buffer pool</strong>.<br />
The idea is not new and was originally developed by Jeremy Cole (sorry, I do not have the link on hands) some time ago, and now we implemented it in XtraDB.</p>
<p>Why would we need to save and restore content of buffer pool ?<br />
There are several reasons.<br />
First, it&#8217;s not rate on modern servers to have 32GB+ of RAM, with allocated InnoDB buffer_pool 26GB or more. When you do restart of server, it may take long time to populate cache with useful data before you can bring it back to serve production load. It&#8217;s not rare to see<br />
maintenance cycle takes <strong>two or more hours</strong>, mainly because the slave need to catchup with master and to warm cache.<br />
In case with the server crash, it is even worse, you need to wait possible long time on InnoDB<br />
recovery (we have <a href="http://www.mysqlperformanceblog.com/2009/07/07/improving-innodb-recovery-time/">the patch</a> for that too, in that post you can see InnoDB recovery took 1h to accomplish) and after that warm caches.</p>
<p>Second, it is useful for some HA schemas, like DRBD, when, in case of failover, you need to start passive instance on cold. </p>
<p>So let&#8217;s see what results we have.<br />
Details about patch you can get there <a href="http://www.percona.com/docs/wiki/percona-xtradb:patch:innodb_lru_dump_restore">http://www.percona.com/docs/wiki/percona-xtradb:patch:innodb_lru_dump_restore</a> (Yasufumi names it LRU dump/restore, because he thinks about buffer pool as about LRU list, which how it is internally).</p>
<p>To save buffer pool you execute<br />
<code>select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_LRU_DUMP*/;<br />
</code><br />
and to restore<br />
<code>select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_LRU_RESTORE*/;<br />
</code><br />
it will create/read file <code>ib_lru_dump</code> from your database directory.</p>
<p>You may want to sort ib_lru_dump in order of pages in tablespaces, so RESTORE will be<br />
performed in most sequential way. The small python script <code>lrusort.py</code> to sort <code>ib_lru_dump</code> is available<br />
in our Launchpad branch <code>lp:~percona-dev/percona-xtradb/extensions-1.0.6</code></p>
<p>I made small tpcc benchmark to show effect with restored buffer_pool (the condition of<br />
benchmarks are the same as in <a href="http://www.mysqlperformanceblog.com/2010/01/13/innodb-innodb-plugin-vs-xtradb-on-fast-storage/">my runs on fast storages</a>, and I<br />
used RAID10 to store InnoDB files).<br />
First run (xtradb cold) I made just after restart and ran it for 1h.<br />
After that I saved buffer_pool, restarted mysqld, restored buffer_pool ( it took about 4 min<br />
to load 26GB worth of data), and run (xtradb warm) tpcc again.</p>
<p>Here is graphical results (results in New Transactions Per 10 sec, more is better):</p>
<p><img src="http://www.mysqlperformanceblog.com/wp-content/uploads/2010/01/tpcc_1000w.png" alt="tpcc_1000w" title="tpcc_1000w" width="796" height="282" class="aligncenter size-full wp-image-2124" /></p>
<p>As you see in the cold run it took 1500-1800 sec to  enter into stable mode, while<br />
it warm run it happened almost from start. There was some period of unstable results, but it<br />
did not affect ability to serve load.</p>
<p>You are welcome to test it, it is available in XtraDB-9 release and also in MariaDB 5.1.41-RC.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Vadim |
      <a href="http://www.mysqlperformanceblog.com/2010/01/20/xtradb-feature-save-restore-buffer-pool/#comments">15 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2010/01/20/xtradb-feature-save-restore-buffer-pool/&amp;title=XtraDB feature: save / restore buffer pool" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2010/01/20/xtradb-feature-save-restore-buffer-pool/&amp;title=XtraDB feature: save / restore buffer pool" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2010/01/20/xtradb-feature-save-restore-buffer-pool/&amp;title=XtraDB feature: save / restore buffer pool" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2010/01/20/xtradb-feature-save-restore-buffer-pool/&amp;T=XtraDB feature: save / restore buffer pool" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2010/01/20/xtradb-feature-save-restore-buffer-pool/&amp;title=XtraDB feature: save / restore buffer pool" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2010/01/20/xtradb-feature-save-restore-buffer-pool/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>XtraDB storage engine release 1.0.6-9</title>
		<link>http://www.mysqlperformanceblog.com/2010/01/13/xtradb-storage-engine-release-1-0-6-9/</link>
		<comments>http://www.mysqlperformanceblog.com/2010/01/13/xtradb-storage-engine-release-1-0-6-9/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 05:09:42 +0000</pubDate>
		<dc:creator>Aleksandr Kuzminsky</dc:creator>
				<category><![CDATA[announce]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[xtradb]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=2023</guid>
		<description><![CDATA[Dear Community,
As of today Release 9 of XtraDB storage engine is available.
The release includes following new features:

The release is base on 1.0.6 version of InnoDB plugin.
MySQL 5.1.42 as a base release
Separate purge thread and LRU dump is implemented (this feature was actually added in Release 8, but somehow it was forgotten)
New patch innodb_relax_table_creation
Added extended statistics [...]]]></description>
			<content:encoded><![CDATA[<p>Dear Community,</p>
<p>As of today Release 9 of XtraDB storage engine is available.</p>
<p>The release includes following new features:</p>
<ul>
<li>The release is base on 1.0.6 version of InnoDB plugin.</li>
<li>MySQL 5.1.42 as a base release</li>
<li>Separate purge thread and LRU dump is implemented (this feature was actually added in Release 8, but somehow it was forgotten)</li>
<li>New patch innodb_relax_table_creation</li>
<li>Added extended statistics to slow log</li>
<li>Adjust defaults with performance intention</li>
<li>Added parameter to control checkpoint age</li>
<li>Added recovery statistics output when crash recovery (disabled by default)</li>
<li>Patch to dump and restore innodb_buffer_pool</li>
</ul>
<p>Fixed bugs:</p>
<ul>
<li><a href="https://bugs.launchpad.net/maria/+bug/488315">Bug#488315</a>:<br />
rename columns and add unique index cause serious inconsistent with mysqld</li>
<li><a href="https://bugs.launchpad.net/percona-xtradb/+bug/495342">Bug #495342</a>: “MySQL 5.1.41 + InnoDB 1.0.6 + XtraDB patches extensions-1.0.6, rev. 127 fails to compile on OpenSolaris”</li>
<li><a href="http://bugs.mysql.com/47621 ">Bug #47621</a>: change the fix of http://bugs.mysql.com/47621 more reasonable</li>
</ul>
<p>The builds for RedHat 4, 5 , Debian and Ubuntu are located on <a href="http://www.percona.com/mysql/xtradb/5.1.42-9/">http://www.percona.com/mysql/xtradb/5.1.42-9/</a> . Since Release 9 .tar.gz packages are available for FreeBSD.</p>
<p>There is an RPM <a href="http://www.percona.com/mysql/percona-release/percona-release-0.0-1.x86_64.rpm">Percona-release</a>. It installs Percona.repo to /etc/yum.repos.d/ and the public key which we use to sign RPMs. The <a href="http://www.percona.com/mysql/RPM-GPG-KEY-percona">copy of the key</a> is located on our web-site.</p>
<p>Once you install Percona-release repo the upgrade becomes as easy as</p>
<div class="igBar"><span id="lcode-2"><a href="#" onclick="javascript:showPlainTxt('code-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-2">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">yum update MySQL-server-percona MySQL-client-percona </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The latest source code of XtraDB, including development branch you can find on <a href="https://launchpad.net/percona-xtradb">LaunchPAD</a>.</p>
<p>Please report any bugs found on <a href="https://bugs.launchpad.net/percona-xtradb/+bugs-index">Bugs in Percona XtraDB Storage Engine for MySQL</a>.<br />
For general questions use our <a href="http://groups.google.com/group/percona-discussion">Pecona-discussions</a> group, and for development question <a href="http://groups.google.com/group/percona-dev">Percona-dev</a> group.</p>
<p>For support, commercial and sponsorship inquiries contact <a href="http://www.percona.com/contacts.html">Percona</a></p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Aleksandr Kuzminsky |
      <a href="http://www.mysqlperformanceblog.com/2010/01/13/xtradb-storage-engine-release-1-0-6-9/#comments">9 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2010/01/13/xtradb-storage-engine-release-1-0-6-9/&amp;title=XtraDB storage engine release 1.0.6-9" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2010/01/13/xtradb-storage-engine-release-1-0-6-9/&amp;title=XtraDB storage engine release 1.0.6-9" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2010/01/13/xtradb-storage-engine-release-1-0-6-9/&amp;title=XtraDB storage engine release 1.0.6-9" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2010/01/13/xtradb-storage-engine-release-1-0-6-9/&amp;T=XtraDB storage engine release 1.0.6-9" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2010/01/13/xtradb-storage-engine-release-1-0-6-9/&amp;title=XtraDB storage engine release 1.0.6-9" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2010/01/13/xtradb-storage-engine-release-1-0-6-9/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>InnoDB, InnoDB-plugin vs XtraDB on fast storage</title>
		<link>http://www.mysqlperformanceblog.com/2010/01/13/innodb-innodb-plugin-vs-xtradb-on-fast-storage/</link>
		<comments>http://www.mysqlperformanceblog.com/2010/01/13/innodb-innodb-plugin-vs-xtradb-on-fast-storage/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 08:52:38 +0000</pubDate>
		<dc:creator>Vadim</dc:creator>
				<category><![CDATA[Innodb]]></category>
		<category><![CDATA[benchmarks]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[xtradb]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=2030</guid>
		<description><![CDATA[To continue fun with FusionIO cards, I wanted to check how MySQL / InnoDB performs here. For benchmark I took MySQL 5.1.42 with built-in InnoDB, InnoDB-plugin 1.0.6, and XtraDB 1.0.6-9 ( InnoDB with Percona patches).
As benchmark engine I used tpcc-mysql with 1000 warehouses ( which gives around 90GB of data + indexes) on my workhourse [...]]]></description>
			<content:encoded><![CDATA[<p>To continue fun with FusionIO cards, I wanted to check how MySQL / InnoDB performs here. For benchmark I took MySQL 5.1.42 with built-in InnoDB, InnoDB-plugin 1.0.6, and XtraDB 1.0.6-9 ( InnoDB with Percona patches).<br />
As benchmark engine I used tpcc-mysql with 1000 warehouses ( which gives around 90GB of data + indexes) on my workhourse Dell PowerEdge R900 ( <a href="http://www.percona.com/docs/wiki/benchmark:hardware:r900">details about box</a> ).</p>
<p>On storage configuration: FusionIO 160GB SLC and 320GB MLC cards are configured in software RAID0 to store InnoDB datafiles. For InnoDB logs and system tablespace I used  partition on regular RAID10 with regular hard drives, here I followed Yoshinori Matsunobu's recommendations <a href="http://yoshinorimatsunobu.blogspot.com/2009/05/tables-on-ssd-redobinlogsystem.html">http://yoshinorimatsunobu.blogspot.com/2009/05/tables-on-ssd-redobinlogsystem.html</a> and taking fact that FusionIO is not perfect for sequential writes <a href="http://www.mysqlperformanceblog.com/2010/01/11/fusionio-320gb-mlc-benchmarks/">http://www.mysqlperformanceblog.com/2010/01/11/fusionio-320gb-mlc-benchmarks/</a></p>
<p>Full results I put on page <a href="http://www.percona.com/docs/wiki/benchmark:fusionio:mysql:start">http://www.percona.com/docs/wiki/benchmark:fusionio:mysql:start</a>, here are my thoughts and interesting facts.</p>
<p>First, chart with results for InnoDB vs InnoDB-plugin during runs (values are in new order transactions per minute, more is better) :</p>
<p><img src="http://www.mysqlperformanceblog.com/wp-content/uploads/2010/01/innodb_vs_plugin.png" alt="innodb_vs_plugin" title="innodb_vs_plugin" width="825" height="350" class="aligncenter size-full wp-image-2049" /></p>
<p>As you see InnoDB-plugin is doing much better here, it allows to utilize multiple IO threads,<br />
which as we saw ( <a href="http://www.mysqlperformanceblog.com/2010/01/11/fusionio-320gb-mlc-benchmarks/">http://www.mysqlperformanceblog.com/2010/01/11/fusionio-320gb-mlc-benchmarks/</a> ) is necessary to get most throughput from FusionIO.</p>
<p>Also you may see from graph some waves for InnoDB-plugin.  Here we observe innodb_adaptive_flushing in action (which is ON by default), and I think innodb_adaptive_flushing in InnoDB-plugin is not quite balanced, it may do overaggressive flushing, when it is not necessary.</p>
<p>But looking on CPU stats (see graph later), I guess InnoDB-plugin spends most time in buffer_pool mutex, contention here is not fully resolved yet in InnoDB-plugin.</p>
<p>Now, let's take XtraDB. In additional to multiple IO threads, we have patch to decrease contention on buffer_pool mutex, plus separate purge thread. Also we use different adaptive_checkpoint algorithm.</p>
<p>The results are:<br />
<img src="http://www.mysqlperformanceblog.com/wp-content/uploads/2010/01/innodb_vs_xtradb.png" alt="innodb_vs_xtradb" title="innodb_vs_xtradb" width="826" height="320" class="aligncenter size-full wp-image-2050" /></p>
<p>So I guess buffer_pool improvements play here for XtraDB, and looking on summary result:</p>
<ul>
<li>InnoDB <strong>9439.316</strong> NOTPM</li>
<li>InnoDB-plugin-1.0.6 <strong>15299.333</strong> NOTPM</li>
<li>XtraDB-1.0.6-9 <strong>26160.551</strong> NOTPM</li>
</ul>
<p>InnoDB-plugin is <strong>1.6x times</strong> better InnoDB, and XtraDB is <strong>1.7x times</strong> better InnoDB-plugin.</p>
<p>Now on CPU usage and disk utilization.</p>
<p>Disk throughput:</p>
<p><img src="http://www.mysqlperformanceblog.com/wp-content/uploads/2010/01/disk_bo.png" alt="disk_bo" title="disk_bo" width="450" height="320" class="aligncenter size-full wp-image-2055" /></p>
<p>CPU (user) usage:</p>
<p><img src="http://www.mysqlperformanceblog.com/wp-content/uploads/2010/01/cpu_usage.png" alt="cpu_usage" title="cpu_usage" width="450" height="320" class="aligncenter size-full wp-image-2054" /></p>
<p>Even with improvements, XtraDB performs less 150MB/s in disk writes (from benchmarks we<br />
saw FusionIO can do much more) and with 45-50% of idle CPU.</p>
<p>I assume we still see significant contentions inside XtraDB, and there big room for improvements. As for InnoDB-plugin, I'd wish InnoDB team makes some actions on buffer_pool mutex problem.</p>
<p>Finally I wanted to check what if we put innodb transactional logs and system tablespace on FusionIO also, there is graph for that:</p>
<p><img src="http://www.mysqlperformanceblog.com/wp-content/uploads/2010/01/innodb_logs_on_fusionio.png" alt="innodb_logs_on_fusionio" title="innodb_logs_on_fusionio" width="828" height="255" class="aligncenter size-full wp-image-2048" /></p>
<p>It is not so bad, with final result 23038.283 NOTPM, it is only about 12% worse than with logs on separate partition.</p>
<p>And to make reference point, I run the same but with all files on RAID10 with regular disks,<br />
the graph is there:</p>
<p><img src="http://www.mysqlperformanceblog.com/wp-content/uploads/2010/01/xtradb_fusionio_vs_raid10.png" alt="xtradb_fusionio_vs_raid10" title="xtradb_fusionio_vs_raid10" width="825" height="320" class="aligncenter size-full wp-image-2051" /></p>
<p> with final result:   2873.783 NOTPM ( about 88% worse than all files on FusionIO)</p>
<p>To summarize </p>
<ul>
<li> MySQL InnoDB/InnoDB-plugin/XtraDB is not fully able to utilize  throughput of FusionIO. XtraDB is doing better job with internal contention, but much more can be done.</li>
<li>Still you can have very impressive performance improvement in IO-intensive or IO-bound workloads. You may want to use InnoDB-plugin or XtraDB to get better results.
</li>
<li>Putting logs on separate partition may be good idea, but only if you have possibility to do that. Making special setup for that may be not worth improvements</li>
</ul>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Vadim |
      <a href="http://www.mysqlperformanceblog.com/2010/01/13/innodb-innodb-plugin-vs-xtradb-on-fast-storage/#comments">10 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2010/01/13/innodb-innodb-plugin-vs-xtradb-on-fast-storage/&amp;title=InnoDB, InnoDB-plugin vs XtraDB on fast storage" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2010/01/13/innodb-innodb-plugin-vs-xtradb-on-fast-storage/&amp;title=InnoDB, InnoDB-plugin vs XtraDB on fast storage" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2010/01/13/innodb-innodb-plugin-vs-xtradb-on-fast-storage/&amp;title=InnoDB, InnoDB-plugin vs XtraDB on fast storage" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2010/01/13/innodb-innodb-plugin-vs-xtradb-on-fast-storage/&amp;T=InnoDB, InnoDB-plugin vs XtraDB on fast storage" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2010/01/13/innodb-innodb-plugin-vs-xtradb-on-fast-storage/&amp;title=InnoDB, InnoDB-plugin vs XtraDB on fast storage" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2010/01/13/innodb-innodb-plugin-vs-xtradb-on-fast-storage/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Speaking at the LA MySQL Meetup &#8211; 18th November</title>
		<link>http://www.mysqlperformanceblog.com/2009/11/01/speaking-at-the-la-mysql-meetup-18th-november/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/11/01/speaking-at-the-la-mysql-meetup-18th-november/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 17:35:44 +0000</pubDate>
		<dc:creator>Morgan Tocker</dc:creator>
				<category><![CDATA[Innodb]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[training]]></category>
		<category><![CDATA[xtradb]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1478</guid>
		<description><![CDATA[
A recent photo from Highload.ru
I said in my last post, that we're interested in speaking at MySQL meetups, and I'm happy to say that the Los Angeles MySQL Meetup has taken us up on the offer.
On November 18th, I'll be giving an introductory talk on InnoDB/XtraDB Performance Optimization.  I will be the second speaker, with [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; padding: 4px; margin: 5px"><img title="Morgan speaking at Highload.ru" src="http://tocker.id.au/files/percona/highload_talk.jpg" alt="Morgan speaking at Highload.ru" width="300" height="192" /><br />
A recent photo from Highload.ru</div>
<p>I said in my <a href="../2009/10/16/training-updates/">last post</a>, that we're interested in speaking at MySQL meetups, and I'm happy to say that the Los Angeles MySQL Meetup has taken us up on the offer.</p>
<p>On November 18th, I'll be giving an introductory talk on <a href="http://www.meetup.com/lamysql/calendar/11742534/">InnoDB/XtraDB Performance Optimization</a>.  I will be the second speaker, with <strong>Carl Gelbart</strong> first speaking on Infobright.</p>
<p>What brings me to LA?  On the same day (18th Nov) I'll be teaching a one day class on <a href="http://percona-ca-la.eventbrite.com/">Performance Optimization for MySQL with InnoDB and XtraDB</a>.  If you haven't signed up yet - spaces are still available.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Morgan Tocker |
      <a href="http://www.mysqlperformanceblog.com/2009/11/01/speaking-at-the-la-mysql-meetup-18th-november/#comments">No comment</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/11/01/speaking-at-the-la-mysql-meetup-18th-november/&amp;title=Speaking at the LA MySQL Meetup &#8211; 18th November" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/11/01/speaking-at-the-la-mysql-meetup-18th-november/&amp;title=Speaking at the LA MySQL Meetup &#8211; 18th November" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/11/01/speaking-at-the-la-mysql-meetup-18th-november/&amp;title=Speaking at the LA MySQL Meetup &#8211; 18th November" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/11/01/speaking-at-the-la-mysql-meetup-18th-november/&amp;T=Speaking at the LA MySQL Meetup &#8211; 18th November" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/11/01/speaking-at-the-la-mysql-meetup-18th-november/&amp;title=Speaking at the LA MySQL Meetup &#8211; 18th November" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2009/11/01/speaking-at-the-la-mysql-meetup-18th-november/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>State of the art: Galera &#8211; synchronous replication for InnoDB</title>
		<link>http://www.mysqlperformanceblog.com/2009/10/27/state-of-the-art-galera-synchronous-replication-for-innodb/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/10/27/state-of-the-art-galera-synchronous-replication-for-innodb/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 15:08:58 +0000</pubDate>
		<dc:creator>Vadim</dc:creator>
				<category><![CDATA[High Availability]]></category>
		<category><![CDATA[Innodb]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[xtradb]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1556</guid>
		<description><![CDATA[First time I heard about Galera on Percona Performance Conference 2009, Seppo Jaakola was presenting "Galera: Multi-Master Synchronous MySQL Replication Clusters". It was impressed as I personally always wanted it for InnoDB, but we had it in plans at the bottom of the list, as this is very hard to implement properly.
The idea by itself [...]]]></description>
			<content:encoded><![CDATA[<p>First time I heard about Galera on Percona Performance Conference 2009, Seppo Jaakola was presenting <a href="http://www.percona.com/ppc2009/PPC2009_galera.pdf">"Galera: Multi-Master Synchronous MySQL Replication Clusters"</a>. It was impressed as I personally always wanted it for InnoDB, but we had it in plans at the bottom of the list, as this is very hard to implement properly.<br />
The idea by itself is not new, I remember synchronous replication was announced for SolidDB on MySQL UC 2007, but later the product was killed by IBM.</p>
<p>So long time after PPC 2009 there was available version mysql-galera-0.6, which had serious flow, to setup a new node you had to take down whole cluster. And all this time Codership ( company that develops Galera) was working on 0.7 release that introduces node propagation keeping cluster online. You can play with 0.7pre release by yourself <a href="http://www.codership.com/en/downloads/galera">MySQL/Galera Release 0.7pre</a>. </p>
<p>In current version propagation is done by mysqldump from one of nodes ("donor"). In next release Codership is going to support LVM snapshot and xtrabackup which will make the setup of new node even easier. The current annoyance I see is that if you shutdown one node for short period of time for quick maintenance, after  start, the node has to load whole mysqldump, like it is new empty node. I hope Codership guys will address this also.<br />
Another thing I miss for now is support of InnoDB-plugin, which as we know performs much better than standard InnoDB &reg;.</p>
<p>So what is so interesting about Galera. Couple things:</p>
<p>- High Availability. Any of N standby nodes are available immediately when main node fails. Galera is serious pretender to be included to the list, Yves put recently, <a href="http://www.mysqlperformanceblog.com/2009/10/16/finding-your-mysql-high-availability-solution-%e2%80%93-the-questions/">http://www.mysqlperformanceblog.com/2009/10/16/finding-your-mysql-high-availability-solution-%e2%80%93-the-questions/</a>. I am not sure how many nines it will provide <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> , but efforts on test setup and deployment should be comparable with MMM setup.</p>
<p>- Scale Writes. Galera allows to write to any of N nodes and automatically propagate to other nodes. It sounds too ideal, and there is drawback - with increasing amount of nodes you write to, your transaction rollback rate may increase, especially if you working on the same dataset. You can find some results on <a href="http://www.codership.com/en/content/benchmarking-write-scalability">Codership's page</a>,  and I am going to run my own benchmarks also. Also from benchmark you can see that communication overhead maybe significant for short writes.</p>
<p>- Scale Reads. It can be done with regular replication, but  with synchronous your "slaves-nodes" are in the same state, there is no "slave behind". When you read from any slave, you read actual data. Although it also has serious drawback -  our cluster is fast as fast the "weakest" node in the chain. So if one node gets overloaded and performance degrades, the same happens with whole cluster.</p>
<p>- Heterogeneous-database replication. It is not here yet, and I do not know what's in Codership roadmap, but group manager protocol in Galera is database independent, and it's only matter of database drivers. For InnoDB currently it is set of patches, and I see it is quite possible to make the same for Postgres. So MySQL-Postgres cluster setup is not so far ahead <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>On <a href="http://www.codership.com/en/company/about">"Company page" Codership says</a> their goal is "to promote and exploit the latest developments in computer science to produce fast and scalable synchronous replication solution that "just works" for databases and similar applications", which I think they have success in. Implementing fast, scalable and working group communication and transaction manager is the art.</p>
<p>As for now I would not put 0.7 release into production yet, but you may seriously consider to play with it in test environment, and report bugs to Codership team, they are very responsive.<br />
I am waiting for next releases and looking to make integration with XtraDB.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Vadim |
      <a href="http://www.mysqlperformanceblog.com/2009/10/27/state-of-the-art-galera-synchronous-replication-for-innodb/#comments">11 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/10/27/state-of-the-art-galera-synchronous-replication-for-innodb/&amp;title=State of the art: Galera &#8211; synchronous replication for InnoDB" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/10/27/state-of-the-art-galera-synchronous-replication-for-innodb/&amp;title=State of the art: Galera &#8211; synchronous replication for InnoDB" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/10/27/state-of-the-art-galera-synchronous-replication-for-innodb/&amp;title=State of the art: Galera &#8211; synchronous replication for InnoDB" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/10/27/state-of-the-art-galera-synchronous-replication-for-innodb/&amp;T=State of the art: Galera &#8211; synchronous replication for InnoDB" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/10/27/state-of-the-art-galera-synchronous-replication-for-innodb/&amp;title=State of the art: Galera &#8211; synchronous replication for InnoDB" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2009/10/27/state-of-the-art-galera-synchronous-replication-for-innodb/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>XtraDB Amazon Image</title>
		<link>http://www.mysqlperformanceblog.com/2009/10/25/xtradb-amazon-image/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/10/25/xtradb-amazon-image/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 04:36:49 +0000</pubDate>
		<dc:creator>Aleksandr Kuzminsky</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[xtradb]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1547</guid>
		<description><![CDATA[For those who use Amazon EC2 service and were anxious about having XtraDB ready to launch there is a good news.
We created a public AMI (Amazon Machine Image) with XtraDB release 8 installed on CentOS 5.3.
How to use it.
First make sure it is avaiable.
PLAIN TEXT
CODE:




$ ec2-describe-images ami-4701e22e


IMAGE   ami-4701e22e    xtradb/centos-5.3-x86_64.fs.manifest.xml        834362721059    available       public          x86_64  machine


$ 






Run [...]]]></description>
			<content:encoded><![CDATA[<p>For those who use Amazon EC2 service and were anxious about having XtraDB ready to launch there is a good news.</p>
<p>We created a public AMI (Amazon Machine Image) with XtraDB release 8 installed on CentOS 5.3.</p>
<p>How to use it.</p>
<p>First make sure it is avaiable.</p>
<div class="igBar"><span id="lcode-6"><a href="#" onclick="javascript:showPlainTxt('code-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-6">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$ ec2-describe-images ami-4701e22e</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">IMAGE   ami-4701e22e    xtradb/centos-<span style="color:#800000;color:#800000;">5</span>.<span style="color:#800000;color:#800000;">3</span>-x86_64.<span style="">fs</span>.<span style="">manifest</span>.<span style="">xml</span>        <span style="color:#800000;color:#800000;">834362721059</span>    available       public          x86_64  machine</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$ </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Run it. It is built for x86_64 plaform, so allowed types are m1.large, m1.xlarge and c1.xlarge</p>
<div class="igBar"><span id="lcode-7"><a href="#" onclick="javascript:showPlainTxt('code-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-7">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$ ec2-run-instances ami-4701e22e -t m1.<span style="">large</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RESERVATION&nbsp; &nbsp; &nbsp;r-46b3432e&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">834362721059</span>&nbsp; &nbsp; default</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">INSTANCE&nbsp; &nbsp; &nbsp; &nbsp; i-ecc74084&nbsp; &nbsp; &nbsp; ami-4701e22e&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pending&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m1.<span style="">large</span>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">2009</span>-<span style="color:#800000;color:#800000;">10</span>-25T18:<span style="color:#800000;color:#800000;">31</span>:<span style="color:#800000;color:#800000;">06</span>+<span style="color:#800000;color:#800000;">0000</span>&nbsp; &nbsp; &nbsp; &nbsp; us-east-1c </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Wait till the instance starts</p>
<div class="igBar"><span id="lcode-8"><a href="#" onclick="javascript:showPlainTxt('code-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-8">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$ ec2-describe-instances i-ecc74084</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RESERVATION&nbsp; &nbsp; &nbsp;r-46b3432e&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">834362721059</span>&nbsp; &nbsp; default</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">INSTANCE&nbsp; &nbsp; &nbsp; &nbsp; i-ecc74084&nbsp; &nbsp; &nbsp; ami-4701e22e&nbsp; &nbsp; ec2-<span style="color:#800000;color:#800000;">75</span>-<span style="color:#800000;color:#800000;">101</span>-<span style="color:#800000;color:#800000;">203</span>-<span style="color:#800000;color:#800000;">143</span>.<span style="">compute</span>-<span style="color:#800000;color:#800000;">1</span>.<span style="">amazonaws</span>.<span style="">com</span>&nbsp; &nbsp; &nbsp; domU-<span style="color:#800000;color:#800000;">12</span>-<span style="color:#800000;color:#800000;">31</span>-<span style="color:#800000;color:#800000;">39</span>-0A-<span style="color:#800000;color:#800000;">26</span>-<span style="color:#800000;color:#800000;">22</span>.<span style="">compute</span>-<span style="color:#800000;color:#800000;">1</span>.<span style="">internal</span>&nbsp; &nbsp; &nbsp; &nbsp;running&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">0</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">m1.<span style="">large</span>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">2009</span>-<span style="color:#800000;color:#800000;">10</span>-25T18:<span style="color:#800000;color:#800000;">31</span>:<span style="color:#800000;color:#800000;">06</span>+<span style="color:#800000;color:#800000;">0000</span>&nbsp; &nbsp; &nbsp; &nbsp; us-east-1c </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Now it is up and ready.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Aleksandr Kuzminsky |
      <a href="http://www.mysqlperformanceblog.com/2009/10/25/xtradb-amazon-image/#comments">7 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/10/25/xtradb-amazon-image/&amp;title=XtraDB Amazon Image" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/10/25/xtradb-amazon-image/&amp;title=XtraDB Amazon Image" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/10/25/xtradb-amazon-image/&amp;title=XtraDB Amazon Image" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/10/25/xtradb-amazon-image/&amp;T=XtraDB Amazon Image" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/10/25/xtradb-amazon-image/&amp;title=XtraDB Amazon Image" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2009/10/25/xtradb-amazon-image/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Tuning for heavy writing workloads</title>
		<link>http://www.mysqlperformanceblog.com/2009/10/14/tuning-for-heavy-writing-workloads/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/10/14/tuning-for-heavy-writing-workloads/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 00:06:55 +0000</pubDate>
		<dc:creator>Yasufumi</dc:creator>
				<category><![CDATA[Innodb]]></category>
		<category><![CDATA[benchmarks]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[tuning]]></category>
		<category><![CDATA[xtradb]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1376</guid>
		<description><![CDATA[For the my previous post, there was comment to suggest to test db_STRESS benchmark on XtraDB by Dimitri. And I tested and tuned for the benchmark. I will show you the tunings. It should be also tuning procedure for general heavy writing workloads.
At first, &#60;tuning peak performance&#62;. The next, &#60;tuning purge operation&#62; to stabilize performance  [...]]]></description>
			<content:encoded><![CDATA[<p>For the <a href="http://www.mysqlperformanceblog.com/2009/09/15/which-adaptive-should-we-use/">my previous post</a>, there was comment to suggest to test <a href="http://dimitrik.free.fr/">db_STRESS benchmark</a> on XtraDB by Dimitri. And I tested and tuned for the benchmark. I will show you the tunings. It should be also tuning procedure for general heavy writing workloads.</p>
<p>At first, &lt;tuning peak performance&gt;. The next, &lt;tuning purge operation&gt; to stabilize performance  and to avoid decreasing performance.</p>
<p><strong>&lt;test condition&gt;</strong></p>
<p>Server:<br />
PowerEdge R900, Four Quad Core E7320 Xeon, 2.13GHz, 32GB Memory, 16X2GB, 667MHz</p>
<p>db_STRESS:<br />
32 sessions, RW=1, dbsize = 1000000, no thinktime</p>
<p>XtraDB: (mysql-5.1.39 + XtraDB-1.0.4-current)<br />
innodb_io_capacity = 4000<br />
innodb_support_xa = false<br />
innodb_file_per_table = true<br />
innodb_buffer_pool_size = 16G<br />
innodb_read_io_threads = 8<br />
innodb_write_io_threads = 8<br />
innodb_flush_log_at_trx_commit = 2<br />
innodb_log_buffer_size = 128M<br />
innodb_log_file_size = 512M<br />
innodb_log_files_in_group = 2<br />
innodb_max_dirty_pages_pct = 90<br />
innodb_flush_method = O_DIRECT<br />
(the followings are XtraDB specific general settings)<br />
innodb_ibuf_active_contract = 1<br />
innodb_adaptive_flushing = false<br />
innodb_adaptive_checkpoint = estimate</p>
<p><strong>&lt;tuning peak performance&gt;</strong></p>
<p>At first, tuning the peak performance to use CPU and IO resource more effectively. To avoid mutex/lock contentions are good to use more CPU resource of many CPUs.</p>
<p><img class="alignnone size-full wp-image-1381" title="purge_thread_test_1ST_TUNE" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2009/10/purge_thread_test_1ST_TUNE.png" alt="purge_thread_test_1ST_TUNE" width="299" height="238" /></p>
<p>This graph shows the peak performance in tps of db_STRESS.</p>
<p>At current settings, <strong>"base"</strong> in the graph is the perfomance. We can confirm the mutex/lock contention roughly by the SEMAPHORES sction of SHOW INNODB STATUS output.</p>
<p><em>"xx-lock on RW-latch at 0x7f2ff40a3dc0 created in file dict/dict0dict.c line 1627"</em></p>
<p>It is index-&gt;lock, viewing the source file (and it may be HISTORY table). This is the lock for each index tree. We may be able to disperse the lock using by the partitioning of MySQL. Added the following clause to the HISTORY table definition.</p>
<p style="text-align: center;"><strong>"PARTITION BY HASH(REF_OBJECT) PARTITIONS 16"</strong></p>
<p>Now the performance became to <strong>"+partitioned"</strong> in the graph. Looking the SEMAPHORES section again,</p>
<p><em>"has waited at handler/ha_innodb.cc line 7275 for 0.0000 seconds the semaphore:<br />
X-lock on RW-latch at 0xd30320 created in file dict/dict0dict.c line 623"</em></p>
<p>may be the line which appears for the most times (it is dict_operation_lock). It may be partition specific lock contention. The current XtraDB has the variable to tune the contention.</p>
<p style="text-align: center;"><strong>innodb_stats_update_need_lock = 0</strong> (default 1)</p>
<p>It skip the updating statistics which needs the lock. (it only affects for "Data_free:" value of TABLE STATS). And the performance became <strong>"+skip_stats"</strong> in the graph.  Then, the next contention at SEMAPHORES section is...</p>
<p><em>"Mutex at 0x1b3e3e78 created file trx/trx0rseg.c line 167"</em></p>
<p>may be remarkable (it is rseg-&gt;mutex). The mutex is for each rollback segments, so we can increase the rsegs to solve the contention problem. XtraDB can increase the rseg.</p>
<p style="text-align: center;"><strong>innodb_extra_rsegments = 64</strong> (affects to initialization of InnoDB)</p>
<p>Recreated database files with the parameter. Then the performance became <strong>"+rsegs64"</strong>. At last, the next contention may be <em>"Mutex at 0x28ce8e0 created file srv/srv0srv.c line 982". </em>It is kernel_mutex, currently we don't have proper solution for that. The setting seems to be enough for now.</p>
<p><strong>&lt;tuning purge operation&gt;</strong></p>
<p>Next, looking the sequential result in more long term.</p>
<p>The next problem is "History list length" growing to huge size. The value is the number of entries in rollback segment. The entries are used for consistent reading of the older transactions. They can be removed when any transactions doesn't refer the entry. This removing operation for the entries is called "purge" in InnoDB. The purge operation should be done enough on time, because the huge history list affects to performance.</p>
<p>Basically, the purging is done by master_thread (general background thread of InnoDB). The huge history list makes the purge operation slow, and it interferes  with the other tasks of the master_thread (e.g. flushing dirty blocks, treating insert buffer, etc...). <a href="http://dimitrik.free.fr/blog/index.html">Dimitri</a> implemented a purge_thread to devote to the purging, and also XtraDB has similar purge_thread. Though it seems to make the throughput stabilize, it is not enough still for heavy update workloads. A single purge_thread on one CPU is not enough for updates from user threads on the all of other CPUs.</p>
<p>XtraDB can increase the purge_threads from the next release.</p>
<p style="text-align: center;"><strong>innodb_use_purge_thread = 4</strong></p>
<p style="text-align: left;">seems to be enough for this workload on the server.</p>
<p style="text-align: left;">The first graph of followings is sequential throughput [tps] up to 3500 sec.</p>
<p><img class="alignnone size-full wp-image-1388" title="purge_thread_test_TPS" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2009/10/purge_thread_test_TPS.png" alt="purge_thread_test_TPS" width="675" height="377" /></p>
<p>The next is tracking the "History list length" at the same time.</p>
<p><img class="alignnone size-full wp-image-1389" title="purge_thread_test_HIST_LENGTH" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2009/10/purge_thread_test_HIST_LENGTH.png" alt="purge_thread_test_HIST_LENGTH" width="675" height="377" /></p>
<pre>"Norm 1.0.4": Normal InnoDB Plugin 1.0.4 without XtraDB specific options
"xtra p_t 0": XtraDB 1.0.4-new (no purge_thread)
"xtra p_t 1": XtraDB 1.0.4-new (single purge_thread similar to Dimitri's)
"xtra p_t 4": XtraDB 1.0.4-new (4 purge threads)</pre>
<p>The graphs show...</p>
<ul>
<li>The purge thread (&gt; 0) helps to stabilize the throughput greatly.</li>
<li>Increasing the purge threads can suppress the strong growing of the hitory list</li>
<li>The adaptive checkpoint "estimate" needs the purge_thread... (than the adaptive_flushing does)</li>
</ul>
<p>And the last 300secs' average tps are...</p>
<pre>"Norm 1.0.4": 5725.47
"xtra p_t 0": 4699.33
"xtra p_t 1": 7130.3
"xtra p_t 4": 9118    (about 60%up from Normal Plugin 1.0.4)</pre>
<p>In the end, the faster and more stable performance of db_STRESS benchmark is obtained by these tunings of XtraDB.</p>
<p>-----------------------------------------</p>
<p>(Added 2009.10.29)</p>
<p>&lt;<strong>FAQ: Is XtraDB slower than Plugin?</strong>&gt;</p>
<p>I'd like to say <strong>"no"</strong> to this question. We have been adding many tuning options to XtraDB. But they are effective not for all cases, sometimes the performance may get worse because of "not proper" or "too much value". We should choose the options correctly. XtraDB is based on InnoDB Plugin and we can set XtraDB same to InnoDB Plugin at least. The following graphs are results of XtraDB and Plugin with same options and same database.</p>
<p>top-left (same condition to above graphs):<br />
innodb_flush_log_at_trx_commit = 2<br />
innodb_doublewrite = true</p>
<p>top-right:<br />
innodb_flush_log_at_trx_commit = 1<br />
innodb_doublewrite = true</p>
<p>bottom-left:<br />
innodb_flush_log_at_trx_commit = 2<br />
innodb_doublewrite = false</p>
<p>bottom-right:<br />
innodb_flush_log_at_trx_commit = 1<br />
innodb_doublewrite = false</p>
<p><img class="alignnone size-full wp-image-1570" title="purge_thread_test_2_TPS" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2009/10/purge_thread_test_2_TPS.png" alt="purge_thread_test_2_TPS" width="952" height="566" /></p>
<p>It seems that XtraDB is not slower than Plugin here at least.</p>
<p><strong><em>We can start tuning based on these performances using XtraDB specific options!</em></strong></p>
<p>Why do you make XtraDB slower than Plugin? <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Yasufumi |
      <a href="http://www.mysqlperformanceblog.com/2009/10/14/tuning-for-heavy-writing-workloads/#comments">9 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/10/14/tuning-for-heavy-writing-workloads/&amp;title=Tuning for heavy writing workloads" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/10/14/tuning-for-heavy-writing-workloads/&amp;title=Tuning for heavy writing workloads" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/10/14/tuning-for-heavy-writing-workloads/&amp;title=Tuning for heavy writing workloads" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/10/14/tuning-for-heavy-writing-workloads/&amp;T=Tuning for heavy writing workloads" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/10/14/tuning-for-heavy-writing-workloads/&amp;title=Tuning for heavy writing workloads" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2009/10/14/tuning-for-heavy-writing-workloads/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Percona welcomes Yves Trudeau and Fernando Ipar</title>
		<link>http://www.mysqlperformanceblog.com/2009/10/08/percona-welcomes-yves-trudeau-and-fernando-ipar/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/10/08/percona-welcomes-yves-trudeau-and-fernando-ipar/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 18:21:53 +0000</pubDate>
		<dc:creator>Baron Schwartz</dc:creator>
				<category><![CDATA[announce]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[xtradb]]></category>
		<category><![CDATA[drbd]]></category>
		<category><![CDATA[Fernando Ipar]]></category>
		<category><![CDATA[Matt Yonkovit]]></category>
		<category><![CDATA[MySQL Cluster]]></category>
		<category><![CDATA[WaffleGrid]]></category>
		<category><![CDATA[Yves Trudeau]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1303</guid>
		<description><![CDATA[I'm happy to extend a warm welcome to two new members of the Percona team.
First is Yves Trudeau, about whom I can say many things:

One of the top MySQL Cluster (NDB Cluster) experts in the world.
An expert on all things High Availability, including DRBD and Heartbeat.
Many years of experience with Huge Data.
Half of the Waffle [...]]]></description>
			<content:encoded><![CDATA[<p>I'm happy to extend a warm welcome to two new members of the Percona team.</p>
<p>First is Yves Trudeau, about whom I can say many things:</p>
<ul>
<li>One of the top MySQL Cluster (NDB Cluster) experts in the world.</li>
<li>An expert on all things High Availability, including DRBD and Heartbeat.</li>
<li>Many years of experience with Huge Data.</li>
<li>Half of the Waffle Grid team.</li>
<li>A really nice person!</li>
</ul>
<p>Yves joins us after a tenure of several years as a senior consultant at Sun/MySQL.  Together with Matt Yonkovit, he plans to work on WaffleGrid (but as a new project under a new name, to be determined), and integration with XtraDB.  Yves lives in Quebec with his family.</p>
<p>Next is Fernando Ipar.  Fernando is our first dedicated Shift Support Captain<sup>[1]</sup>.  Fernando specializes in MySQL, GNU/Linux, systems administration, and high availability.  Fernando has been involved in computer programming since he was 11, and in Open Source since 2001.  He loves shade-grown coffee, music, and natural history.  He lives in Uruguay with his wife and family.  Fernando brightens our IRC channel with his helpful and cheerful presence!</p>
<p>Welcome, Yves and Fernando!</p>
<p><small>[1] Shift Support Captain is kind of a dispatcher for 24-hour service.  We have been doing 24x7 service through an on-call phone number for years, but a few months ago we started literally manning the desk 24x7 -- something that we have grown large enough to both need and justify, at our current size of around 30 people.  Our customers can now use email, Skype, AOL messenger, or Google Chat (as well as the phone number) to get immediate attention, 24x7, from a technically savvy person.</small></p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Baron Schwartz |
      <a href="http://www.mysqlperformanceblog.com/2009/10/08/percona-welcomes-yves-trudeau-and-fernando-ipar/#comments">3 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/10/08/percona-welcomes-yves-trudeau-and-fernando-ipar/&amp;title=Percona welcomes Yves Trudeau and Fernando Ipar" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/10/08/percona-welcomes-yves-trudeau-and-fernando-ipar/&amp;title=Percona welcomes Yves Trudeau and Fernando Ipar" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/10/08/percona-welcomes-yves-trudeau-and-fernando-ipar/&amp;title=Percona welcomes Yves Trudeau and Fernando Ipar" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/10/08/percona-welcomes-yves-trudeau-and-fernando-ipar/&amp;T=Percona welcomes Yves Trudeau and Fernando Ipar" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/10/08/percona-welcomes-yves-trudeau-and-fernando-ipar/&amp;title=Percona welcomes Yves Trudeau and Fernando Ipar" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2009/10/08/percona-welcomes-yves-trudeau-and-fernando-ipar/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Which adaptive should we use?</title>
		<link>http://www.mysqlperformanceblog.com/2009/09/15/which-adaptive-should-we-use/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/09/15/which-adaptive-should-we-use/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 00:12:44 +0000</pubDate>
		<dc:creator>Yasufumi</dc:creator>
				<category><![CDATA[Innodb]]></category>
		<category><![CDATA[benchmarks]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tuning]]></category>
		<category><![CDATA[xtradb]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1125</guid>
		<description><![CDATA[As you may know, InnoDB has 2 limits for unflushed modified blocks in the buffer pool. The one is from physical size of the buffer pool. And the another one is oldness of the block which is from the capacity of transaction log files.
In the case of heavy updating workload, the modified ages of the [...]]]></description>
			<content:encoded><![CDATA[<p>As you may know, InnoDB has 2 limits for unflushed modified blocks in the buffer pool. The one is from physical size of the buffer pool. And the another one is oldness of the block which is from the capacity of transaction log files.</p>
<p>In the case of heavy updating workload, the modified ages of the many blocks are clustered. And to reduce the maximum of the modified ages InnoDB needs to flush many of the blocks in a short time, if these are not flushed at all. Then the flushing storm affect the performance seriously.</p>
<p>We suggested the "adaptive_checkpoint" option of constant flushing to avoid such a flushing storm. And finally, the newest InnoDB Plugin 1.0.4 has the new similar option "adaptive_flushing" as native.</p>
<p>Let's check the adaptive flushing options at this post.</p>
<p><em><strong>HOW THEY WORK</strong></em></p>
<p><strong>&lt; adaptive_checkpoint=reflex (older method)&gt;</strong></p>
<table border="1" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td>oldest modified age %/max</td>
<td>behavior</td>
</tr>
<tr>
<td>0 ~ 50%</td>
<td>nothing</td>
</tr>
<tr>
<td>50% ~ 75%</td>
<td>constant flushing (weak)</td>
</tr>
<tr>
<td>75% ~ 87.5%</td>
<td>constant flushing (strong)</td>
</tr>
<tr>
<td>87.5% ~</td>
<td>(flushing storm)</td>
</tr>
</tbody>
</table>
<p><strong>&lt; adaptive_checkpoint=estimate (newer method)&gt;</strong></p>
<table border="1" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td>oldest modified age %/max</td>
<td>behavior</td>
</tr>
<tr>
<td>0 ~ 50%</td>
<td>nothing</td>
</tr>
<tr>
<td>50% ~ 87.5%</td>
<td>estimate flushing as bellow *</td>
</tr>
<tr>
<td>87.5% ~</td>
<td>(flushing storm)</td>
</tr>
</tbody>
</table>
<p>* estimate blocks to flush based on...</p>
<ul>
<li> how many modified and unflushed blocks</li>
<li> progress speed of the transaction log</li>
<li> the modified age average of all blocks to flush</li>
</ul>
<p><strong>&lt; adaptive_flushing (default "true" at 1.0.4)&gt;</strong><br />
Its behavior is not based on the oldest modified age %.</p>
<p>* the how many blocks to flush based on...</p>
<ul>
<li> how many modified and unflushed blocks</li>
<li> progress speed of the transaction log</li>
<li> transaction log capacity</li>
</ul>
<p>(and adjust along with another flushing)</p>
<p>And it doesn't exceed the equivalent to "constant flushing (strong)"<br />
of the "adaptive_checkpoint=reflex"</p>
<p><em><strong>RESULTS</strong></em></p>
<p>TPC-C like workload (100WH: 16 session full)</p>
<p>innodb_buffer_pool_size = 16G<br />
innodb_max_dirty_pages_pct = 90</p>
<p>innodb_log_file_size = 512M<br />
innodb_log_files_in_group = 2</p>
<p>innodb_io_capacity = 4000<br />
innodb_read_io_threads = 8<br />
innodb_write_io_threads = 8<br />
innodb_flush_method = O_DIRECT</p>
<p>innodb_thread_concurrency = 0<br />
innodb_ibuf_active_contract = 1</p>
<p><strong>&lt;none&gt;</strong><br />
innodb_adaptive_flushing = false<br />
innodb_adaptive_checkpoint = none</p>
<p><strong>&lt;flushing&gt;</strong><br />
innodb_adaptive_flushing = true</p>
<p><strong>&lt;reflex&gt;</strong><br />
innodb_adaptive_flushing = false<br />
innodb_adaptive_checkpoint = reflex</p>
<p><strong>&lt;estimate&gt;</strong><br />
innodb_adaptive_flushing = false<br />
innodb_adaptive_checkpoint = estimate</p>
<p><strong><em>case1: "innodb_doublewrite = false"</em></strong></p>
<p>[0~1800 sec.]</p>
<p><img class="alignnone size-full wp-image-1132" title="no_doublewrite-0-1800" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2009/09/no_doublewrite-0-18001.png" alt="no_doublewrite-0-1800" width="705" height="388" /></p>
<p>[1200~1800 sec.]</p>
<p><img class="alignnone size-full wp-image-1134" title="no_doublewrite-1200-1800" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2009/09/no_doublewrite-1200-1800.png" alt="no_doublewrite-1200-1800" width="705" height="388" /></p>
<p>averages (1200~1800 sec.)<br />
none:     6868.92<br />
flushing: 6655.92<br />
reflex:     6481<br />
estimate: 6575.88</p>
<p><strong><em>case2: "innodb_doublewrite = true"</em></strong></p>
<p>[0~1800 sec.]</p>
<p><img class="alignnone size-full wp-image-1137" title="doublewrite-0-1800" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2009/09/doublewrite-0-1800.png" alt="doublewrite-0-1800" width="705" height="388" /></p>
<p>[1200~1800 sec.]</p>
<p><img class="alignnone size-full wp-image-1138" title="doublewrite-1200-1800" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2009/09/doublewrite-1200-1800.png" alt="doublewrite-1200-1800" width="705" height="388" /></p>
<p>averages (1200~1800 sec.)<br />
none:     6569.48<br />
flushing: 5090.12<br />
reflex:     6871.9<br />
estimate: 6609.9</p>
<p><strong><em>CONSIDERINGS</em></strong></p>
<p>The new "adaptive_flushing" seems to be tuned for "innodb_doublewrite = false" only.<br />
(cause too much flushing for "innodb_doublewrite = true")</p>
<p>"innodb_adaptive_checkpoint = reflex" and "adaptive_flushing" need tuning innodb_io_capacity properly.<br />
(The result is based on proper value "innodb_io_capacity = 4000")</p>
<p>"innodb_adaptive_checkpoint = estimate" is not depend on innodb_io_capacity, and it seems more "soft" result than the other methods.</p>
<p>So,</p>
<p>The "adaptive_flushing" seems good when we use "innodb_doublewrite = false".</p>
<p>"innodb_adaptive_checkpoint = estimate" may be safe for "innodb_doublewrite = true" for now.</p>
<p>I should adjust "adaptive_flushing" for "innodb_doublewrite = true". <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<hr /><em><strong>IMPROVEMENTS</strong></em> (16 Sep.)</p>
<p>I have tried to improve the performance. But I couldn't adjust performance of adaptive_flushing with doublewrite... So, instead of that, estimate is adjusted more.</p>
<p><strong><em>case1: "innodb_doublewrite = false"</em></strong></p>
<p>[0~1800 sec.]</p>
<p><img class="alignnone size-full wp-image-1159" title="no_doublewrite-0-1800_2" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2009/09/no_doublewrite-0-1800_21.png" alt="no_doublewrite-0-1800_2" width="705" height="388" /></p>
<p><strong><em>case2: "innodb_doublewrite = true"</em></strong></p>
<p>[0~1800 sec.]</p>
<p><img class="alignnone size-full wp-image-1160" title="doublewrite-0-1800_2" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2009/09/doublewrite-0-1800_2.png" alt="doublewrite-0-1800_2" width="705" height="388" /></p>
<p>The new "innodb_adaptive_checkpoint = estimate" seems to be more stable than before. The next question is, <strong>"Why is estimate + doublewrite better than the other no doublewrite settings?"</strong>... <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<hr /><strong>ADDITIONAL TEST IN ANOTHER BALANCE</strong></p>
<p>Also tested in another configuration to check the behaviors in another balance of IO bound.</p>
<p>&lt;changes&gt;<br />
innodb_buffer_pool_size = 2G   (1/8)<br />
innodb_log_file_size = 128M    (1/4)</p>
<p><strong><em>case1: "innodb_doublewrite = false"</em></strong></p>
<p>[0~1200 sec.]</p>
<p><img class="alignnone size-full wp-image-1202" title="no_doublewrite_2-0-1200" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2009/09/no_doublewrite_2-0-1200.png" alt="no_doublewrite_2-0-1200" width="705" height="387" /></p>
<p><strong><em>case2: "innodb_doublewrite = true"</em></strong></p>
<p>[0~1200 sec.]</p>
<p><img class="alignnone size-full wp-image-1203" title="doublewrite_2-0-1200" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2009/09/doublewrite_2-0-1200.png" alt="doublewrite_2-0-1200" width="705" height="387" /></p>
<p>"innodb_adaptive_checkpoint = estimate" seems stable but seems to flush much in its initial phase. The adaptive_flushing seems to be more soft in this cases.</p>
<p>Hmmm....</p>
<p><strong>We should choose suitable adaptive_xxx for each workload for now</strong>... <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Yasufumi |
      <a href="http://www.mysqlperformanceblog.com/2009/09/15/which-adaptive-should-we-use/#comments">12 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/09/15/which-adaptive-should-we-use/&amp;title=Which adaptive should we use?" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/09/15/which-adaptive-should-we-use/&amp;title=Which adaptive should we use?" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/09/15/which-adaptive-should-we-use/&amp;title=Which adaptive should we use?" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/09/15/which-adaptive-should-we-use/&amp;T=Which adaptive should we use?" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/09/15/which-adaptive-should-we-use/&amp;title=Which adaptive should we use?" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mysqlperformanceblog.com/2009/09/15/which-adaptive-should-we-use/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
