<?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>Transactions on InnoDB &#187; Mutexes</title>
	<atom:link href="http://blogs.innodb.com/wp/tag/mutexes/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.innodb.com/wp</link>
	<description>&#34;The word&#34; about InnoDB Products and Technology</description>
	<lastBuildDate>Fri, 23 Dec 2011 11:17:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Plug In for Performance and Scalability</title>
		<link>http://blogs.innodb.com/wp/2009/03/plug-in-for-performance-and-scalability/</link>
		<comments>http://blogs.innodb.com/wp/2009/03/plug-in-for-performance-and-scalability/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 22:00:41 +0000</pubDate>
		<dc:creator>Ken Jacobs</dc:creator>
				<category><![CDATA[InnoDB Plugin]]></category>
		<category><![CDATA[Built-in]]></category>
		<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Configuration parameter]]></category>
		<category><![CDATA[Hash index]]></category>
		<category><![CDATA[Insert buffer]]></category>
		<category><![CDATA[Memory]]></category>
		<category><![CDATA[Mutexes]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Tuning]]></category>

		<guid isPermaLink="false">http://blogs.innodb.com/wp/?p=67</guid>
		<description><![CDATA[Why should you care about the latest &#8220;early adopter&#8221; release of the InnoDB Plugin, version 1.0.3?   One word: performance! The release introduces these features: Enhanced concurrency &#38; scalability: the “Google SMP patch” using atomic instructions for mutexing More efficient memory allocation: ability to use more scalable platform memory allocator Improved out-of-the-box scalability: unlimited concurrent [...]]]></description>
			<content:encoded><![CDATA[<p>Why should you care about the latest &#8220;early adopter&#8221; release of the InnoDB Plugin, version 1.0.3?   One word: <strong>performance!</strong> The release introduces these features:</p>
<ul>
<li>Enhanced concurrency &amp; scalability: the “Google SMP patch” using atomic instructions for mutexing</li>
<li>More efficient memory allocation: ability to use more scalable platform memory allocator</li>
<li>Improved out-of-the-box scalability: unlimited concurrent thread execution by default</li>
<li>Dynamic tuning: at run-time, enable or disable insert buffering and adaptive hash indexing</li>
</ul>
<p>These new performance features can yield <strong>up to twice the throughput</strong> or more, depending on your workload, platform and other tuning considerations.   In another post, we explore some details about these changes, but first, what do these enhancements mean for performance and scalability?</p>
<p>In brief, we&#8217;ve tested three different workloads (joins, DBT2 OLTP and a modified sysbench) using a memory-resident database.  In all cases, the InnoDB Plugin scales significantly better than the built-in InnoDB in MySQL 5.1.  And in some cases, the absolute level of performance is dramatically higher too!   The charts below illustrate the kinds of performance gains we&#8217;ve measured with release 1.0.3 of the InnoDB Plugin. Your mileage may vary, of course.  See the <a href="http://www.innodb.com/wp/innodb_plugin/plugin-performance">InnoDB website</a> for all the details on these tests.</p>
<p>This release of the InnoDB Plugin incorporates a <a href="http://code.google.com/p/google-mysql-tools/wiki/SmpPerformance" target="new">patch made by Ben Handy and Mark Callaghan at Google</a> to improve multi-core scalability by using more efficient synchronization methods (mutexing and rw-locks) to reduce cpu utilization and contention.   We&#8217;re grateful for this contribution, and you will be too!</p>
<p><span id="more-67"></span></p>
<p>Now to our test results &#8230;</p>
<p><strong>Joins: </strong>The following chart shows the performance gains in performing joins, comparing the built-in InnoDB in MySQL (in <span style="color:blue">blue</span>) with the InnoDB Plugin 1.0.3 (in <span style="color:red">red</span>).</p>
<div class="separator" style="clear: both; text-align: center;"><a style="margin-left: 1em;" href="http://spreadsheets.google.com/pub?key=ppe5byK5r-M54VD8dWLF0Vw&amp;oid=7&amp;output=image"><img src="http://spreadsheets.google.com/pub?key=ppe5byK5r-M54VD8dWLF0Vw&amp;oid=7&amp;output=image" border="0" alt="" width="400" height="250" /></a></div>
<p>As you can see from the blue bars in the above chart, with MySQL 5.1 using the built-in InnoDB, the total number of joins the system can execute declines as the number of concurrent users increases.   In contrast, the InnoDB Plugin slightly improves performance even with one user, and maintains performance as the number of users rises.   This performance improvement is due in large part to the use of atomics for mutexing in the InnoDB Plugin.</p>
<p><strong>Transaction Processing (DBT2):</strong> The following chart illustrates a scalability improvement using  the OLTP read/write DBT2 benchmark, again comparing the performance of <span style="color:blue">the built-in InnoDB in MySQL</span> with the performance of <span style="color:red">InnoDB Plugin 1.0.3</span>.</p>
<div class="separator" style="clear: both; text-align: center;"><a style="margin-left: 1em;" href="http://spreadsheets.google.com/pub?key=ppe5byK5r-M54VD8dWLF0Vw&amp;oid=8&amp;output=image"><img src="http://spreadsheets.google.com/pub?key=ppe5byK5r-M54VD8dWLF0Vw&amp;oid=8&amp;output=image" border="0" alt="" width="400" height="250" /></a></div>
<p>Here, the InnoDB Plugin scales better than the built-in InnoDB from 16 to 32 users and produces about 12% more throughput with 64 concurrent users, as other bottlenecks are encountered or system capacity is reached.  This improvement is likewise due primarily to the changes in mutexing.</p>
<p><strong>Modified Sysbench:</strong> This test uses a version of the well-known sysbench workload, modified to include queries based on a secondary index, <a href="http://mysqlha.blogspot.com/2009/02/update-for-sysbench.html">as suggested</a> by Mark Callaghan of Google.</p>
<div class="separator" style="clear: both; text-align: center;"><a style="margin-left: 1em;" href="http://spreadsheets.google.com/pub?key=ppe5byK5r-M54VD8dWLF0Vw&amp;oid=9&amp;output=image"><img src="http://spreadsheets.google.com/pub?key=ppe5byK5r-M54VD8dWLF0Vw&amp;oid=9&amp;output=image" border="0" alt="" width="400" height="250" /></a></div>
<p>This time, the InnoDB Plugin shows significantly better scalability from 8 to 64 users than the built-in InnoDB in MySQL, yielding as much as 60% more throughput at 64 users.  Like the previous examples, this improvement is largely due to the use of atomics for mutexing.</p>
<p><strong>Modified Sysbench with tcmalloc:</strong> This test uses the same modified sysbench workload, but shows the difference between the built-in InnoDB (which uses the internal InnoDB memory allocator) and the InnoDB Plugin when using a more scalable memory allocator, in this case <a href="http://google-perftools.googlecode.com/svn/trunk/doc/tcmalloc.html">tcmalloc</a>.</p>
<div class="separator" style="clear: both; text-align: center;"><a style="margin-left: 1em;" href="http://spreadsheets.google.com/pub?key=ppe5byK5r-M54VD8dWLF0Vw&amp;oid=10&amp;output=image"><img src="http://spreadsheets.google.com/pub?key=ppe5byK5r-M54VD8dWLF0Vw&amp;oid=10&amp;output=image" border="0" alt="" width="400" height="250" /></a></div>
<p>When the new configuration parameter <code>innodb_use_sys_malloc</code> is set to enable use of the memory allocator tcmalloc, the InnoDB Plugin really shines!  Transaction throughput continues to scale, and the actual throughput with 64 users has nearly doubled!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.innodb.com/wp/2009/03/plug-in-for-performance-and-scalability/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

