<?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; patch</title>
	<atom:link href="http://www.mysqlperformanceblog.com/category/patch/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com</link>
	<description>Everything about MySQL Performance</description>
	<lastBuildDate>Sat, 21 Nov 2009 03:11:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<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>&#8220;base&#8221;</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>&#8220;xx-lock on RW-latch at 0&#215;7f2ff40a3dc0 created in file dict/dict0dict.c line 1627&#8243;</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>&#8220;PARTITION BY HASH(REF_OBJECT) PARTITIONS 16&#8243;</strong></p>
<p>Now the performance became to <strong>&#8220;+partitioned&#8221;</strong> in the graph. Looking the SEMAPHORES section again,</p>
<p><em>&#8220;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&#8243;</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 &#8220;Data_free:&#8221; value of TABLE STATS). And the performance became <strong>&#8220;+skip_stats&#8221;</strong> in the graph.  Then, the next contention at SEMAPHORES section is&#8230;</p>
<p><em>&#8220;Mutex at 0&#215;1b3e3e78 created file trx/trx0rseg.c line 167&#8243;</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>&#8220;+rsegs64&#8243;</strong>. At last, the next contention may be <em>&#8220;Mutex at 0&#215;28ce8e0 created file srv/srv0srv.c line 982&#8243;. </em>It is kernel_mutex, currently we don&#8217;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 &#8220;History list length&#8221; 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&#8217;t refer the entry. This removing operation for the entries is called &#8220;purge&#8221; 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&#8230;). <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 &#8220;History list length&#8221; 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&#8230;</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 &#8220;estimate&#8221; needs the purge_thread&#8230; (than the adaptive_flushing does)</li>
</ul>
<p>And the last 300secs&#8217; average tps are&#8230;</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>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>(Added 2009.10.29)</p>
<p>&lt;<strong>FAQ: Is XtraDB slower than Plugin?</strong>&gt;</p>
<p>I&#8217;d like to say <strong>&#8220;no&#8221;</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 &#8220;not proper&#8221; or &#8220;too much value&#8221;. 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>Few more ideas for InnoDB features</title>
		<link>http://www.mysqlperformanceblog.com/2009/06/29/few-more-ideas-for-innodb-features/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/06/29/few-more-ideas-for-innodb-features/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 03:21:22 +0000</pubDate>
		<dc:creator>Vadim</dc:creator>
				<category><![CDATA[ideas]]></category>
		<category><![CDATA[patch]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=708</guid>
		<description><![CDATA[As you see MySQL is doing great in InnoDB performance improvements, so we decided to concentrate more on additional InnoDB features, which will make difference.
Beside ideas I put before http://www.mysqlperformanceblog.com/2009/03/30/my-hot-list-for-next-innodb-features/ (and one of them &#8211; moving InnoDB tables between servers are currently under development), we have few mores:
- Stick some InnoDB tables / indexes in [...]]]></description>
			<content:encoded><![CDATA[<p>As you see MySQL is doing great in InnoDB performance improvements, so we decided to concentrate more on additional InnoDB features, which will make difference.</p>
<p>Beside ideas I put before <a href="http://www.mysqlperformanceblog.com/2009/03/30/my-hot-list-for-next-innodb-features/">http://www.mysqlperformanceblog.com/2009/03/30/my-hot-list-for-next-innodb-features/</a> (and one of them &#8211; moving InnoDB tables between servers are currently under development), we have few mores:</p>
<p>- Stick some InnoDB tables / indexes in buffer pool, or set priority for InnoDB tables. That means tables with bigger priority will be have more chances to stay in buffer pool  then tables with lower priority. Link to blueprint <a href="https://blueprints.launchpad.net/percona-patches/+spec/lru-priority-patch">https://blueprints.launchpad.net/percona-patches/+spec/lru-priority-patch</a></p>
<p>- Separate LRU list into several lists, and in this way it will allow us to emulate several buffer pool, with features to keep different tables in different buffer pools and also to decrease contention on buffer pool. Link <a href="https://blueprints.launchpad.net/percona-patches/+spec/multiple-lru-patch">https://blueprints.launchpad.net/percona-patches/+spec/multiple-lru-patch</a></p>
<p>- We are looking to include <a href="https://launchpad.net/wafflegrid">Waffle Grid</a> into XtraDB releases with some additional features like caching buffer pool on SSD.</p>
<p>If ideas are interesting for you and you want to support them, <a href="http://www.percona.com/contacts.html">contact us</a></p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Vadim |
      <a href="http://www.mysqlperformanceblog.com/2009/06/29/few-more-ideas-for-innodb-features/#comments">7 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/06/29/few-more-ideas-for-innodb-features/&amp;title=Few more ideas for InnoDB features" 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/06/29/few-more-ideas-for-innodb-features/&amp;title=Few more ideas for InnoDB features" 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/06/29/few-more-ideas-for-innodb-features/&amp;title=Few more ideas for InnoDB features" 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/06/29/few-more-ideas-for-innodb-features/&amp;T=Few more ideas for InnoDB features" 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/06/29/few-more-ideas-for-innodb-features/&amp;title=Few more ideas for InnoDB features" 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/06/29/few-more-ideas-for-innodb-features/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Global Transaction ID and other patches available!</title>
		<link>http://www.mysqlperformanceblog.com/2009/05/13/global-transaction-id-and-other-patches-available/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/05/13/global-transaction-id-and-other-patches-available/#comments</comments>
		<pubDate>Wed, 13 May 2009 22:52:54 +0000</pubDate>
		<dc:creator>Vadim</dc:creator>
				<category><![CDATA[patch]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=687</guid>
		<description><![CDATA[I do not know if you noticed it, but Google (Mark Callaghan, Justin Tolmer and their internal mysql-team) made a great contribution to MySQL. Patches global transaction IDs, binlog event checksums and crash-safe replication state are separated and published on Launchpad (https://code.launchpad.net/~jtolmer/mysql-server/global-trx-ids).
For me it was a big wall in using these patches that they were [...]]]></description>
			<content:encoded><![CDATA[<p>I do not know if you noticed it, but Google (Mark Callaghan, Justin Tolmer and their internal mysql-team) made a great contribution to MySQL. Patches global transaction IDs, binlog event checksums and crash-safe replication state <a href="http://mysqlha.blogspot.com/2009/05/patch-for-global-transaction-ids-binlog.html">are separated and published </a>on Launchpad (<a href="https://code.launchpad.net/~jtolmer/mysql-server/global-trx-ids">https://code.launchpad.net/~jtolmer/mysql-server/global-trx-ids</a>).</p>
<p>For me it was a big wall in using these patches that they were part of one big patch, which you can apply only to 5.0.37, and now there is no barrier to include patches into our builds or MySQL releases.</p>
<p>If you do not know what is Global Transactional ID is &#8211; it is worth to look <a href="http://code.google.com/p/google-mysql-tools/wiki/GlobalTransactionIds">http://code.google.com/p/google-mysql-tools/wiki/GlobalTransactionIds</a>. From my point of view &#8211; it is absolutely new view on MySQL replication and it can change MySQL replication architecture.</p>
<p>We definitely will look if we can integrate patches into percona builds and provide binaries if there is no problems. Also I mostly sure the patches will be included into <a href="http://askmonty.org/wiki/index.php/MariaDB">MariaDB</a> along with other Percona-improvements and XtraDB storage engine.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Vadim |
      <a href="http://www.mysqlperformanceblog.com/2009/05/13/global-transaction-id-and-other-patches-available/#comments">9 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/05/13/global-transaction-id-and-other-patches-available/&amp;title=Global Transaction ID and other patches available!" 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/05/13/global-transaction-id-and-other-patches-available/&amp;title=Global Transaction ID and other patches available!" 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/05/13/global-transaction-id-and-other-patches-available/&amp;title=Global Transaction ID and other patches available!" 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/05/13/global-transaction-id-and-other-patches-available/&amp;T=Global Transaction ID and other patches available!" 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/05/13/global-transaction-id-and-other-patches-available/&amp;title=Global Transaction ID and other patches available!" 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/05/13/global-transaction-id-and-other-patches-available/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Percona at PHP Quebec 09</title>
		<link>http://www.mysqlperformanceblog.com/2009/03/10/percona-at-php-quebec-09/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/03/10/percona-at-php-quebec-09/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 20:29:27 +0000</pubDate>
		<dc:creator>Morgan Tocker</dc:creator>
				<category><![CDATA[Backups]]></category>
		<category><![CDATA[High Availability]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[percona]]></category>
		<category><![CDATA[presentation]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=641</guid>
		<description><![CDATA[Percona presented two talks at PHP Quebec last week &#8211; one on A Tour of MySQL High Availability, and another on Performance Tuning MySQL.  There was a great reaction to showcasing some of the quick-wins that can be found by using the Percona patches. Unfortunately, the one thing that I forgot to mention in [...]]]></description>
			<content:encoded><![CDATA[<p>Percona presented two talks at PHP Quebec last week &#8211; one on <a href="http://www.percona.com/files/presentations/high-availability-phpquebec09.pdf">A Tour of MySQL High Availability</a>, and another on <a href="http://www.percona.com/files/presentations/performance-tuning-phpquebec09.pdf">Performance Tuning MySQL</a>.  There was a great reaction to showcasing some of the quick-wins that can be found by using the Percona patches. Unfortunately, the one thing that I forgot to mention in the slides is that the patches are Open Source and free to use.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Morgan Tocker |
      <a href="http://www.mysqlperformanceblog.com/2009/03/10/percona-at-php-quebec-09/#comments">4 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/03/10/percona-at-php-quebec-09/&amp;title=Percona at PHP Quebec 09" 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/03/10/percona-at-php-quebec-09/&amp;title=Percona at PHP Quebec 09" 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/03/10/percona-at-php-quebec-09/&amp;title=Percona at PHP Quebec 09" 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/03/10/percona-at-php-quebec-09/&amp;T=Percona at PHP Quebec 09" 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/03/10/percona-at-php-quebec-09/&amp;title=Percona at PHP Quebec 09" 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/03/10/percona-at-php-quebec-09/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Making replication a bit more reliable</title>
		<link>http://www.mysqlperformanceblog.com/2009/03/04/making-replication-a-bit-more-reliable/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/03/04/making-replication-a-bit-more-reliable/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 00:10:49 +0000</pubDate>
		<dc:creator>Vadim</dc:creator>
				<category><![CDATA[patch]]></category>
		<category><![CDATA[xtradb]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=633</guid>
		<description><![CDATA[Running MySQL slave is quite common and regular task which we do every day, taking backups from slave is often recommended solution. However the current state of MySQL replication makes restoring slave a bit tricky (if possible at all). The main problem is that InnoDB transaction state and replication state are not synchronized.  If [...]]]></description>
			<content:encoded><![CDATA[<p>Running MySQL slave is quite common and regular task which we do every day, taking backups from slave is often recommended solution. However the current state of MySQL replication makes restoring slave a bit tricky (if possible at all). The main problem is that InnoDB transaction state and replication state are not synchronized.  If we speak about backup and you can execute SHOW SLAVE STATUS command you can get reliable information about current state, but some solutions does not allow that. Look for example Sun Storage 7410, which provides storage via NFS and where you can make ZFS snapshots without any info what kind of data you are storing  there. What makes situation worse is that files with replication state (relay-log.info, master.info) are not synchronized on disk after each update, and even wrose &#8211; in case with NFS they are stored on client side OS/NFS cache for long time. As solution we can do patch to execute fsync() for these files after each write, but I can&#8217;t predict how much performance penalty we will see here, I expect it will be very significant.</p>
<p>Our idea is not new, it was taken from TransactionalReplication <a href="http://code.google.com/p/google-mysql-tools/wiki/TransactionalReplication">http://code.google.com/p/google-mysql-tools/wiki/TransactionalReplication</a> patch and <a href="http://bugs.mysql.com/bug.php?id=34058">http://bugs.mysql.com/bug.php?id=34058</a> bug report. Basically we want to store the state of replication in InnoDB transactional log file, in this case  we will be able to see what position in replication the last executed transaction corresponds to.  Of course it will work if you have writes exclusively to InnoDB storage engine, case with mix of storage engines is much more complex and I do not see easy way to solve it.</p>
<p>So we propose <strong>overwrite_relay_log_info</strong> extension for XtraDB storage engine, the name comes from fact that XtraDB will try to rewrite relay-log.info by replication position, or at least this info is available in error-log output, so you can repoint your slave to correct position by executing CHANGE MASTER command.</p>
<p>Currently patch is available in Launchpad lp:~percona-dev/percona-xtradb/overwrite-relay-log-info , and after testing it will go to main XtraDB tree. If there is interest the patch will be ported to 5.0 and 5.1 trees. Some info available there <a href="http://www.percona.com/docs/wiki/percona-xtradb:innodb_overwrite_relay_log_info">http://www.percona.com/docs/wiki/percona-xtradb:innodb_overwrite_relay_log_info</a></p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Vadim |
      <a href="http://www.mysqlperformanceblog.com/2009/03/04/making-replication-a-bit-more-reliable/#comments">13 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/03/04/making-replication-a-bit-more-reliable/&amp;title=Making replication a bit more reliable" 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/03/04/making-replication-a-bit-more-reliable/&amp;title=Making replication a bit more reliable" 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/03/04/making-replication-a-bit-more-reliable/&amp;title=Making replication a bit more reliable" 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/03/04/making-replication-a-bit-more-reliable/&amp;T=Making replication a bit more reliable" 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/03/04/making-replication-a-bit-more-reliable/&amp;title=Making replication a bit more reliable" 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/03/04/making-replication-a-bit-more-reliable/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Limiting InnoDB Data Dictionary</title>
		<link>http://www.mysqlperformanceblog.com/2009/02/11/limiting-innodb-data-dictionary/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/02/11/limiting-innodb-data-dictionary/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 23:24:53 +0000</pubDate>
		<dc:creator>Vadim</dc:creator>
				<category><![CDATA[Innodb]]></category>
		<category><![CDATA[patch]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=624</guid>
		<description><![CDATA[One of InnoDB&#8217;s features is that memory allocated for internal tables definitions is not limited and may grow indefinitely. You may not notice it if you have an usual application with say 100-1000 tables. But for hosting providers and for user oriented applications  ( each user has dedicated database / table) it is disaster. [...]]]></description>
			<content:encoded><![CDATA[<p>One of InnoDB&#8217;s features is that memory allocated for internal tables definitions is not limited and may grow indefinitely. You may not notice it if you have an usual application with say 100-1000 tables. But for hosting providers and for user oriented applications  ( each user has dedicated database / table) it is disaster. For 100.000+ tables InnoDB is consuming gigabytes of memory, keeping definition in memory all time after table was once opened. Only way to cleanup memory is to drop table or restart mysqld &#8211; I can&#8217;t say this is good solution, so we made patch which allows to restrict memory dedicated for data dictionary. </p>
<p>Patch was made by request of our customer <a href="http://www.verticalresponse.com/">Vertical Response</a> and released under GPL, so you can download it there <a href="http://mysqlperformanceblog.com/files/patches/innodb_dict_size_limit_standalone.patch">http://mysqlperformanceblog.com/files/patches/innodb_dict_size_limit_standalone.patch</a>. Currently patch is on testing stage, but later will be included into our releases. To limit memory we introduce new variable <strong>innodb_dict_size_limit</strong> (in bytes).</p>
<p>Some internals: There is already implemented in InnoDB LRU-based algorithm to keep only recent table entries, but it was not used by reason that InnoDB has to know if table is used or not on MySQL level. We made it by checking MySQL table_cache. If table is placed in table_cache we consider it as used, if not &#8211; we can delete it from InnoDB data dictionary. So there is the trick &#8211; if you have big enough table_cache, memory consumed by data dictionary may exceed innodb_dict_size_limit, as we can&#8217;t delete any table entry from it.</p>
<p>To finalize this post small marketing message &#8211; if you faced bug or problem which exists for long time and is not going to be solved by MySQL / InnoDB &#8211; contact us regarding <a href="http://www.percona.com/services/custom-mysql-development.html">Custom MySQL Development</a>.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Vadim |
      <a href="http://www.mysqlperformanceblog.com/2009/02/11/limiting-innodb-data-dictionary/#comments">13 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/02/11/limiting-innodb-data-dictionary/&amp;title=Limiting InnoDB Data Dictionary" 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/02/11/limiting-innodb-data-dictionary/&amp;title=Limiting InnoDB Data Dictionary" 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/02/11/limiting-innodb-data-dictionary/&amp;title=Limiting InnoDB Data Dictionary" 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/02/11/limiting-innodb-data-dictionary/&amp;T=Limiting InnoDB Data Dictionary" 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/02/11/limiting-innodb-data-dictionary/&amp;title=Limiting InnoDB Data Dictionary" 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/02/11/limiting-innodb-data-dictionary/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Pretending to fix broken group commit</title>
		<link>http://www.mysqlperformanceblog.com/2009/02/02/pretending-to-fix-broken-group-commit/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/02/02/pretending-to-fix-broken-group-commit/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 03:50:06 +0000</pubDate>
		<dc:creator>Vadim</dc:creator>
				<category><![CDATA[Innodb]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[xtradb]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=593</guid>
		<description><![CDATA[The problem with broken group commit was discusses many times,  bug report was reported 3.5 years ago and still not fixed in MySQL 5.0/5.1 (and most likely will not be in MySQL 5.1). Although the rough truth is this bug is very hard (if possible) to fix properly. In short words if you enable replication (log-bin) on [...]]]></description>
			<content:encoded><![CDATA[<p>The problem with broken group commit was discusses many times,  <a href="http://bugs.mysql.com/bug.php?id=13669">bug report</a> was reported 3.5 years ago and still not fixed in MySQL 5.0/5.1 (and most likely will not be in MySQL 5.1). Although the rough truth is this bug is very hard (if possible) to fix properly. In short words if you enable replication (log-bin) on server without BBU (battery backup unit) your InnoDB write performance  in concurrent load drops down significantly.<br />
We wrote also about it before, see  &#8220;<a href="http://www.mysqlperformanceblog.com/2006/05/03/group-commit-and-real-fsync/">Group commit and real fsync</a>&#8221; and &#8220;<a href="http://www.mysqlperformanceblog.com/2006/05/19/group-commit-and-xa/">Group commit and XA</a>&#8220;.</p>
<p>The problem is the InnoDB tries to keep the same order of transactions in binary logs and in transaction logs and acquires  mutex to serialize writes to both logs. We basically propose to break this serialization &#8211; in XtraDB release3 (will be announced soon, you can take current version for testing from Launchpad) we introduce <strong>&#8211;innodb-unsafe-group-commit</strong> mode. There are results with this options vs without (results are in transactions per second, more is better, this is sysbench OLTP load).</p>
<p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2009/02/group_commit_fix.png"><img class="alignnone size-full wp-image-607" title="group_commit_fix" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2009/02/group_commit_fix.png" alt="" width="499" height="346" /></a></p>
<p>I tested it on Dell PowerEdge R900 with RAID 10 in WriteThrough mode to emulate absence of BBU. With BBU you will not see this problem (all results will scale well)  as internal RAID cache will accumulate changes and return fsync() call immediately without real syncing data in disk.</p>
<p>So what can be wrong if you run <strong>&#8211;innodb-unsafe-group-commit</strong> — as I said there is possibility that transactions in binary-logs will be in different order than in InnoDB transactional log. Why this is bad? For example if box crashes and InnoDB does recovery: transactions on slaves may be executed in different order — that is you MAY get slaves unsynchronized with master. Is performance benefit worth it? It&#8217;s up to you, but I think better to have this choice then do not have.</p>
<p>I do not urge to use <strong>&#8211;innodb-unsafe-group-commit</strong>, I propose to have BBU on your RAID. But if it appears you don&#8217;t have it, and write load on server is significant — it may worth to try  &#8211;innodb-unsafe-group-commit.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Vadim |
      <a href="http://www.mysqlperformanceblog.com/2009/02/02/pretending-to-fix-broken-group-commit/#comments">11 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/02/02/pretending-to-fix-broken-group-commit/&amp;title=Pretending to fix broken group commit" 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/02/02/pretending-to-fix-broken-group-commit/&amp;title=Pretending to fix broken group commit" 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/02/02/pretending-to-fix-broken-group-commit/&amp;title=Pretending to fix broken group commit" 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/02/02/pretending-to-fix-broken-group-commit/&amp;T=Pretending to fix broken group commit" 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/02/02/pretending-to-fix-broken-group-commit/&amp;title=Pretending to fix broken group commit" 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/02/02/pretending-to-fix-broken-group-commit/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Another scalability fix in XtraDB</title>
		<link>http://www.mysqlperformanceblog.com/2009/01/23/another-scalability-fix-in-xtradb/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/01/23/another-scalability-fix-in-xtradb/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 23:37:24 +0000</pubDate>
		<dc:creator>Vadim</dc:creator>
				<category><![CDATA[benchmarks]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[xtradb]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=597</guid>
		<description><![CDATA[Recent scalability fixes in InnoDB and also Google's and your SMP fixes almost made InnoDB results acceptable in primary key lookups queries, but secondary indexes were forgotten for some time. Now having Dell PowerEdge R900 on board (16CPU cores, 16GB RAM) I have some time for experiments, and I played with queries
PLAIN TEXT
CODE:




SELECT name&#160; FROM [...]]]></description>
			<content:encoded><![CDATA[<p>Recent scalability fixes in InnoDB and also Google's and your SMP fixes almost made InnoDB results acceptable in primary key lookups queries, but secondary indexes were forgotten for some time. Now having Dell PowerEdge R900 on board (16CPU cores, 16GB RAM) I have some time for experiments, and I played with queries</p>
<div class="igBar"><span id="lcode-4"><a href="#" onclick="javascript:showPlainTxt('code-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-4">
<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;">SELECT name&nbsp; FROM sbtest WHERE country_id = ? LIMIT <span style="color:#800000;color:#800000;">5</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>against table</p>
<div class="igBar"><span id="lcode-5"><a href="#" onclick="javascript:showPlainTxt('code-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-5">
<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;">CREATE TABLE IF NOT EXISTS sbtest <span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id int<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">10</span><span style="color:#006600; font-weight:bold;">&#41;</span> unsigned NOT NULL auto_increment,</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;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name varchar<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">64</span><span style="color:#006600; font-weight:bold;">&#41;</span> NOT NULL default <span style="color:#CC0000;">''</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; email varchar<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">64</span><span style="color:#006600; font-weight:bold;">&#41;</span> NOT NULL default <span style="color:#CC0000;">''</span>,</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;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; password varchar<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">64</span><span style="color:#006600; font-weight:bold;">&#41;</span> NOT NULL default <span style="color:#CC0000;">''</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dob date default NULL,</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;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; address varchar<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">128</span><span style="color:#006600; font-weight:bold;">&#41;</span> NOT NULL default <span style="color:#CC0000;">''</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; city varchar<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">64</span><span style="color:#006600; font-weight:bold;">&#41;</span> NOT NULL default <span style="color:#CC0000;">''</span>,</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;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state_id tinyint<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">3</span><span style="color:#006600; font-weight:bold;">&#41;</span> unsigned NOT NULL default <span style="color:#CC0000;">'0'</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zip varchar<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">8</span><span style="color:#006600; font-weight:bold;">&#41;</span> NOT NULL default <span style="color:#CC0000;">''</span>,</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;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; country_id smallint<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">5</span><span style="color:#006600; font-weight:bold;">&#41;</span> unsigned NOT NULL default <span style="color:#CC0000;">'0'</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PRIMARY KEY&nbsp; <span style="color:#006600; font-weight:bold;">&#40;</span>id<span style="color:#006600; font-weight:bold;">&#41;</span></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;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">CREATE INDEX email_idx on sbtest<span style="color:#006600; font-weight:bold;">&#40;</span>email<span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; &nbsp; </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;">CREATE INDEX country_id_idx on sbtest<span style="color:#006600; font-weight:bold;">&#40;</span>country_id,state_id,city<span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>with table size 1mil records fully fitting in memory. I run it with <strong>innodb_thread_concurrency=16</strong> to match threads inside InnoDB with count of cores.</p>
<p>Results for InnoDB-plugin-1.0.2 were kind of discouraging, dropping down just after 8 connections, si I decided to test MySQL-5.1.30 with standard InnoDB. It was better, but still far from what we can expect.</p>
<p>After investigation Yasufumi pointed to page_hash mutex, which was abused.  This mutex is used as mutex even in places where shared read lock is enough - and we replaced page_hash mutex to page_hash read-write lock.</p>
<p>The new results you can see on graph.</p>
<p><a href='http://www.mysqlperformanceblog.com/wp-content/uploads/2009/01/key_point1.png'><img src="http://www.mysqlperformanceblog.com/wp-content/uploads/2009/01/key_point1.png" alt="" title="key_point1" class="alignnone size-full wp-image-599" /></a></p>
<p>The patch for page_hash will be included in next release of XtraDB, and expect new results.</p>
<p>for reference InnoDB was run with next parameters:</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;">--max_connections=<span style="color:#800000;color:#800000;">3000</span> \</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">--table_cache=<span style="color:#800000;color:#800000;">2048</span> \</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;">--query_cache_size=<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;">--innodb_data_file_path=ibdata1:100M:autoextend \</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;">--innodb_buffer_pool_size=6GM \</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">--innodb_additional_mem_pool_size=20M \</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;">--innodb_log_file_size=128M \</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">--innodb_log_files_in_group=<span style="color:#800000;color:#800000;">2</span> \</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;">--innodb_log_buffer_size=8M \</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">--innodb_flush_log_at_trx_commit=<span style="color:#800000;color:#800000;">2</span> \</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;">--innodb_thread_concurrency=<span style="color:#800000;color:#800000;">16</span> \</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">--innodb_file_per_table=<span style="color:#800000;color:#800000;">1</span> \</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;">--innodb_flush_method=O_DIRECT </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Vadim |
      <a href="http://www.mysqlperformanceblog.com/2009/01/23/another-scalability-fix-in-xtradb/#comments">13 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/01/23/another-scalability-fix-in-xtradb/&amp;title=Another scalability fix in XtraDB" 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/01/23/another-scalability-fix-in-xtradb/&amp;title=Another scalability fix in XtraDB" 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/01/23/another-scalability-fix-in-xtradb/&amp;title=Another scalability fix in XtraDB" 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/01/23/another-scalability-fix-in-xtradb/&amp;T=Another scalability fix in XtraDB" 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/01/23/another-scalability-fix-in-xtradb/&amp;title=Another scalability fix in XtraDB" 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/01/23/another-scalability-fix-in-xtradb/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>5.0.75-build12 Percona binaries</title>
		<link>http://www.mysqlperformanceblog.com/2009/01/23/5075-build12-percona-binaries/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/01/23/5075-build12-percona-binaries/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 23:01:59 +0000</pubDate>
		<dc:creator>Vadim</dc:creator>
				<category><![CDATA[patch]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=595</guid>
		<description><![CDATA[After several important fixes to our patches we made binaries for build12.
Fixes include:
Control of InnoDB insert buffer to address problems Peter mentioned http://www.mysqlperformanceblog.com/2009/01/13/some-little-known-facts-about-innodb-insert-buffer/, also check Bug 41811  to see symptoms of problem with Insert buffer.
http://www.percona.com/docs/wiki/patches:innodb_io_patches
    * innodb_flush_neighbor_pages (default 1) - When the dirty page are flushed (written to datafile), this parameter [...]]]></description>
			<content:encoded><![CDATA[<p>After several important fixes to our patches we made binaries for build12.</p>
<p>Fixes include:</p>
<p>Control of InnoDB insert buffer to address problems Peter mentioned <a href="http://www.mysqlperformanceblog.com/2009/01/13/some-little-known-facts-about-innodb-insert-buffer/">http://www.mysqlperformanceblog.com/2009/01/13/some-little-known-facts-about-innodb-insert-buffer/</a>, also check <a href="http://bugs.mysql.com/bug.php?id=41811">Bug 41811</a>  to see symptoms of problem with Insert buffer.</p>
<p><a href="http://www.percona.com/docs/wiki/patches:innodb_io_patches">http://www.percona.com/docs/wiki/patches:innodb_io_patches</a></p>
<p>    * <strong>innodb_flush_neighbor_pages</strong> (default 1) - When the dirty page are flushed (written to datafile), this parameter determines whether the neighbor pages in the datafile are also flushed at the same time or not. If you use the storage which don't have “head seek delay” (e.g. SSD or enough Write-Buffered), 0 may show better performance. 0:disable, 1:enable</p>
<p>    *  <strong>innodb_ibuf_max_size</strong> (default [the half of innodb_buffer_pool_size](bytes)) - This parameter is startup parameter. If the lower value is set than the half of innodb_buffer_pool_size, it is used as maximum size of insert buffer. To restrict to the too small value (e.g. 0) is not recommended for performance. If you don't like the insert buffer growing bigger, you should use the following parameters instead. (* If you use very fast storage, small value (like several MB) may show better performance.)</p>
<p>    *  <strong>innodb_ibuf_accel_rate</strong> (default 100(%)) - This parameter is additional tuning the amount of insert buffer processing by background thread. Sometimes, only innodb_io_capacity is insufficient to tune the insert buffer.</p>
<p>    *  <strong>innodb_ibuf_active_contract</strong> (default 0) - By default (same to normal InnoDB), the each user threads do nothing about contracting the insert buffer until the insert buffer reaches its maximum size. 1 makes the each user threads positive to contract the insert buffer as possible in asynchronous.</p>
<p>Second important fix introduces variable <strong>use_global_long_query_time</strong>, which allows all current threads see change of <strong>long_query_time</strong>. By default value set in SET GLOBAL long_query_time=N command is visible only on new established connection, which is problem if you have pre-established connection pool, say in Java or Ruby on Rails application. With <strong>use_global_long_query_time=true</strong> even all current threads will respect SET GLOBAL long_query_time=N. The feature made for <a href="http://www.engineyard.com">EngineYard</a>, hosting provider for Ruby on Rails application.</p>
<p>You can download binaries (RPMS x86_64) and sources with patches here<br />
<a href="http://www.percona.com/mysql/5.0.75-b12/">http://www.percona.com/mysql/5.0.75-b12/</a></p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Vadim |
      <a href="http://www.mysqlperformanceblog.com/2009/01/23/5075-build12-percona-binaries/#comments">17 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/01/23/5075-build12-percona-binaries/&amp;title=5.0.75-build12 Percona binaries" 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/01/23/5075-build12-percona-binaries/&amp;title=5.0.75-build12 Percona binaries" 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/01/23/5075-build12-percona-binaries/&amp;title=5.0.75-build12 Percona binaries" 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/01/23/5075-build12-percona-binaries/&amp;T=5.0.75-build12 Percona binaries" 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/01/23/5075-build12-percona-binaries/&amp;title=5.0.75-build12 Percona binaries" 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/01/23/5075-build12-percona-binaries/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>How Percona Develops Open-Source Software</title>
		<link>http://www.mysqlperformanceblog.com/2009/01/09/how-percona-develops-open-source-software/</link>
		<comments>http://www.mysqlperformanceblog.com/2009/01/09/how-percona-develops-open-source-software/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 02:22:52 +0000</pubDate>
		<dc:creator>Baron Schwartz</dc:creator>
				<category><![CDATA[community]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[percona]]></category>
		<category><![CDATA[xtradb]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=574</guid>
		<description><![CDATA[Percona has been building and contributing to open-source software since the company was founded, and individually we've been doing the same thing for many years.  We think it's a huge value for our customers and the community.
We're involved in a dozen or so open-source projects, but our three core efforts at the moment are the [...]]]></description>
			<content:encoded><![CDATA[<p>Percona has been building and contributing to open-source software since the company was founded, and individually we've been doing the same thing for many years.  We think it's a huge value for our customers and the community.</p>
<p>We're involved in a dozen or so open-source projects, but our three core efforts at the moment are the following:</p>
<ul>
<li><a href="http://www.percona.com/percona-lab.html">Percona patches</a>, which are included in our own MySQL builds and then in OurDelta builds and perhaps others as well</li>
<li><a href="https://launchpad.net/percona-xtradb">XtraDB</a>, which is our new high-performance transactional storage engine</li>
<li><a href="http://www.maatkit.org/">Maatkit</a>, which is a toolkit that provides advanced functionality for MySQL.</li>
</ul>
<p>We have a team of dedicated MySQL developers working on the server and on ExtraDB, and a  dedicated Maatkit developer.  Other Percona employees also put significant time into these projects.</p>
<p>Outside observers have commented that our development process doesn't seem very open-source.  That is, we typically just go build the software and then announce it.  We don't involve the community very much in our decisions about what features to include, or how they should get built; and we don't encourage community contributions directly into our codebase.  There's also some ambiguity about where the money comes from and where it goes.  These are all fair points to bring up.  Peter, Vadim and I thought we should address them and let everyone know how we really work on these things and what our vision for the future is.</p>
<p><strong>How We Decide On Features</strong></p>
<p>There are at least three sources of input into how we prioritize our work.</p>
<ol>
<li><strong>Clear and present needs</strong>.  If we are crippled day in and day out by the lack of some feature, or the presence of some bug, then we will take the initiative to fix it.  The most obvious example is our enhanced slow-logging functionality, which is part of our standard patches.  These patches make it possible to learn a great deal about what your server is doing and how to optimize it.</li>
<li><strong>Customer demands</strong>.  Customers come to us and ask for the features that <em>they</em> see as clear and present needs; or they come to us with particular performance issues and we analyze it and find that the best solution is to modify the server.  Many of the other features in our patch set are in this category, as is a lot of ongoing work that's not released yet.</li>
<li><strong>The general public</strong>.  People comment on our blog posts, or send us email, and so forth.  We notice these requests, and if they come up often enough and we think they'll be useful, they start to stick in our brains and we eventually put them on the TODO list.</li>
</ol>
<p>The order of priorities is this: paying customers, obvious needs for our consulting practice, and the public wishlist.  However, even when work is sponsored by paying customers, we don't just blindly put the features into our Percona builds.  Firstly, customers get to choose whether they want us to do this.  Secondly, the builds are designed to <em>meet real-world needs</em> and we are working very carefully to enhance the MySQL server but not end up with a chaotic mix of random stuff.</p>
<p>Some features are also so specific to certain customers that we don't include them.  When we do target an improvement for our builds, it's a big win for everyone, because we share the development cost with the customer (you can think of it as an open-source discount; it is us contributing towards the public good) and we maintain the feature in subsequent minor versions of the server free of charge.  Features that we don't include in our public patch set don't get forward-ported for free, so customers pay if they want a version that is ported to a newer server.</p>
<p>In a separate category, there's also work that we do for customers which is <strong>not</strong> open-source.  We are currently customizing the MySQL server and storage engines for some of Silicon Valley's most innovative startups.  I won't talk about this any more, but I wanted to mention it for the sake of full disclosure.</p>
<p><strong>How We Support Our Work</strong></p>
<p>This work is usually supported by our customers.  (It happens, but not often, that someone just writes new functionality for free in spare time.)  However, if the work is open-source, we generally run this as a "less-for-profit" part of our business.  I'll clarify that in a minute.</p>
<p>There are generally two ways that we channel money to features.  The first is when a customer says "I want this" and pays us to build it.  In these cases, we work on a schedule to deliver the required features.  We treat it as developer-for-hire with all the normal expectations of being hired.  If we all agree that the result will be open-sourced and the general public will benefit, then we work for a discount.  We're still working for a profit -- part of our business is custom MySQL development, after all -- but we discount it.</p>
<p>The second way is when people say "here's some money for the general fund to support your <a href="http://www.percona.com/docs/wiki/devplan:start">future planned features</a>."  In this case, the money goes into the queue for when someone is available to work on the modifications, and we either pay attention to any preferences the donor has, or we use our judgment as to which enhancements will add the most value to our builds.  In practice, this second model has not happened very often; we have used it more for Maatkit and <a href="http://code.google.com/p/mysql-master-master/">MMM</a> than for server patches.  But we hope that will change as more people find out about the possibility for getting their wishes.  This model lets us work on features that everyone wants but no one wants to pay for.  And in this case we work on a non-profit basis: the developer who works on the features is paid at a special rate for "internal work" (as opposed to working for "external customers").</p>
<p>You can also think about this as dual sources for the money to support the open-source efforts.  One is customers who channel money directly to development.  (Thanks!) The other is <em>all of our customers</em> who are indirectly sponsoring the development just by being customers.  In other words, if you're a customer, you're contributing to open-source software development.  (Thanks to you, too!)</p>
<p>If you would like Percona to create custom MySQL features or builds for you, please <a href="http://www.percona.com/contacts.html">contact us</a>.</p>
<p><strong>Why We Don't Grant Commit Rights</strong></p>
<p>As far as we know, no one has ever asked for commit rights to our codebase.</p>
<p>That aside, the Percona contributions to open-source are not a potluck dinner where everyone brings something and puts it on the table.  These builds are stamped with our name and are downloadable from our website.  They're a core part of our offering to customers (and non-customers can get them for free, too).  If you're a customer, we stand behind the builds and we support them.  The builds power some of the most demanding MySQL installations in the world.  All code has to be vetted very carefully, and all features have to deliver a compelling value.</p>
<p>There's an overarching reason, though.  Percona is not the ultimate upstream source.  Community contributions ought to be going into the MySQL codebase, not the Percona codebase.  Percona's relationship to the rest of the community is that of a peer, not a parent.</p>
<p>Perhaps some of you are wondering, "why don't you contribute your patches back to MySQL?"</p>
<p>We do contribute our patches.  They are GPL-licensed, which is both generous and fair, and MySQL is free to take them without even asking permission, as long as they abide by the GPL.  We welcome <em>everyone</em> to use our patches.  OurDelta does so -- it is a great example of how the community can aggregate patches and make something greater than the sum of the parts.</p>
<p>When it comes to Sun/MySQL, we actively and openly talk to them about it, and it's an ongoing conversation.  However, there are various reasons why it's not the ultimate solution for our customers, and their interests come first.  For one thing, getting patches accepted is a somewhat laborious process, and we don't have the resources for it ourselves.  We could do it, but we'd have to pass the costs on to our customers.</p>
<p>The second thing is that it takes far too long for patches to actually show up in a GA version of the server.  Customers pay us to solve their problems <em>now</em>.  This means that one way or another, we're going to be maintaining the custom patches in our own tree and making our own builds, and there is no sense in doing a halfway job of it.  So that removes the motivation for us or our customers to try to get Sun/MySQL to accept the patches -- it wouldn't add any extra value.  We'd like Sun/MySQL to accept the patches, but with the customers' needs solved, the onus is on them to do it, which seems fair -- after all, Percona and Percona customers already co-sponsored the development, and Sun/MySQL will be reselling the results.</p>
<p>This is a large and contentious topic that has been discussed at great length elsewhere and is not appropriate to get into here in its full scope.  But I'll point out that some of our patches have been accepted in the past and there are signs that this might continue.  We certainly hope so.</p>
<p><strong>How You Can Get Your Wishes To Come True</strong></p>
<p>If you have a particular need for some modification to the MySQL server, XtraDB, Maatkit, our InnoDB data recovery tools, MMM, innotop, or even projects like standard GNU utilities, we're listening.  You can contact us through our website, and offer to sponsor the work.  There are also mailing lists for our various projects.</p>
<p>Here's an example: wouldn't it be great if there were a built-in type in MySQL that could store date and time with microsecond precision?  Lots of people have asked for that.  If you all put some money in the hat, it could become a reality.</p>
<p><strong>Where It All Begins</strong></p>
<p>Our open-source efforts flow from our <a href="http://www.percona.com/our-vision.html">company values</a>.  We believe that software and information wants to be free.  We also support innovation and entrepreneurship.  We like to combine these things when we can!  The complexity of our customers' different situations leads to the need for a lot of flexibility in our approach, which is why there are so many nuances.  And we generally try to create incentive towards what we see as the public good. That's the motivation behind our shared-development-cost model, for example -- it creates an incentive for customers to say "yes" when we ask them to agree to open-source the features.</p>
<p>Open-source is not a passing fad.  It's not a marketing gimmick for us.  It's who we are at the core.  Funding its development in a fair way is a great balancing act, and finding a balance that seems to make sense for everyone is very rewarding.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Baron Schwartz |
      <a href="http://www.mysqlperformanceblog.com/2009/01/09/how-percona-develops-open-source-software/#comments">3 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/01/09/how-percona-develops-open-source-software/&amp;title=How Percona Develops Open-Source Software" 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/01/09/how-percona-develops-open-source-software/&amp;title=How Percona Develops Open-Source Software" 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/01/09/how-percona-develops-open-source-software/&amp;title=How Percona Develops Open-Source Software" 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/01/09/how-percona-develops-open-source-software/&amp;T=How Percona Develops Open-Source Software" 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/01/09/how-percona-develops-open-source-software/&amp;title=How Percona Develops Open-Source Software" 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/01/09/how-percona-develops-open-source-software/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
