<?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>PlanetMysql.ru - информация о СУБД MySQL &#187; InnoDB</title>
	<atom:link href="http://planetmysql.ru/category/innodb/feed/" rel="self" type="application/rss+xml" />
	<link>http://planetmysql.ru</link>
	<description>Блог о самой популярной СУБД MySQL</description>
	<lastBuildDate>Sat, 11 Feb 2012 12:38:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>New England’s Victory (for Big Data)</title>
		<link>http://www.tokutek.com/2012/02/new-england%E2%80%99s-victory-for-big-data/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-englands-victory-for-big-data</link>
		<comments>http://www.tokutek.com/2012/02/new-england%E2%80%99s-victory-for-big-data/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 17:06:01 +0000</pubDate>
		<dc:creator>Tokuview Blog</dc:creator>
				<category><![CDATA[big data]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[nedb12]]></category>
		<category><![CDATA[newsql]]></category>
		<category><![CDATA[TokuDB]]></category>
		<category><![CDATA[tokutek]]></category>
		<category><![CDATA[TokuView]]></category>

		<guid isPermaLink="false">http://www.tokutek.com/?p=3736</guid>
		<description><![CDATA[While it might not have been New England’s weekend on the Big Gridiron, it was certainly New England’s day for Big Data at the New England Database Summit on Friday at MIT.
The summit was well attended, with 350 registrants and keynotes from prominent MySQL users such as Mark Callaghan. The coverage was quite broad, with presentations running the gamut from grad students (complete with bodyguards and intimidating academic advisors) to established companies such as StreamBase. The sponsor list was an A-list this year as well, with EMC and Microsoft being the two biggest backers.
There were far too many and diverse topics to write about all of them. That said, here were a few of the notable ones.
Keynote #1: Johannes Gehrke (Cornell): Declarative Data-Driven Coordination
Johannes Gehrke of Cornell kicked off with the first keynote on Declarative-Driven Coordination. His methodology shed light on an alternative to out-of-band communication. The presentation focused on how to successfully handle entangled queries.

More Sleep for Tom and Meg if They Can Just Coordinate
In brief, what he showed is a way for someone to see if their friend is on a flight and have the database go about satisfying mutual constraints. With a proof that is outlined in his Sigmod paper, his main theorem is that any schedule that is entangled-isolated is also oracle-serializable. It’s a clever approach, as long as one’s set of friends being entangled remains small.
Keynote #2: Mark Callaghan (Facebook): Performance is Overrated
The room got a little quiet when Mark took the stage. Some people were expecting a possible rehash of this summer’s brouhaha between Mike Stonebraker and Facebook on the fate of MySQL. But, instead Mark jumped into some very practical discussions about managing MySQL at scale.
First, he noted that manageability needs more attention since…


The cost of extra hardware can be predicted
The cost of downtime cannot
Downtime comes in many forms (server down and server too busy)


For Mark, manageability has a number of meanings. This includes the rate of interrupts/server for the operations team. Mark finds that while the server count grows quickly, his operations team grows slowly. Hence, it is imperative that the quality-of-service improve over time (i.e., Does work get done? Does work get done on time?).
Mark and his team use MySQL for a number of reasons. First, it was there when Mark arrived. Second, Mark and his team made it scale 10x. Finally, Mark likes MySQL for OLTP.
As Facebook has grown though, so have the number of servers. This is due to &#8220;Big Data&#8221; x high QPS. Hence, they have had to add servers to add IOPs. To address this, Mark noted that flash memory (SSD) is very interesting as are (we blush) write-optimized databases.
The last part of his presentation focused on advice for scaling: More Data, More QPS. His tips were quite straightforward:


Fix stalls to make use of capacity

Don’t make MySQL faster, make it less slow



Improve efficiency to use less
Repeat


 Additional details can be found in Sheeri’s excellent live blog of the presentation.
New Tools and Systems Session: Willis Lang (University of Wisconsin): Energy-Conscious Data Management Systems
Just as Mark stressed that performance isn’t everything when he spoke about management, Willis Lang pointed out another key concern.  His slides noted that “three decades of database research has optimized for the highest possible performance possible regardless of energy consumption.” (We agree and have written about this topic as well).
Willis and his team have been looking at various techniques for addressing this such as using variable speed disks. He has been systematically studying the power/performance trade-offs of hardware components. The preliminary memory-based results showed that interesting trade-off opportunities exist if one rethinks database design principles. His presentation focused on the improvements that can be seen with memory parking. Additional details on his research can be found here.
As mentioned previously, there were many good talks &#8212; much more could be written about the event. Other interesting speakers included David Karger who introduced Dido, which seeks to make database manipulation as easy as document editing, and Alvin Cheung whose Pyxis project eases application development with automatic code partitioning based on application and server characteristics.
Kudos to Samuel Madden (MIT) and Ugur Cetintemel (Brown University) for organizing the event. Additional details can also be found via the Twitter hashtag #nedb12 and the event homepage.
&#160;]]></description>
			<content:encoded><![CDATA[<p>While it might not have been New England’s weekend on the <a href="http://www.boston.com/sports/football/patriots/articles/2012/02/05/giants_win_super_bowl_rematch_over_patriots/" >Big Gridiron</a>, it was certainly New England’s day for Big Data at the <a href="http://db.csail.mit.edu/nedbday12/" >New England Database Summit</a> on Friday at MIT.</p>
<p>The summit was well attended, with <a href="http://twitter.com/sheeri/statuses/165449298471944192" >350 registrants</a> and keynotes from prominent MySQL users such as <a href="http://mysqlha.blogspot.com/" >Mark Callaghan</a>. The coverage was quite broad, with presentations running the gamut from grad students (<a href="http://twitter.com/samrmadden/status/165530898035523584/photo/1" >complete with bodyguards and intimidating academic advisors</a>) to established companies such as StreamBase. The sponsor list was an A-list this year as well, with EMC and Microsoft being the two biggest backers.</p>
<p>There were far <a href="http://db.csail.mit.edu/nedbday12/program.html" >too many and diverse topics</a> to write about all of them. That said, here were a few of the notable ones.</p>
<p><strong>Keynote #1: Johannes Gehrke (Cornell): <em>Declarative Data-Driven Coordination</em></strong></p>
<p><a href="http://www.cs.cornell.edu/johannes/" >Johannes Gehrke of Cornell</a> kicked off with the first keynote on Declarative-Driven Coordination. His methodology shed light on an alternative to out-of-band communication. The presentation focused on how to successfully handle entangled queries.</p>
<p align="center"><a href="http://www.tokutek.com/wp-content/uploads/2012/02/NEDBDAY12.jpg" rel="shadowbox[sbpost-3736];player=img;" ><img class="aligncenter size-full wp-image-4364" title="NEDBDAY12" src="http://www.tokutek.com/wp-content/uploads/2012/02/NEDBDAY12.jpg" alt="" width="600" height="1456" /></a></p>
<p align="center">More Sleep for Tom and Meg if They Can Just Coordinate</p>
<p>In brief, what he showed is a way for someone to see if their friend is on a flight and have the database go about satisfying mutual constraints. With a proof that is outlined in his <a href="http://www.cs.cornell.edu/~lucja/Publications/sigmod150-gupta.pdf" >Sigmod paper</a>, <a href="http://twitter.com/tokutek/statuses/165448207617368065" >his main theorem is that any schedule that is entangled-isolated is also oracle-serializable</a>. It’s a clever approach, as long as one’s set of friends being entangled remains small.</p>
<p><strong>Keynote #2: Mark Callaghan (Facebook): <em>Performance is Overrated</em></strong></p>
<p>The room got a little quiet when Mark took the stage. Some people were expecting a possible rehash of this summer’s brouhaha between <a href="http://www.theregister.co.uk/2011/07/13/mike_stonebraker_versus_facebook/" >Mike Stonebraker and Facebook</a> on the fate of MySQL. But, instead Mark jumped into some very practical discussions about managing MySQL at scale.</p>
<p>First, he noted that manageability needs more attention since…</p>
<ul>
<ul>
<li>The cost of extra hardware can be predicted</li>
<li>The cost of downtime cannot</li>
<li>Downtime comes in many forms (server down and server too busy)</li>
</ul>
</ul>
<p>For Mark, manageability has a number of meanings. This includes the rate of interrupts/server for the operations team. Mark finds that while the server count grows quickly, his operations team grows slowly. Hence, it is imperative that the quality-of-service improve over time (i.e., Does work get done? Does work get done on time?).</p>
<p>Mark and his team use MySQL for a number of reasons. First, it was there when Mark arrived. Second, Mark and his team made it scale 10x. Finally, Mark likes MySQL for OLTP.</p>
<p>As Facebook has grown though, so have the number of servers. This is due to &#8220;Big Data&#8221; x high QPS. Hence, they have had to add servers to add IOPs. To address this, Mark noted that flash memory (SSD) is very interesting as are (we blush) write-optimized databases.</p>
<p>The last part of his presentation focused on advice for scaling: More Data, More QPS. His tips were quite straightforward:</p>
<ul>
<ul>
<li>Fix stalls to make use of capacity</li>
<ul>
<li>Don’t make MySQL faster, make it less slow</li>
</ul>
</ul>
<ul>
<li>Improve efficiency to use less</li>
<li>Repeat</li>
</ul>
</ul>
<p> Additional details can be found in <a href="http://sheeri.com/" >Sheeri’s</a> excellent <a href="http://sheeri.com/content/liveblogging-performance-overrated-mark-ca" >live blog of the presentation</a>.</p>
<p><strong>New Tools and Systems Session: Willis Lang (University of Wisconsin): <em>Energy-Conscious Data Management Systems</em></strong></p>
<p>Just as Mark stressed that performance isn’t everything when he spoke about management, <a href="http://pages.cs.wisc.edu/~wlang/" >Willis Lang</a> pointed out another key concern.  His slides noted that “three decades of database research has optimized for the highest possible performance possible regardless of energy consumption.” (We agree and have <a href="http://t.co/znUcYdHx" >written about this topic as well</a>).</p>
<p>Willis and his team have been looking at various techniques for addressing this such as using variable speed disks. He has been systematically studying the power/performance trade-offs of hardware components. The preliminary memory-based results showed that interesting trade-off opportunities exist if one rethinks database design principles. His presentation focused on the improvements that can be seen with memory parking. Additional details on his research can be found <a href="http://pages.cs.wisc.edu/~wlang/" >here</a>.</p>
<p>As mentioned previously, there were many good talks &#8212; much more could be written about the event. Other interesting speakers included <a href="http://people.csail.mit.edu/karger/" >David Karger</a> who introduced <a href="http://t.co/bsS7Stte" >Dido</a>, which seeks to make database manipulation as easy as document editing, and <a href="http://people.csail.mit.edu/akcheung/" >Alvin Cheung</a> whose Pyxis project eases application development with automatic code partitioning based on application and server characteristics.</p>
<p>Kudos to <a href="http://db.lcs.mit.edu/madden/" >Samuel Madden (MIT)</a> and <a href="http://www.cs.brown.edu/people/faculty/ugur.html" >Ugur Cetintemel (Brown University)</a> for organizing the event. Additional details can also be found <a href="http://twitter.com/search?q=%23nedb12" >via the Twitter hashtag #nedb12</a> and the <a href="http://db.csail.mit.edu/nedbday12/" >event homepage</a>.</p>
<p>&nbsp;</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31914&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31914&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/02/06/new-englands-victory-for-big-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>1 Billion Insertions – The Wait is Over!</title>
		<link>http://www.tokutek.com/2012/01/1-billion-insertions-%E2%80%93-the-wait-is-over/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=1-billion-insertions-the-wait-is-over</link>
		<comments>http://www.tokutek.com/2012/01/1-billion-insertions-%E2%80%93-the-wait-is-over/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 16:54:55 +0000</pubDate>
		<dc:creator>Tokuview Blog</dc:creator>
				<category><![CDATA[announcement]]></category>
		<category><![CDATA[benchmarking]]></category>
		<category><![CDATA[big data]]></category>
		<category><![CDATA[fractal tree indexes]]></category>
		<category><![CDATA[iibench]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[insert]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[storage engine]]></category>
		<category><![CDATA[TokuDB]]></category>
		<category><![CDATA[tokutek]]></category>
		<category><![CDATA[TokuView]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.tokutek.com/?p=3723</guid>
		<description><![CDATA[iiBench measures the rate at which a database can insert new rows while maintaining several secondary indexes. We ran this for 1 billion rows with TokuDB and InnoDB starting last week, right after we launched TokuDB v5.2. While TokuDB completed it in 15 hours, InnoDB took 7 days.
The results are shown below. At the end of the test, TokuDB&#8217;s insertion rate remained at 17,028 inserts/second whereas InnoDB had dropped to 1,050 inserts/second. That is a difference of over 16x. Our complete set of benchmarks for TokuDB v5.2 can be found here.




Benchmark Details: Ubuntu 10.10; 2x Xeon X5460; 16GB RAM; 8x 146GB 10k SAS in RAID10. Each data point is the average insertion rate for the last 2 million rows. 



We developed the iiBench benchmark to measure performance for a use case that occurs commonly in production applications, such as online advertising, social media, and network management.
iiBench simulates a pattern of usage for always-on applications that:

Require fast query performance and hence require indexes
Have high data insert rates
Cannot wait for offline batch processing and hence require the indexes be maintained as data comes in

Note that iiBench was created as an open-source benchmark, which allows others to freely use it, extend it, and contribute their changes back. We originally unveiled the benchmark in the context of a challenge issued at the 2008 OpenSQL camp. Since then, iiBench has been downloaded and used many times, and ported by the community (in this case, Mark Callaghan) to a Python Script.
Please let us know any feedback you have on iiBench. For additional information on…

iibench overview click here
TokuDB version 5.2 Overview click here
TokuDB version 5.2 Performance, including iibench, SysBench, Compression, and TPCC-like, click here]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.tokutek.com/products/iibench/" >iiBench</a> measures the rate at which a database can insert new rows while maintaining several secondary indexes. We ran this for 1 billion rows with TokuDB and InnoDB starting last week, right after we launched <a href="http://www.tokutek.com/2012/01/announcing-tokudb-v5-2-improved-multi-client-scaling-and-faster-queries/" >TokuDB v5.2</a>. While TokuDB completed it in 15 hours, InnoDB took 7 days.</p>
<p>The results are shown below. At the end of the test, TokuDB&#8217;s insertion rate remained at 17,028 inserts/second whereas InnoDB had dropped to 1,050 inserts/second. That is a difference of <strong>over 16x</strong>. Our complete set of benchmarks for TokuDB v5.2 can be found <a href="http://www.tokutek.com/resources/benchmarks/" >here</a>.</p>
<p><a href="http://www.tokutek.com/wp-content/uploads/2012/01/iibench.png" rel="shadowbox[sbpost-3723];player=img;" ><img class="aligncenter size-full wp-image-4152" title="iibench" src="http://www.tokutek.com/wp-content/uploads/2012/01/iibench.png" alt="" width="650" /></a></p>
<table width="70%">
<tbody>
<tr>
<td><span><span><strong><span><span>Benchmark Details</span></span><span>:</span></strong><span> Ubuntu 10.10; 2x Xeon X5460; 16GB RAM; 8x 146GB 10k SAS in RAID10. Each data point is the average</span><span> insertion rate for the last 2 million rows. </span></span></span></td>
</tr>
</tbody>
</table>
<p>We developed the iiBench benchmark to measure performance for a use case that occurs commonly in production applications, such as online advertising, social media, and network management.</p>
<p>iiBench simulates a pattern of usage for always-on applications that:</p>
<ul>
<li>Require fast query performance and hence require indexes</li>
<li>Have high data insert rates</li>
<li>Cannot wait for offline batch processing and hence require the indexes be maintained as data comes in</li>
</ul>
<p>Note that iiBench was created as an open-source benchmark, which allows others to freely use it, extend it, and contribute their changes back. We originally unveiled the benchmark in the context of <a href="http://www.tokutek.com/products/iibench/iibench-challenge" >a challenge</a> issued at the <a href="http://www.opensqlcamp.org/index.php?title=Events/2008/" >2008 OpenSQL camp</a>. Since then, iiBench has been downloaded and used many times, and ported by the community (in this case, Mark Callaghan) to a <a href="http://bazaar.launchpad.net/~mdcallag/mysql-patch/mytools/annotate/head%3A/bench/ibench/iibench.py" >Python Script</a>.</p>
<p>Please let us know any feedback you have on iiBench. For additional information on…</p>
<ul>
<li>iibench overview click <a href="http://www.tokutek.com/products/iibench/" >here</a></li>
<li>TokuDB version 5.2 Overview click <a href="http://www.tokutek.com/2012/01/announcing-tokudb-v5-2-improved-multi-client-scaling-and-faster-queries/" >here</a></li>
<li>TokuDB version 5.2 Performance, including iibench, SysBench, Compression, and TPCC-like, click <a href="http://www.tokutek.com/resources/benchmarks/" >here</a></li>
</ul><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31816&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31816&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/01/26/1-billion-insertions-the-wait-is-over/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building MariaDB 5.1 on Windows</title>
		<link>http://www.chriscalender.com/?p=736&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=building-mariadb-5-1-on-windows</link>
		<comments>http://www.chriscalender.com/?p=736#comments</comments>
		<pubDate>Mon, 23 Jan 2012 19:32:36 +0000</pubDate>
		<dc:creator>Chris Calender</dc:creator>
				<category><![CDATA[5.1.60-MariaDB-debug]]></category>
		<category><![CDATA[build maria on windows]]></category>
		<category><![CDATA[build mariadb on windows]]></category>
		<category><![CDATA[build mysql on windows]]></category>
		<category><![CDATA[chris calender]]></category>
		<category><![CDATA[configure.js]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[FederatedX]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[maria]]></category>
		<category><![CDATA[maria windows]]></category>
		<category><![CDATA[MariaDB]]></category>
		<category><![CDATA[MariaDB 5.1.60]]></category>
		<category><![CDATA[mariadb windows]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[MySQL Windows]]></category>
		<category><![CDATA[xtradb]]></category>

		<guid isPermaLink="false">http://www.chriscalender.com/?p=736</guid>
		<description><![CDATA[Recently, I found myself needing MariaDB 5.1.60 for Windows for some testing purposes.  Therefore, I needed to build it from source.  I ended up using what I&#8217;d call a &#8220;blend&#8221; of the commands listed in this &#8220;how-to&#8221; and the readme file INSTALL-WIN-SOURCE, so I thought I&#8217;d post those steps.

Download 5.1.60 MariaDB source from here.

cd C:\mariadb-5.1

win\configure.js

cmake .
VS: File -&#62; Open -&#62; Solution -&#62; MySql.sln
VS: Build -&#62; Build Solution
VS: Right-click &#8220;PACKAGE&#8221; -&#62; Build (in &#8220;Solution Explorer&#8221; View)

That&#8217;s it.
Let&#8217;s fire it up:
MariaDB&#62; select version();
+----------------------+
&#124; version()            &#124;
+----------------------+
&#124; 5.1.60-MariaDB-debug &#124;
+----------------------+

MariaDB&#62; show global variables like 'innodb_version';
+----------------+-------------+
&#124; Variable_name  &#124; Value       &#124;
+----------------+-------------+
&#124; innodb_version &#124; 1.0.17-13.0 &#124;
+----------------+-------------+

MariaDB&#62; show engines;
+------------+---------+---------------------------...
&#124; Engine     &#124; Support &#124; Comment		   ...
+------------+---------+---------------------------...
&#124; CSV        &#124; YES     &#124; CSV storage engine	   ...
&#124; InnoDB     &#124; DEFAULT &#124; Percona-XtraDB, Supports t...
&#124; PBXT       &#124; YES     &#124; High performance, multi-ve...
&#124; MARIA      &#124; YES     &#124; Crash-safe tables with MyI...
&#124; MyISAM     &#124; YES     &#124; Default engine as of MySQL...
&#124; FEDERATED  &#124; YES     &#124; FederatedX pluggable stora...
&#124; MRG_MYISAM &#124; YES     &#124; Collection of identical My...
&#124; MEMORY     &#124; YES     &#124; Hash based, stored in memo...
+------------+---------+---------------------------...
..
For reference, here are my full outputs:
C:\Users\Chris&#62;cd ..\..\mariadb-5.1

C:\mariadb-5.1&#62;win\configure.js

C:\mariadb-5.1&#62;cmake .
-- Check for working C compiler: cl
-- Check for working C compiler: cl -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: cl
-- Check for working CXX compiler: cl -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
build CSV as static library (libcsv.lib)
build FEDERATEDX as static library (libfederatedx.lib)
build HEAP as static library (libheap_s.lib)
build MARIA as static library (libmaria_s.lib)
build MYISAM as static library (libmyisam_s.lib)
build MYISAMMRG as static library (libmyisammrg_s.lib)
build PBXT as static library (libpbxt_s.lib)
build XTRADB as static library (libxtradb.lib)
build ARCHIVE as DLL (ha_archive.dll)
build BLACKHOLE as DLL (ha_blackhole.dll)
build EXAMPLE as DLL (ha_example.dll)
build FEDERATED as DLL (ha_federated.dll)
build INNODB_PLUGIN as DLL (ha_innodb_plugin.dll)
-- Configuring done
-- Generating done
-- Build files have been written to: C:/mariadb-5.1
Open Visual Studio -&#62; File -&#62; Open -&#62; Project/Solution -&#62; Select C:\mariadb-5.1.60\MySql.sln
Build Solution Output:
========== Build: 79 succeeded, 0 failed, 2 up-to-date, 2 skipped ==========
Package Build Output:
1&#62;------ Build started: Project: PACKAGE, Configuration: Debug Win32 ------
1&#62;
1&#62;Performing Post-Build Event...
1&#62;CPack: Create package using NSIS
1&#62;CPack: Install projects
1&#62;CPack: - Install project: MySql
1&#62;CPack: -   Install component: Unspecified
1&#62;CPack: -   Install component: headers
1&#62;CPack: -   Install component: mysqltest
1&#62;CPack: -   Install component: runtime
1&#62;CPack: -   Install component: scripts
1&#62;CPack: -   Install component: sqlbench
1&#62;CPack: Compress package
1&#62;CPack: Finalize package
1&#62;CPack: Package C:/mariadb-5.1/MariaDB-5.1.60-win32.exe generated.
1&#62;Build log was saved at "file://c:\mariadb-5.1\PACKAGE.dir\Debug\BuildLog.htm"
1&#62;PACKAGE - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 81 up-to-date, 0 skipped ==========
&#160;
&#160;]]></description>
			<content:encoded><![CDATA[<p>Recently, I found myself needing MariaDB 5.1.60 for Windows for some testing purposes.  Therefore, I needed to build it from source.  I ended up using what I&#8217;d call a &#8220;blend&#8221; of the commands listed in this <a href="http://kb.askmonty.org/en/building-mariadb-on-windows">&#8220;how-to&#8221;</a> and the readme file INSTALL-WIN-SOURCE, so I thought I&#8217;d post those steps.</p>
<ol>
<li>Download 5.1.60 MariaDB source from <a href="http://downloads.askmonty.org/mariadb/5.1.60/">here</a>.
<li>
<pre>cd C:\mariadb-5.1</pre>
<li>
<pre>win\configure.js</pre>
<li>
<pre>cmake .</pre>
<li>VS: File -> Open -> Solution -> MySql.sln
<li>VS: Build -> Build Solution
<li>VS: Right-click &#8220;PACKAGE&#8221; -> Build (in &#8220;Solution Explorer&#8221; View)
</ol>
<p>That&#8217;s it.</p>
<p>Let&#8217;s fire it up:</p>
<pre>MariaDB> select version();
+----------------------+
| version()            |
+----------------------+
| 5.1.60-MariaDB-debug |
+----------------------+

MariaDB> show global variables like 'innodb_version';
+----------------+-------------+
| Variable_name  | Value       |
+----------------+-------------+
| innodb_version | 1.0.17-13.0 |
+----------------+-------------+

MariaDB> show engines;
+------------+---------+---------------------------...
| Engine     | Support | Comment		   ...
+------------+---------+---------------------------...
| CSV        | YES     | CSV storage engine	   ...
| InnoDB     | DEFAULT | Percona-XtraDB, Supports t...
| PBXT       | YES     | High performance, multi-ve...
| MARIA      | YES     | Crash-safe tables with MyI...
| MyISAM     | YES     | Default engine as of MySQL...
| FEDERATED  | YES     | FederatedX pluggable stora...
| MRG_MYISAM | YES     | Collection of identical My...
| MEMORY     | YES     | Hash based, stored in memo...
+------------+---------+---------------------------...</pre>
<p>..</p>
<p>For reference, here are my full outputs:</p>
<pre>C:\Users\Chris>cd ..\..\mariadb-5.1

C:\mariadb-5.1>win\configure.js

C:\mariadb-5.1>cmake .
-- Check for working C compiler: cl
-- Check for working C compiler: cl -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: cl
-- Check for working CXX compiler: cl -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
build CSV as static library (libcsv.lib)
build FEDERATEDX as static library (libfederatedx.lib)
build HEAP as static library (libheap_s.lib)
build MARIA as static library (libmaria_s.lib)
build MYISAM as static library (libmyisam_s.lib)
build MYISAMMRG as static library (libmyisammrg_s.lib)
build PBXT as static library (libpbxt_s.lib)
build XTRADB as static library (libxtradb.lib)
build ARCHIVE as DLL (ha_archive.dll)
build BLACKHOLE as DLL (ha_blackhole.dll)
build EXAMPLE as DLL (ha_example.dll)
build FEDERATED as DLL (ha_federated.dll)
build INNODB_PLUGIN as DLL (ha_innodb_plugin.dll)
-- Configuring done
-- Generating done
-- Build files have been written to: C:/mariadb-5.1</pre>
<p>Open Visual Studio -> File -> Open -> Project/Solution -> Select C:\mariadb-5.1.60\MySql.sln</p>
<p>Build Solution Output:</p>
<pre>========== Build: 79 succeeded, 0 failed, 2 up-to-date, 2 skipped ==========</pre>
<p>Package Build Output:</p>
<pre>1>------ Build started: Project: PACKAGE, Configuration: Debug Win32 ------
1>
1>Performing Post-Build Event...
1>CPack: Create package using NSIS
1>CPack: Install projects
1>CPack: - Install project: MySql
1>CPack: -   Install component: Unspecified
1>CPack: -   Install component: headers
1>CPack: -   Install component: mysqltest
1>CPack: -   Install component: runtime
1>CPack: -   Install component: scripts
1>CPack: -   Install component: sqlbench
1>CPack: Compress package
1>CPack: Finalize package
1>CPack: Package C:/mariadb-5.1/MariaDB-5.1.60-win32.exe generated.
1>Build log was saved at "file://c:\mariadb-5.1\PACKAGE.dir\Debug\BuildLog.htm"
1>PACKAGE - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 81 up-to-date, 0 skipped ==========</pre>
<p>&nbsp;<br />
&nbsp;</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31776&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31776&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/01/23/building-mariadb-5-1-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fractal Tree Indexes and Mead – MySQL Meetup</title>
		<link>http://www.tokutek.com/2012/01/fractal-tree-indexes-and-mead-mysql-meetup/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fractal-tree-indexes-and-mead-mysql-meetup</link>
		<comments>http://www.tokutek.com/2012/01/fractal-tree-indexes-and-mead-mysql-meetup/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 14:57:06 +0000</pubDate>
		<dc:creator>Tokuview Blog</dc:creator>
				<category><![CDATA[big data]]></category>
		<category><![CDATA[fractal tree indexes]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[MySQL Meetup]]></category>
		<category><![CDATA[newsql]]></category>
		<category><![CDATA[storage engine]]></category>
		<category><![CDATA[TokuDB]]></category>
		<category><![CDATA[tokutek]]></category>
		<category><![CDATA[TokuView]]></category>

		<guid isPermaLink="false">http://www.tokutek.com/?p=3624</guid>
		<description><![CDATA[&#160;
Thanks again to Sheeri Cabral  for having me at the Boston MySQL Meetup on Monday for the talk on “Fractal Tree® Indexes – Theoretical Overview and Customer Use Cases.” The crowd was very interactive, and I appreciated that over 50 people signed up for the event and left some very positive comments and reviews.

In addition, the conversation spilled over late into the night as we made our way over to nearby Mead Hall afterwards for a few drinks, some food, and to continue the discussion.
The presentation is available here.
As a brief overview &#8211; most databases employ B-trees to achieve a good tradeoff between the ability to update data quickly and to search it quickly. It turns out that B-trees are far from the optimum in this tradeoff space. This led to the development at MIT, Rutgers and Stony Brook of Fractal Tree indexes. Fractal Tree indexes improve MySQL® scalability and query performance by allowing greater insertion rates, supporting rich indexing and offering efficient compression. They can also eliminate operational headaches such as dump/reloads, inflexible schemas and partitions.
The presentation provides an overview on how Fractal Tree indexes work, and then gets into some specific product features, benchmarks, and customer use cases that show where people have deployed Fractal Tree indexes via the TokuDB® storage engine.
&#160;]]></description>
			<content:encoded><![CDATA[<p>&nbsp;<br />
Thanks again to Sheeri Cabral  for having me at the <a href="http://www.meetup.com/mysqlbos/events/27881711/" >Boston MySQL Meetup</a> on Monday for the talk on “Fractal Tree<sup>®</sup> Indexes – Theoretical Overview and Customer Use Cases.” The crowd was very interactive, and I appreciated that over 50 people signed up for the event and left some very positive <a href="http://www.meetup.com/mysqlbos/events/27881711/" >comments and reviews</a>.</p>
<p><a href="http://www.tokutek.com/wp-content/uploads/2012/01/Boston-MySQL-MeetUp-Photo.jpg" rel="shadowbox[sbpost-3624];player=img;"><img class="aligncenter size-full wp-image-4072" title="Boston MySQL MeetUp Photo" src="http://www.tokutek.com/wp-content/uploads/2012/01/Boston-MySQL-MeetUp-Photo.jpg" alt="" width="625" /></a></p>
<p>In addition, the conversation spilled over late into the night as we made our way over to nearby <a href="http://www.facebook.com/pages/Meadhall/159050177486055" >Mead Hall</a> afterwards for a few drinks, some food, and to continue the discussion.</p>
<p>The presentation is available <a href="http://www.tokutek.com/wp-content/uploads/2012/01/20120109-boston-mysql-usergroup_posted.pdf" >here</a>.</p>
<p>As a brief overview &#8211; most databases employ B-trees to achieve a good tradeoff between the ability to update data quickly and to search it quickly. It turns out that B-trees are far from the optimum in this tradeoff space. This led to the development at MIT, Rutgers and Stony Brook of Fractal Tree indexes. Fractal Tree indexes improve MySQL<sup>®</sup> scalability and query performance by allowing greater insertion rates, supporting rich indexing and offering efficient compression. They can also eliminate operational headaches such as dump/reloads, inflexible schemas and partitions.</p>
<p>The presentation provides an overview on how Fractal Tree indexes work, and then gets into some specific product features, benchmarks, and customer use cases that show where people have deployed Fractal Tree indexes via the TokuDB<sup>®</sup> storage engine.<br />
&nbsp;</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31563&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31563&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/01/11/fractal-tree-indexes-and-mead-mysql-meetup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tracking Server Variables, Documentation, Manuals, Changelogs for MySQL, InnoDB, MariaDB, and XtraDB</title>
		<link>http://www.chriscalender.com/?p=654&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tracking-server-variables-documentation-manuals-changelogs-for-mysql-innodb-mariadb-and-xtradb</link>
		<comments>http://www.chriscalender.com/?p=654#comments</comments>
		<pubDate>Mon, 09 Jan 2012 17:50:22 +0000</pubDate>
		<dc:creator>Chris Calender</dc:creator>
				<category><![CDATA[chris calendar]]></category>
		<category><![CDATA[chris calender]]></category>
		<category><![CDATA[connector c++ change history]]></category>
		<category><![CDATA[connector c++ changelogs]]></category>
		<category><![CDATA[connector j change history]]></category>
		<category><![CDATA[connector j changelogs]]></category>
		<category><![CDATA[connector mxj change history]]></category>
		<category><![CDATA[connector mxj changelogs]]></category>
		<category><![CDATA[connector net change history]]></category>
		<category><![CDATA[connector net changelogs]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.chriscalender.com/?p=654</guid>
		<description><![CDATA[I find myself constantly looking up server variables (and manuals and changelogs) for MySQL, MariaDB, and XtraDB, which versions they are in, and so forth.  So I finally created a couple pages which contain the links to all of these various bits of information across the various flavors of MySQL.
I&#8217;ve been using them every day, so I thought some others might want to bookmark these as well.
I&#8217;ve created the following:
o Changelogs
o Documentation
o Server Variables
o InnoDB Plugin Versions
The Changelogs page contains links for MySQL 3.23 up through 5.6, MariaDB 5.1 &#8211; 5.3, XtraDB 5.1 &#8211; 5.5, Xtrabackup 1.3 &#8211; 1.6, Connector/ODBC, Connector/.NET, Connector/J, Connector/C++, Connector/MXJ, and MySQL Proxy.
The Documentation page contains links for the MySQL manuals 3.23-5.6, InnoDB Plugin 1.0 &#8211; 1.1, MariaDB 5.1 &#8211; 5.3, XtraDB 5.1 &#8211; 5.3, and Xtrabackup 1.6.
The Server Variables page contains the links for the MySQL Server variables for all versions, the server variable cross-reference chart, all InnoDB startup variables, and new MariaDB options.
And lastly, the InnoDB Plugin Versions (which I did mention a couple weeks ago) contains all InnoDB Plugin version information, such as which InnoDB plugin is included with which MySQL release, as well as links to changelogs, and other relevant information.
If you find yourself wishing there were some other links added, just post me a comment and I&#8217;ll try to get it added asap.
&#160;
&#160;]]></description>
			<content:encoded><![CDATA[<p>I find myself constantly looking up server variables (and manuals and changelogs) for MySQL, MariaDB, and XtraDB, which versions they are in, and so forth.  So I finally created a couple pages which contain the links to all of these various bits of information across the various flavors of MySQL.</p>
<p>I&#8217;ve been using them every day, so I thought some others might want to bookmark these as well.</p>
<p>I&#8217;ve created the following:</p>
<p>o <a href="http://www.chriscalender.com/?page_id=595">Changelogs</a><br />
o <a href="http://www.chriscalender.com/?page_id=605">Documentation</a><br />
o <a href="http://www.chriscalender.com/?page_id=630">Server Variables</a><br />
o <a href="http://www.chriscalender.com/?p=479">InnoDB Plugin Versions</a></p>
<p>The Changelogs page contains links for MySQL 3.23 up through 5.6, MariaDB 5.1 &#8211; 5.3, XtraDB 5.1 &#8211; 5.5, Xtrabackup 1.3 &#8211; 1.6, Connector/ODBC, Connector/.NET, Connector/J, Connector/C++, Connector/MXJ, and MySQL Proxy.</p>
<p>The Documentation page contains links for the MySQL manuals 3.23-5.6, InnoDB Plugin 1.0 &#8211; 1.1, MariaDB 5.1 &#8211; 5.3, XtraDB 5.1 &#8211; 5.3, and Xtrabackup 1.6.</p>
<p>The Server Variables page contains the links for the MySQL Server variables for all versions, the server variable cross-reference chart, all InnoDB startup variables, and new MariaDB options.</p>
<p>And lastly, the InnoDB Plugin Versions (which I did mention a couple weeks ago) contains all InnoDB Plugin version information, such as which InnoDB plugin is included with which MySQL release, as well as links to changelogs, and other relevant information.</p>
<p>If you find yourself wishing there were some other links added, just post me a comment and I&#8217;ll try to get it added asap.</p>
<p>&nbsp;<br />
&nbsp;</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31537&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31537&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/01/09/tracking-server-variables-documentation-manuals-changelogs-for-mysql-innodb-mariadb-and-xtradb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tracking Server Variables, Documentation, Manuals, Changelogs for MySQL, InnoDB, MariaDB, and XtraDB</title>
		<link>http://www.chriscalender.com/?p=654&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tracking-server-variables-documentation-manuals-changelogs-for-mysql-innodb-mariadb-and-xtradb</link>
		<comments>http://www.chriscalender.com/?p=654#comments</comments>
		<pubDate>Mon, 09 Jan 2012 17:50:22 +0000</pubDate>
		<dc:creator>Chris Calender</dc:creator>
				<category><![CDATA[chris calendar]]></category>
		<category><![CDATA[chris calender]]></category>
		<category><![CDATA[connector c++ change history]]></category>
		<category><![CDATA[connector c++ changelogs]]></category>
		<category><![CDATA[connector j change history]]></category>
		<category><![CDATA[connector j changelogs]]></category>
		<category><![CDATA[connector mxj change history]]></category>
		<category><![CDATA[connector mxj changelogs]]></category>
		<category><![CDATA[connector net change history]]></category>
		<category><![CDATA[connector net changelogs]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.chriscalender.com/?p=654</guid>
		<description><![CDATA[I find myself constantly looking up server variables (and manuals and changelogs) for MySQL, MariaDB, and XtraDB, which versions they are in, and so forth.  So I finally created a couple pages which contain the links to all of these various bits of information across the various flavors of MySQL.
I&#8217;ve been using them every day, so I thought some others might want to bookmark these as well.
I&#8217;ve created the following:
o Changelogs
o Documentation
o Server Variables
o InnoDB Plugin Versions
The Changelogs page contains links for MySQL 3.23 up through 5.6, MariaDB 5.1 &#8211; 5.3, XtraDB 5.1 &#8211; 5.5, Xtrabackup 1.3 &#8211; 1.6, Connector/ODBC, Connector/.NET, Connector/J, Connector/C++, Connector/MXJ, and MySQL Proxy.
The Documentation page contains links for the MySQL manuals 3.23-5.6, InnoDB Plugin 1.0 &#8211; 1.1, MariaDB 5.1 &#8211; 5.3, XtraDB 5.1 &#8211; 5.3, and Xtrabackup 1.6.
The Server Variables page contains the links for the MySQL Server variables for all versions, the server variable cross-reference chart, all InnoDB startup variables, and new MariaDB options.
And lastly, the InnoDB Plugin Versions (which I did mention a couple weeks ago) contains all InnoDB Plugin version information, such as which InnoDB plugin is included with which MySQL release, as well as links to changelogs, and other relevant information.
If you find yourself wishing there were some other links added, just post me a comment and I&#8217;ll try to get it added asap.
&#160;
&#160;]]></description>
			<content:encoded><![CDATA[<p>I find myself constantly looking up server variables (and manuals and changelogs) for MySQL, MariaDB, and XtraDB, which versions they are in, and so forth.  So I finally created a couple pages which contain the links to all of these various bits of information across the various flavors of MySQL.</p>
<p>I&#8217;ve been using them every day, so I thought some others might want to bookmark these as well.</p>
<p>I&#8217;ve created the following:</p>
<p>o <a href="http://www.chriscalender.com/?page_id=595">Changelogs</a><br />
o <a href="http://www.chriscalender.com/?page_id=605">Documentation</a><br />
o <a href="http://www.chriscalender.com/?page_id=630">Server Variables</a><br />
o <a href="http://www.chriscalender.com/?p=479">InnoDB Plugin Versions</a></p>
<p>The Changelogs page contains links for MySQL 3.23 up through 5.6, MariaDB 5.1 &#8211; 5.3, XtraDB 5.1 &#8211; 5.5, Xtrabackup 1.3 &#8211; 1.6, Connector/ODBC, Connector/.NET, Connector/J, Connector/C++, Connector/MXJ, and MySQL Proxy.</p>
<p>The Documentation page contains links for the MySQL manuals 3.23-5.6, InnoDB Plugin 1.0 &#8211; 1.1, MariaDB 5.1 &#8211; 5.3, XtraDB 5.1 &#8211; 5.3, and Xtrabackup 1.6.</p>
<p>The Server Variables page contains the links for the MySQL Server variables for all versions, the server variable cross-reference chart, all InnoDB startup variables, and new MariaDB options.</p>
<p>And lastly, the InnoDB Plugin Versions (which I did mention a couple weeks ago) contains all InnoDB Plugin version information, such as which InnoDB plugin is included with which MySQL release, as well as links to changelogs, and other relevant information.</p>
<p>If you find yourself wishing there were some other links added, just post me a comment and I&#8217;ll try to get it added asap.</p>
<p>&nbsp;<br />
&nbsp;</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31537&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31537&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/01/09/tracking-server-variables-documentation-manuals-changelogs-for-mysql-innodb-mariadb-and-xtradb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FictionPress Selects TokuDB for Consistent Performance and Fast Disaster Recovery</title>
		<link>http://www.tokutek.com/2012/01/fictionpress-selects-tokudb-for-consistent-performance-and-fast-disaster-recovery/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fictionpress-selects-tokudb-for-consistent-performance-and-fast-disaster-recovery</link>
		<comments>http://www.tokutek.com/2012/01/fictionpress-selects-tokudb-for-consistent-performance-and-fast-disaster-recovery/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 17:09:25 +0000</pubDate>
		<dc:creator>Tokuview Blog</dc:creator>
				<category><![CDATA[announcement]]></category>
		<category><![CDATA[B-Tree]]></category>
		<category><![CDATA[fractal tree indexes]]></category>
		<category><![CDATA[indexing]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[MariaDB]]></category>
		<category><![CDATA[myisam]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[TokuDB]]></category>
		<category><![CDATA[tokutek]]></category>
		<category><![CDATA[TokuView]]></category>

		<guid isPermaLink="false">http://www.tokutek.com/?p=3618</guid>
		<description><![CDATA[FictionPress
Issues addressed:

Support complex and efficient indexes at 100+ million rows.
Predicable and consistent performance regardless of data size growth.
Fast recovery.

Ensuring Predictable Performance at Scale
The Company:  FictionPress operates both FictionPress.com and FanFiction.net and is home to over 6 million works of fiction, with millions of writers/readers participating from around the world in over 30 languages
The Challenge: FictionPress offers a number of interactive features to its large user base. These include discussion forums, in-site messaging and user reviews. FictionPress made the decision to build its own discussion forums to meet its strict security and performance requirements. Xing Li, CTO of FictionPress, noted that the site “needs to host hundreds of thousands of forums. Existing forum software doesn&#8217;t do this while meeting our performance and security targets.”
To ensure the real-time responsiveness of the forums, FictionPress needs the ability to create and efficiently maintain complex indexes and be able to support millions of small rows. In addition, it needs the ability to index them with minimal impact to resource costs and performance. “The only way to make this all work and provide a good customer experience is to guarantee that we can deliver a flat predictable performance with our database back-end even as the number of rows crosses the 100 million mark,” according to Li.
FictionPress considered InnoDB, the default storage engine for MySQL, but it did not offer predictable performance at scale. Indexes became dramatically slower as the number of rows increased, causing a reduction of both read and write performance. InnoDB also did not offer the performance-enhancing feature of multiple clustering indexes.
The Solution:  FictionPress uses MariaDB and TokuDB to manage its discussion forums, reviews, and in-site messaging systems.
FictionPress installed TokuDB in a Linux environment with dedicated hardware. Each configuration has a single master with multiple read slaves. “TokuDB’s high write concurrency and support for multiple clustering indexes gave us the freedom to design and deploy better performing queries at scale,” according to Li. This was important to FictionPress as its environment is continually expanding.
The Benefits: 
Predictable Performance: “While raw performance is important, the predictability of response time as one scales the system was our focal point” according to Li. “InnoDB can only have one clustering index, but TokuDB gives you basically an unlimited number. In addition, both MyISAM and InnoDB slow down with many indexes on databases of our size. MyISAM also causes replication lag due to concurrency. In the end, TokuDB gives us predictability, performance at scale, and more flexible indexing without the limitations found in other MySQL options.”
Cost: “To get additional performance, one can always throw hardware at the problem,” according to Li. “By utilizing TokuDB instead we improved scalability and at the same time saved on costs for additional server hardware that would have been required if TokuDB was not in the picture. In addition, we saw an 8x size reduction in disk space compared to MyISAM due to improved compression. The hardware cost saving made moving to TokuDB an easy decision.”
Crash Recovery: FictionPress had been using MyISAM initially. “We needed a replacement for MyISAM for small BLOB data,” according to Li. “In fact, we wanted to move away from MyISAM whenever possible to shorten its long crash recovery. InnoDB was an option but TokuDB offered better compression and a smaller storage footprint for both core data and index data for our own data sets.”
Hot Schema Changes: “For performance reasons we need a lot of indexes but also need to add and maintain these indexes quickly,” according to Li. “TokuDB is the only MySQL solution I found that offers Hot Schema changes such as Hot Indexing. Hot Schema changes are a powerful capability which we use to minimize downtime during system-wide upgrades and shorten our application/schema development cycle.”
&#160;
&#160;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fictionpress.com" ><img class="size-full wp-image-1351 alignright" title="FictionPress_Logo" src="http://www.tokutek.com/wp-content/uploads/2011/12/FictionPress.png" alt="" width="200" height="64" /></a><a href="http://www.fictionpress.com/" >FictionPress</a></p>
<p><strong>Issues addressed:</strong></p>
<ul>
<li>Support complex and efficient indexes at 100+ million rows.</li>
<li>Predicable and consistent performance regardless of data size growth.</li>
<li>Fast recovery.</li>
</ul>
<h3>Ensuring Predictable Performance at Scale</h3>
<p><strong>The Company: </strong> <a href="http://www.fictionpress.com/" >FictionPress</a> operates both <a href="http://www.fictionpress.com/" >FictionPress.com</a> and <a href="http://www.fanfiction.net/" >FanFiction.net</a> and is home to over 6 million works of fiction, with millions of writers/readers participating from around the world in over 30 languages</p>
<p><strong>The Challenge:</strong> FictionPress offers a number of interactive features to its large user base. These include discussion forums, in-site messaging and user reviews. FictionPress made the decision to build its own discussion forums to meet its strict security and performance requirements. Xing Li, CTO of FictionPress, noted that the site “needs to host hundreds of thousands of forums. Existing forum software doesn&#8217;t do this while meeting our performance and security targets.”</p>
<p>To ensure the real-time responsiveness of the forums, FictionPress needs the ability to create and efficiently maintain complex indexes and be able to support millions of small rows. In addition, it needs the ability to index them with minimal impact to resource costs and performance. “The only way to make this all work and provide a good customer experience is to guarantee that we can deliver a flat predictable performance with our database back-end even as the number of rows crosses the 100 million mark,” according to Li.</p>
<p>FictionPress considered InnoDB, the default storage engine for MySQL, but it did not offer predictable performance at scale. Indexes became dramatically slower as the number of rows increased, causing a reduction of both read and write performance. InnoDB also did not offer the performance-enhancing feature of multiple clustering indexes.</p>
<p><strong><strong>The Solution: </strong></strong> FictionPress uses MariaDB and TokuDB to manage its discussion forums, reviews, and in-site messaging systems.</p>
<p>FictionPress installed TokuDB in a Linux environment with dedicated hardware. Each configuration has a single master with multiple read slaves. “TokuDB’s high write concurrency and support for multiple clustering indexes gave us the freedom to design and deploy better performing queries at scale,” according to Li. This was important to FictionPress as its environment is continually expanding.</p>
<p><strong><strong>The Benefits: </strong></strong></p>
<p><span>Predictable Performance</span>: “While raw performance is important, the predictability of response time as one scales the system was our focal point” according to Li. “InnoDB can only have one clustering index, but TokuDB gives you basically an unlimited number. In addition, both MyISAM and InnoDB slow down with many indexes on databases of our size. MyISAM also causes replication lag due to concurrency. In the end, TokuDB gives us predictability, performance at scale, and more flexible indexing without the limitations found in other MySQL options.”</p>
<p><span>Cost</span>: “To get additional performance, one can always throw hardware at the problem,” according to Li. “By utilizing TokuDB instead we improved scalability and at the same time saved on costs for additional server hardware that would have been required if TokuDB was not in the picture. In addition, we saw an 8x size reduction in disk space compared to MyISAM due to improved compression. The hardware cost saving made moving to TokuDB an easy decision.”</p>
<p><span>Crash Recovery</span>: FictionPress had been using MyISAM initially. “We needed a replacement for MyISAM for small BLOB data,” according to Li. “In fact, we wanted to move away from MyISAM whenever possible to shorten its long crash recovery. InnoDB was an option but TokuDB offered better compression and a smaller storage footprint for both core data and index data for our own data sets.”</p>
<p><span>Hot Schema Changes</span>: “For performance reasons we need a lot of indexes but also need to add and maintain these indexes quickly,” according to Li. “TokuDB is the only MySQL solution I found that offers Hot Schema changes such as Hot Indexing. Hot Schema changes are a powerful capability which we use to minimize downtime during system-wide upgrades and shorten our application/schema development cycle.”</p>
<p>&nbsp;</p>
<p>&nbsp;</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31475&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31475&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/01/03/fictionpress-selects-tokudb-for-consistent-performance-and-fast-disaster-recovery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Profiling your slow queries using pt-query-digest and some love from Percona Server</title>
		<link>http://www.ovaistariq.net/768/profiling-your-slow-queries-using-pt-query-digest-and-some-love-from-percona-server/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=profiling-your-slow-queries-using-pt-query-digest-and-some-love-from-percona-server</link>
		<comments>http://www.ovaistariq.net/768/profiling-your-slow-queries-using-pt-query-digest-and-some-love-from-percona-server/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 12:23:13 +0000</pubDate>
		<dc:creator>Ovais Tariq</dc:creator>
				<category><![CDATA[95th percentile]]></category>
		<category><![CDATA[general query log]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[log_slow_verbosity]]></category>
		<category><![CDATA[long_query_time]]></category>
		<category><![CDATA[microslow patch]]></category>
		<category><![CDATA[microtime]]></category>
		<category><![CDATA[mk-query-digest]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[percona server]]></category>
		<category><![CDATA[Percona Toolkit]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[pt-query-digest]]></category>
		<category><![CDATA[quer]]></category>
		<category><![CDATA[queries]]></category>
		<category><![CDATA[query analysis]]></category>
		<category><![CDATA[query execution]]></category>

		<guid isPermaLink="false">http://www.ovaistariq.net/?p=768</guid>
		<description><![CDATA[This guide will get you up and running with how to identify the bottleneck queries using the excellent tool pt-query-digest. You will learn how to use and analyze the output returned by pt-query-digest. You will also learn some differences between slow query logging in various MySQL versions. Later on in the post I will also show you how to make use of the extra diagnostic data available with Percona Server.]]></description>
			<content:encoded><![CDATA[This guide will get you up and running with how to identify the bottleneck queries using the excellent tool pt-query-digest. You will learn how to use and analyze the output returned by pt-query-digest. You will also learn some differences between slow query logging in various MySQL versions. Later on in the post I will also show you how to make use of the extra diagnostic data available with Percona Server.<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31440&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31440&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/12/28/profiling-your-slow-queries-using-pt-query-digest-and-some-love-from-percona-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning to love the InnoDB Lock Monitor</title>
		<link>http://www.skysql.com/blogs/kolbe/learning-love-innodb-lock-monitor?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=learning-to-love-the-innodb-lock-monitor</link>
		<comments>http://www.skysql.com/blogs/kolbe/learning-love-innodb-lock-monitor#comments</comments>
		<pubDate>Fri, 23 Dec 2011 17:22:11 +0000</pubDate>
		<dc:creator>SkySQL</dc:creator>
				<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[Innotop]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://planetmysql.ru/?guid=2d40aaef53a1e391ed4b01ce8a1bbf6a</guid>
		<description><![CDATA[A customer opened a support issue to ask about some help determining why they were seeing a lot of Lock Wait Timeouts. I asked them to enable the InnoDB Lock Monitor so that I could get a look at what was going on in their transactions and whether there might be some locks held longer than necessary.
The customer sent in a 184MB MySQL error log with 4773836 lines. I started looking through it, but I could tell I was going to need a better way to get a better overview of the file than what I'd be able to piece together trying to poke through it and look for individual lines. I started piping the file through a variety of UNIX tools to narrow down what I was seeing.
I ended up with this mess:

  1 },
);

$Data::Dumper::Indent = 2;
print Dumper $innodb_status;

$ START=191; END=319; tail -n +$START  1,
          last_secs =&#62; '20',
          sections =&#62; {
                        bp =&#62; {
                                add_pool_alloc =&#62; '0',
                                awe_mem_alloc =&#62; 0,
                                buf_free =&#62; '7822',
                                buf_pool_hit_rate =&#62; undef,
                                buf_pool_hits =&#62; undef,
                                buf_pool_reads =&#62; undef,
                                buf_pool_size =&#62; '8192',
                                complete =&#62; 1,
                                dict_mem_alloc =&#62; '41875',
                                page_creates_sec =&#62; '0.00',
                                page_reads_sec =&#62; '0.00',
                                page_writes_sec =&#62; '0.00',
                                pages_created =&#62; '1',
                                pages_modified =&#62; '0',
                                pages_read =&#62; '368',
                                pages_total =&#62; '369',
                                pages_written =&#62; '32',
                                reads_pending =&#62; '0',
                                total_mem_alloc =&#62; '137363456',
                                writes_pending =&#62; '0',
                                writes_pending_flush_list =&#62; 0,
                                writes_pending_lru =&#62; 0,
                                writes_pending_single_page =&#62; 0
                              },
                        bt =&#62; {
                                complete =&#62; 1,
                                fulltext =&#62; 'srv_master_thread loops: 4 1_second, 4 sleeps, 0 10_second, 6 background, 6 flush
srv_master_thread log flush and writes: 4'
                              },
                        ib =&#62; {
                                bufs_in_node_heap =&#62; undef,
                                complete =&#62; 1,
                                free_list_len =&#62; undef,
                                hash_searches_s =&#62; '0.00',
                                hash_table_size =&#62; undef,
                                inserts =&#62; undef,
                                merged_recs =&#62; undef,
                                merges =&#62; undef,
                                non_hash_searches_s =&#62; '0.00',
                                seg_size =&#62; undef,
                                size =&#62; undef,
                                used_cells =&#62; undef
                              },
                        io =&#62; {
                                avg_bytes_s =&#62; '0',
                                complete =&#62; 1,
                                flush_type =&#62; 'fsync',
                                fsyncs_s =&#62; '0.00',
                                os_file_reads =&#62; '379',
                                os_file_writes =&#62; '30',
                                os_fsyncs =&#62; '11',
                                pending_aio_writes =&#62; undef,
                                pending_buffer_pool_flushes =&#62; '0',
                                pending_ibuf_aio_reads =&#62; '0',
                                pending_log_flushes =&#62; '0',
                                pending_log_ios =&#62; '0',
                                pending_normal_aio_reads =&#62; undef,
                                pending_preads =&#62; 0,
                                pending_pwrites =&#62; 0,
                                pending_sync_ios =&#62; '0',
                                reads_s =&#62; '0.00',
                                threads =&#62; {
                                             '0' =&#62; {
                                                      event_set =&#62; 0,
                                                      purpose =&#62; 'insert buffer thread',
                                                      state =&#62; 'waiting for i/o request',
                                                      thread =&#62; '0'
                                                    },
                                             '1' =&#62; {
                                                      event_set =&#62; 0,
                                                      purpose =&#62; 'log thread',
                                                      state =&#62; 'waiting for i/o request',
                                                      thread =&#62; '1'
                                                    },
                                             '2' =&#62; {
                                                      event_set =&#62; 0,
                                                      purpose =&#62; 'read thread',
                                                      state =&#62; 'waiting for i/o request',
                                                      thread =&#62; '2'
                                                    },
                                             '3' =&#62; {
                                                      event_set =&#62; 0,
                                                      purpose =&#62; 'read thread',
                                                      state =&#62; 'waiting for i/o request',
                                                      thread =&#62; '3'
                                                    },
                                             '4' =&#62; {
                                                      event_set =&#62; 0,
                                                      purpose =&#62; 'read thread',
                                                      state =&#62; 'waiting for i/o request',
                                                      thread =&#62; '4'
                                                    },
                                             '5' =&#62; {
                                                      event_set =&#62; 0,
                                                      purpose =&#62; 'read thread',
                                                      state =&#62; 'waiting for i/o request',
                                                      thread =&#62; '5'
                                                    },
                                             '6' =&#62; {
                                                      event_set =&#62; 0,
                                                      purpose =&#62; 'write thread',
                                                      state =&#62; 'waiting for i/o request',
                                                      thread =&#62; '6'
                                                    },
                                             '7' =&#62; {
                                                      event_set =&#62; 0,
                                                      purpose =&#62; 'write thread',
                                                      state =&#62; 'waiting for i/o request',
                                                      thread =&#62; '7'
                                                    },
                                             '8' =&#62; {
                                                      event_set =&#62; 0,
                                                      purpose =&#62; 'write thread',
                                                      state =&#62; 'waiting for i/o request',
                                                      thread =&#62; '8'
                                                    },
                                             '9' =&#62; {
                                                      event_set =&#62; 0,
                                                      purpose =&#62; 'write thread',
                                                      state =&#62; 'waiting for i/o request',
                                                      thread =&#62; '9'
                                                    }
                                           },
                                writes_s =&#62; '0.00'
                              },
                        lg =&#62; {
                                complete =&#62; 1,
                                last_chkp =&#62; '139205502',
                                log_flushed_to =&#62; '139205502',
                                log_ios_done =&#62; '12',
                                log_ios_s =&#62; '0.00',
                                log_seq_no =&#62; '139205502',
                                pending_chkp_writes =&#62; '0',
                                pending_log_writes =&#62; '0'
                              },
                        ro =&#62; {
                                complete =&#62; 0,
                                del_sec =&#62; '0.00',
                                ins_sec =&#62; '0.00',
                                main_thread_id =&#62; '4496171008',
                                main_thread_proc_no =&#62; 0,
                                main_thread_state =&#62; 'waiting for server activity',
                                n_reserved_extents =&#62; 0,
                                num_rows_del =&#62; '0',
                                num_rows_ins =&#62; '0',
                                num_rows_read =&#62; '12',
                                num_rows_upd =&#62; '0',
                                queries_in_queue =&#62; '0',
                                queries_inside =&#62; '0',
                                read_sec =&#62; '0.30',
                                read_views_open =&#62; '1',
                                upd_sec =&#62; '0.00'
                              },
                        sm =&#62; {
                                complete =&#62; 1,
                                mutex_os_waits =&#62; '0',
                                mutex_spin_rounds =&#62; '0',
                                mutex_spin_waits =&#62; '0',
                                reservation_count =&#62; '4',
                                rw_excl_os_waits =&#62; undef,
                                rw_excl_spins =&#62; undef,
                                rw_shared_os_waits =&#62; undef,
                                rw_shared_spins =&#62; undef,
                                signal_count =&#62; '4',
                                wait_array_size =&#62; 0,
                                waits =&#62; []
                              },
                        tx =&#62; {
                                complete =&#62; 1,
                                history_list_len =&#62; '105',
                                is_truncated =&#62; 0,
                                num_lock_structs =&#62; undef,
                                purge_done_for =&#62; '163A',
                                purge_undo_for =&#62; '0',
                                transactions =&#62; [
                                                  {
                                                    active_secs =&#62; 0,
                                                    has_read_view =&#62; 0,
                                                    heap_size =&#62; 0,
                                                    hostname =&#62; 'localhost',
                                                    ip =&#62; '',
                                                    lock_structs =&#62; 0,
                                                    lock_wait_status =&#62; '',
                                                    lock_wait_time =&#62; 0,
                                                    mysql_thread_id =&#62; '22',
                                                    os_thread_id =&#62; '4529143808',
                                                    proc_no =&#62; 0,
                                                    query_id =&#62; '339',
                                                    query_status =&#62; '',
                                                    query_text =&#62; '',
                                                    row_locks =&#62; 0,
                                                    tables_in_use =&#62; 0,
                                                    tables_locked =&#62; 0,
                                                    thread_decl_inside =&#62; 0,
                                                    thread_status =&#62; '',
                                                    txn_doesnt_see_ge =&#62; '',
                                                    txn_id =&#62; '0',
                                                    txn_sees_lt =&#62; '',
                                                    txn_status =&#62; 'not started',
                                                    undo_log_entries =&#62; 0,
                                                    user =&#62; 'root'
                                                  },
                                                  {
                                                    active_secs =&#62; '13',
                                                    has_read_view =&#62; 0,
                                                    heap_size =&#62; '376',
                                                    hostname =&#62; 'localhost',
                                                    ip =&#62; '',
                                                    lock_structs =&#62; '2',
                                                    lock_wait_status =&#62; '',
                                                    lock_wait_time =&#62; 0,
                                                    locks =&#62; [
                                                               {
                                                                 db =&#62; 'test',
                                                                 index =&#62; '',
                                                                 insert_intention =&#62; 0,
                                                                 lock_mode =&#62; 'IX',
                                                                 lock_type =&#62; 'TABLE',
                                                                 n_bits =&#62; 0,
                                                                 page_no =&#62; 0,
                                                                 space_id =&#62; 0,
                                                                 special =&#62; '',
                                                                 table =&#62; 't1',
                                                                 txn_id =&#62; '1802',
                                                                 waiting =&#62; 0
                                                               },
                                                               {
                                                                 db =&#62; 'test',
                                                                 index =&#62; 'PRIMARY',
                                                                 insert_intention =&#62; 0,
                                                                 lock_mode =&#62; 'X',
                                                                 lock_type =&#62; 'RECORD',
                                                                 n_bits =&#62; '80',
                                                                 page_no =&#62; '386',
                                                                 space_id =&#62; 0,
                                                                 special =&#62; '',
                                                                 table =&#62; 't1',
                                                                 txn_id =&#62; '1802',
                                                                 waiting =&#62; 0
                                                               }
                                                             ],
                                                    mysql_thread_id =&#62; '21',
                                                    os_thread_id =&#62; '4528869376',
                                                    proc_no =&#62; 0,
                                                    query_id =&#62; '333',
                                                    query_status =&#62; '',
                                                    query_text =&#62; '',
                                                    row_locks =&#62; '7',
                                                    tables_in_use =&#62; 0,
                                                    tables_locked =&#62; 0,
                                                    thread_decl_inside =&#62; 0,
                                                    thread_status =&#62; '',
                                                    txn_doesnt_see_ge =&#62; '',
                                                    txn_id =&#62; '1802',
                                                    txn_sees_lt =&#62; '',
                                                    txn_status =&#62; 'ACTIVE',
                                                    undo_log_entries =&#62; 0,
                                                    user =&#62; 'root'
                                                  }
                                                ],
                                trx_id_counter =&#62; '1803'
                              }
                      },
          timestring =&#62; '2011-12-22 18:48:26',
          ts =&#62; [
                  2011,
                  12,
                  22,
                  18,
                  48,
                  26
                ]
        };

The output of that is 278 lines just for a single transaction holding a couple row locks. After digging around the output for a while, I came up with this script that provides a pretty flexible way to print out various "fields" related to transactions that satisfy particular criteria (note that here I'm only getting the output of the "tx" section, which would give 115 lines of output in the Data::Dumper example above):

#!/usr/bin/perl
use Data::Dumper;
require "innotop";
$Data::Dumper::Indent = 2;
my $innodb_parser = new InnoDBParser;

my @fields = (
        "txn_id",
        "active_secs",
        "lock_structs",
        "row_locks",
        "hostname"
);

my $contents;
{  
   local $INPUT_RECORD_SEPARATOR = undef;
   $contents = ;
}

my $innodb_status = $innodb_parser-&#62;parse_status_text(
   $contents,
   0,
   # Omit the following parameter to get all sections.
   {  tx =&#62; 1 },
);

#print Dumper $innodb_status; exit;

for my $tx (@{$innodb_status-&#62;{sections}-&#62;{tx}-&#62;{transactions}}) {
        if (
                $tx-&#62;{active_secs} &#62; 0
        ) {
                print join( "\t",
                        map { $tx-&#62;{$_} } @fields
                ), "\n";
        }
}

I ran that against another status snippet that includes a couple different transactions each with some locks. Here's the output (along with what might be a helpful way to extract just a single status output from among a file filled with them):

$ grep -hn 'INNODB MONITOR' mysqld.err &#124; tail -n 2
1703104:111222 19:16:12 INNODB MONITOR OUTPUT
1741522:END OF INNODB MONITOR OUTPUT

$ START=1703104; END=1741522; tail -n +$START &#60; mysqld.err &#124; head -n $(( $END - $START + 1 )) &#124; perl txinfo.pl
1808    380     5       2003    localhost
1806    864     11      6206    localhost

Hey, that&#039;s pretty neat, we&#039;ve actually got some nice info, somewhat programmatically and reliably retrieved from the InnoDB Lock Monitor. If you want to get additional fields from the parsed data structure, you can just add the names of the fields to the @fields array at the top of the program. I&#039;ll probably get carried away and add those as command-line options to this thing at some point. I&#039;m looking forward to being able to use this the next time I&#039;ve got almost 5 million lines of InnoDB status output to make sense of!]]></description>
			<content:encoded><![CDATA[<p>A customer opened a <a href="http://www.skysql.com/services/mysql/support">support</a> issue to ask about some help determining why they were seeing a lot of Lock Wait Timeouts. I asked them to enable the InnoDB Lock Monitor so that I could get a look at what was going on in their transactions and whether there might be some locks held longer than necessary.</p>
<p>The customer sent in a 184MB MySQL error log with 4773836 lines. I started looking through it, but I could tell I was going to need a better way to get a better overview of the file than what I'd be able to piece together trying to poke through it and look for individual lines. I started piping the file through a variety of UNIX tools to narrow down what I was seeing.</p>
<p>I ended up with this mess:</p>
<pre>
 < mysqld.err grep ACTIVE | cut -d' ' -f 2,4 | sort -rn -k 2 | perl -F, -ane 'print "$F[0] $F[1]" if not $v{$F[0]}; $v{$F[0]} = $F[1];' | head
</pre><p>
It's hideous, but it's pretty helpful. Here's the output:</p>
<pre>
1EC080F1  24284
1EC84325  18196
1ECAC476  13430
1ED57B19  4880
1ECFF656  4198
1ED54BF5  1229
1ED59197  193
1ED58A84  164
1ED58A80  164
1ED50FDA  134
</pre><p>
It's just a list of the longest-running transactions, showing the transaction ID and the time it's been active.</p>
<p>I decided to re-write it in perl, since I was already using perl in my pipeline and wanted the opportunity to get some other output in a slightly more reasonable way. Here's the perl version:</p>
<pre>
#!/usr/bin/perl -n
if ( /ACTIVE (\d+) sec/ ) { 
    @r = split(' '); 
    $t{substr($r[1],0,8)} = $r[3] if not defined $t{$r[1]} and $t{$r[1]}<$r[3]; 

}  

END { 
    map { 
        print "$_ $t{$_}\n" 
    } (
        sort { 
            $t{$b} <=> $t{$a} 
        } keys %t
    )[0..9]  
}
</pre><pre>
$ perl toptrans.pl < mysqld.err
1EC080F1 24284
1EC84325 18196
1ECAC476 13430
1ED57B19 4880
1ECFF656 4198
1ED54BF5 1229
1ED59197 193
1ED58A80 164
1ED58A84 164
1ED50FDA 134
</pre><p>
That gives exactly the same output as the first version, but I figure it might be easier to change the criteria I'm looking for or the output contents/format.</p>
<p>But really parsing through InnoDB status or monitor information is not very much fun. I got lucky that all the information I was looking for was on a single line. If I want to get anything more, though, such as the number of locks being held, any information about the locks, the MySQL thread ID, et cetera, it'd be really nasty. I thought that there must be something better out there, and a bit of Google quickly reminded me that <a href="http://www.xaprb.com">Baron Schwartz</a> [<a href="http://www.xaprb.com">http://www.xaprb.com</a>] wrote a really excellent InnoDB status parser for use in <a href="http://code.google.com/p/innotop/">innotop</a> [<a href="http://code.google.com/p/innotop/">http://code.google.com/p/innotop/</a>].</p>
<p>The <code>innotop</code> script includes the InnoDBParser module inside of the file. You can just do a <code>require</code> to get access to the goods, then instantiate a new <code>InnoDBParser</code>. I ended up using Data::Dumper to make sense of the structure of the data:</p>
<pre>
#!/usr/bin/perl
use Data::Dumper;
require "innotop";
my $innodb_parser = new InnoDBParser;


my $contents;
{
   local $INPUT_RECORD_SEPARATOR = undef;
   $contents = <STDIN>;
}

my $innodb_status = $innodb_parser->parse_status_text(
   $contents,
   0,
   # Omit the following parameter to get all sections.
#   {  tx => 1 },
);

$Data::Dumper::Indent = 2;
print Dumper $innodb_status;
</pre><pre>
$ START=191; END=319; tail -n +$START < mysqld.err | head -n $(( $END - $START + 1 )) | perl txinfo.pl

$VAR1 = {
          got_all => 1,
          last_secs => '20',
          sections => {
                        bp => {
                                add_pool_alloc => '0',
                                awe_mem_alloc => 0,
                                buf_free => '7822',
                                buf_pool_hit_rate => undef,
                                buf_pool_hits => undef,
                                buf_pool_reads => undef,
                                buf_pool_size => '8192',
                                complete => 1,
                                dict_mem_alloc => '41875',
                                page_creates_sec => '0.00',
                                page_reads_sec => '0.00',
                                page_writes_sec => '0.00',
                                pages_created => '1',
                                pages_modified => '0',
                                pages_read => '368',
                                pages_total => '369',
                                pages_written => '32',
                                reads_pending => '0',
                                total_mem_alloc => '137363456',
                                writes_pending => '0',
                                writes_pending_flush_list => 0,
                                writes_pending_lru => 0,
                                writes_pending_single_page => 0
                              },
                        bt => {
                                complete => 1,
                                fulltext => 'srv_master_thread loops: 4 1_second, 4 sleeps, 0 10_second, 6 background, 6 flush
srv_master_thread log flush and writes: 4'
                              },
                        ib => {
                                bufs_in_node_heap => undef,
                                complete => 1,
                                free_list_len => undef,
                                hash_searches_s => '0.00',
                                hash_table_size => undef,
                                inserts => undef,
                                merged_recs => undef,
                                merges => undef,
                                non_hash_searches_s => '0.00',
                                seg_size => undef,
                                size => undef,
                                used_cells => undef
                              },
                        io => {
                                avg_bytes_s => '0',
                                complete => 1,
                                flush_type => 'fsync',
                                fsyncs_s => '0.00',
                                os_file_reads => '379',
                                os_file_writes => '30',
                                os_fsyncs => '11',
                                pending_aio_writes => undef,
                                pending_buffer_pool_flushes => '0',
                                pending_ibuf_aio_reads => '0',
                                pending_log_flushes => '0',
                                pending_log_ios => '0',
                                pending_normal_aio_reads => undef,
                                pending_preads => 0,
                                pending_pwrites => 0,
                                pending_sync_ios => '0',
                                reads_s => '0.00',
                                threads => {
                                             '0' => {
                                                      event_set => 0,
                                                      purpose => 'insert buffer thread',
                                                      state => 'waiting for i/o request',
                                                      thread => '0'
                                                    },
                                             '1' => {
                                                      event_set => 0,
                                                      purpose => 'log thread',
                                                      state => 'waiting for i/o request',
                                                      thread => '1'
                                                    },
                                             '2' => {
                                                      event_set => 0,
                                                      purpose => 'read thread',
                                                      state => 'waiting for i/o request',
                                                      thread => '2'
                                                    },
                                             '3' => {
                                                      event_set => 0,
                                                      purpose => 'read thread',
                                                      state => 'waiting for i/o request',
                                                      thread => '3'
                                                    },
                                             '4' => {
                                                      event_set => 0,
                                                      purpose => 'read thread',
                                                      state => 'waiting for i/o request',
                                                      thread => '4'
                                                    },
                                             '5' => {
                                                      event_set => 0,
                                                      purpose => 'read thread',
                                                      state => 'waiting for i/o request',
                                                      thread => '5'
                                                    },
                                             '6' => {
                                                      event_set => 0,
                                                      purpose => 'write thread',
                                                      state => 'waiting for i/o request',
                                                      thread => '6'
                                                    },
                                             '7' => {
                                                      event_set => 0,
                                                      purpose => 'write thread',
                                                      state => 'waiting for i/o request',
                                                      thread => '7'
                                                    },
                                             '8' => {
                                                      event_set => 0,
                                                      purpose => 'write thread',
                                                      state => 'waiting for i/o request',
                                                      thread => '8'
                                                    },
                                             '9' => {
                                                      event_set => 0,
                                                      purpose => 'write thread',
                                                      state => 'waiting for i/o request',
                                                      thread => '9'
                                                    }
                                           },
                                writes_s => '0.00'
                              },
                        lg => {
                                complete => 1,
                                last_chkp => '139205502',
                                log_flushed_to => '139205502',
                                log_ios_done => '12',
                                log_ios_s => '0.00',
                                log_seq_no => '139205502',
                                pending_chkp_writes => '0',
                                pending_log_writes => '0'
                              },
                        ro => {
                                complete => 0,
                                del_sec => '0.00',
                                ins_sec => '0.00',
                                main_thread_id => '4496171008',
                                main_thread_proc_no => 0,
                                main_thread_state => 'waiting for server activity',
                                n_reserved_extents => 0,
                                num_rows_del => '0',
                                num_rows_ins => '0',
                                num_rows_read => '12',
                                num_rows_upd => '0',
                                queries_in_queue => '0',
                                queries_inside => '0',
                                read_sec => '0.30',
                                read_views_open => '1',
                                upd_sec => '0.00'
                              },
                        sm => {
                                complete => 1,
                                mutex_os_waits => '0',
                                mutex_spin_rounds => '0',
                                mutex_spin_waits => '0',
                                reservation_count => '4',
                                rw_excl_os_waits => undef,
                                rw_excl_spins => undef,
                                rw_shared_os_waits => undef,
                                rw_shared_spins => undef,
                                signal_count => '4',
                                wait_array_size => 0,
                                waits => []
                              },
                        tx => {
                                complete => 1,
                                history_list_len => '105',
                                is_truncated => 0,
                                num_lock_structs => undef,
                                purge_done_for => '163A',
                                purge_undo_for => '0',
                                transactions => [
                                                  {
                                                    active_secs => 0,
                                                    has_read_view => 0,
                                                    heap_size => 0,
                                                    hostname => 'localhost',
                                                    ip => '',
                                                    lock_structs => 0,
                                                    lock_wait_status => '',
                                                    lock_wait_time => 0,
                                                    mysql_thread_id => '22',
                                                    os_thread_id => '4529143808',
                                                    proc_no => 0,
                                                    query_id => '339',
                                                    query_status => '',
                                                    query_text => '',
                                                    row_locks => 0,
                                                    tables_in_use => 0,
                                                    tables_locked => 0,
                                                    thread_decl_inside => 0,
                                                    thread_status => '',
                                                    txn_doesnt_see_ge => '',
                                                    txn_id => '0',
                                                    txn_sees_lt => '',
                                                    txn_status => 'not started',
                                                    undo_log_entries => 0,
                                                    user => 'root'
                                                  },
                                                  {
                                                    active_secs => '13',
                                                    has_read_view => 0,
                                                    heap_size => '376',
                                                    hostname => 'localhost',
                                                    ip => '',
                                                    lock_structs => '2',
                                                    lock_wait_status => '',
                                                    lock_wait_time => 0,
                                                    locks => [
                                                               {
                                                                 db => 'test',
                                                                 index => '',
                                                                 insert_intention => 0,
                                                                 lock_mode => 'IX',
                                                                 lock_type => 'TABLE',
                                                                 n_bits => 0,
                                                                 page_no => 0,
                                                                 space_id => 0,
                                                                 special => '',
                                                                 table => 't1',
                                                                 txn_id => '1802',
                                                                 waiting => 0
                                                               },
                                                               {
                                                                 db => 'test',
                                                                 index => 'PRIMARY',
                                                                 insert_intention => 0,
                                                                 lock_mode => 'X',
                                                                 lock_type => 'RECORD',
                                                                 n_bits => '80',
                                                                 page_no => '386',
                                                                 space_id => 0,
                                                                 special => '',
                                                                 table => 't1',
                                                                 txn_id => '1802',
                                                                 waiting => 0
                                                               }
                                                             ],
                                                    mysql_thread_id => '21',
                                                    os_thread_id => '4528869376',
                                                    proc_no => 0,
                                                    query_id => '333',
                                                    query_status => '',
                                                    query_text => '',
                                                    row_locks => '7',
                                                    tables_in_use => 0,
                                                    tables_locked => 0,
                                                    thread_decl_inside => 0,
                                                    thread_status => '',
                                                    txn_doesnt_see_ge => '',
                                                    txn_id => '1802',
                                                    txn_sees_lt => '',
                                                    txn_status => 'ACTIVE',
                                                    undo_log_entries => 0,
                                                    user => 'root'
                                                  }
                                                ],
                                trx_id_counter => '1803'
                              }
                      },
          timestring => '2011-12-22 18:48:26',
          ts => [
                  2011,
                  12,
                  22,
                  18,
                  48,
                  26
                ]
        };
</pre><p>
The output of that is 278 lines just for a single transaction holding a couple row locks. After digging around the output for a while, I came up with this script that provides a pretty flexible way to print out various "fields" related to transactions that satisfy particular criteria (note that here I'm only getting the output of the "tx" section, which would give 115 lines of output in the Data::Dumper example above):</p>
<pre>
#!/usr/bin/perl
use Data::Dumper;
require "innotop";
$Data::Dumper::Indent = 2;
my $innodb_parser = new InnoDBParser;

my @fields = (
        "txn_id",
        "active_secs",
        "lock_structs",
        "row_locks",
        "hostname"
);

my $contents;
{  
   local $INPUT_RECORD_SEPARATOR = undef;
   $contents = <STDIN>;
}

my $innodb_status = $innodb_parser->parse_status_text(
   $contents,
   0,
   # Omit the following parameter to get all sections.
   {  tx => 1 },
);

#print Dumper $innodb_status; exit;

for my $tx (@{$innodb_status->{sections}->{tx}->{transactions}}) {
        if (
                $tx->{active_secs} > 0
        ) {
                print join( "\t",
                        map { $tx->{$_} } @fields
                ), "\n";
        }
}
</pre><p>
I ran that against another status snippet that includes a couple different transactions each with some locks. Here's the output (along with what might be a helpful way to extract just a single status output from among a file filled with them):</p>
<pre>
$ grep -hn 'INNODB MONITOR' mysqld.err | tail -n 2
1703104:111222 19:16:12 INNODB MONITOR OUTPUT
1741522:END OF INNODB MONITOR OUTPUT

$ START=1703104; END=1741522; tail -n +$START < mysqld.err | head -n $(( $END - $START + 1 )) | perl txinfo.pl
1808    380     5       2003    localhost
1806    864     11      6206    localhost
</pre><p>
Hey, that's pretty neat, we've actually got some nice info, somewhat programmatically and reliably retrieved from the InnoDB Lock Monitor. If you want to get additional fields from the parsed data structure, you can just add the names of the fields to the <code>@fields</code> array at the top of the program. I'll probably get carried away and add those as command-line options to this thing at some point. I'm looking forward to being able to use this the next time I've got almost 5 million lines of InnoDB status output to make sense of!</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31422&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31422&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/12/23/learning-to-love-the-innodb-lock-monitor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optimizing InnoDB for creating 30,000 tables (and nothing else)</title>
		<link>http://www.mysqlperformanceblog.com/2011/12/22/optimizing-innodb-for-creating-30000-tables-and-nothing-else/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=optimizing-innodb-for-creating-30000-tables-and-nothing-else</link>
		<comments>http://www.mysqlperformanceblog.com/2011/12/22/optimizing-innodb-for-creating-30000-tables-and-nothing-else/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 23:11:04 +0000</pubDate>
		<dc:creator>Stewart Smith</dc:creator>
				<category><![CDATA[haildb]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[LD_PRELOAD]]></category>
		<category><![CDATA[libeatmydata]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=7614</guid>
		<description><![CDATA[Once upon a time, it would have been considered madness to even attempt to create 30,000 tables in InnoDB. That time is now a memory. We have customers with a lot more tables than a mere 30,000. There have historically been no tests for anything near this many tables in the MySQL test suite.
So, in fleshing out the test cases for this and innodb_dict_size_limit I was left with the not so awesome task of making the test case run in remotely reasonable time. The test case itself is pretty simple, a simple loop in the not at all exciting mysqltest language that will create 30,000 identical tables, insert a row into each of them and then drop them.
Establishing the ground rules: I do not care about durability. This is a test case, not a production system holding important data which means I can lie, cheat and steal to get performance.
The simplest way is to use libeatmydata. This is a small shared library designed to be LD_PRELOADed that disables just about every way an application can write data safely to disk. This is perfect for running a test suite for a database server as if your machine crashes halfway through a test run, you&#8217;ll just start the test run again &#8211; you are not dealing with any important data. Obviously, you should never, ever, ever use libeatmydata with anything you care about; it is called libeat-my-data for a reason.
Without libeatmydata and using the default options for the MySQL test suite, I noticed that I was only creating about 10-15 tables every second which means we&#8217;d take a very long time to create 30,000. After a bit of time, it sped up to about 20-25 per second. Of course, with the default timeout for a MySQL test (15 minutes), we quickly (well.. in 15 minutes) hit that and the test is failed for taking too long.
With libeatmydata the test takes about 77 seconds &#8211; a huge improvement.
So how could I possibly get this test to run (even with &#8211;big-test option to mysql-test-run) in reasonable time? Well&#8230; I can set some InnoDB options! I&#8217;m going to try the obvious first: innodb-flush-method, sync-frm and innodb-flush-log-at-trx-commit. There is an undocumented option for innodb-flush-method called &#8220;nosync&#8221; that is meant to not flush data to disk. Since you could hear how much syncing to disk was going on during my test run, not syncing to disk all the time would get closer to the libeatmydata performance. I also want to disable syncing of the FRM file to disk and set log flushing to happen as infrequently as possible. With these options I started to get somewhere between 25-90 CREATE TABLE per second. This gets the test execution time down to 12 minutes, so that just escapes the timeout.
I then added the options of innodb-adaptive-checkpoint=0 and flush-neighbor-pages=0 in the hope of avoiding a bunch of background flushing (which called fsync). It didn&#8217;t help.
I noticed that there was an fsync() call when extending the data file, so I tried setting a higher innodb-autoextend-increment and a larger initial size. This also did not help.
So how fast is InnoDB under all of this? Am I hitting a fundamental limitation in InnoDB?
Well&#8230;. I went and wrote a program using HailDB &#8211; which is InnoDB as a shared library that you can call using an easy to use C API.
Writing a simple test program that creates 30,000 tables in a similar InnoDB configuration as default MySQL is pretty easy (easier than writing the mysqltest language that&#8217;s for sure). After a &#8220;I&#8217;m glad this isn&#8217;t a SSD&#8221; killer amount of fsync() activity, it took a total of 14.5 minutes. Not too bad. This is less than my initial test with MySQL, probably due to not writing and syncing FRM files. If I run the same program with libeatmydata, it only takes 15-20 seconds. Clearly it&#8217;s syncing things to disk that takes all the time.
If we make the HailDB program set flush_method to nosync and flush_log_at_trx_commit=2, the execution time is only 1 minute. This is much closer to the libeatmydata time than MySQL ever got.
With HailDB you can do more than one data dictionary operation in a single transaction. So if instead of setting flush_method and flush_log_at_trx_commit I instead group the CREATE TABLE into transactions of creating 100 tables at a time, I get an execution time of 3 minutes. This is a big difference to the original 14.5 minutes.
What&#8217;s the practical applications of all of this? Not much (unless you&#8217;re writing complex test cases) but it is clear that loading large amounts of DDL could be a lot faster than it is currently (although loading the data into tables is still going to take a while too).]]></description>
			<content:encoded><![CDATA[<p>Once upon a time, it would have been considered madness to even attempt to create 30,000 tables in InnoDB. That time is now a memory. We have customers with a lot more tables than a mere 30,000. There have historically been no tests for anything near this many tables in the MySQL test suite.</p>
<p>So, in fleshing out the test cases for this and <a href="http://www.percona.com/doc/percona-server/5.5/management/innodb_dict_size_limit.html">innodb_dict_size_limit</a> I was left with the not so awesome task of making the test case run in remotely reasonable time. The test case itself is pretty simple, a simple loop in the not at all exciting mysqltest language that will create 30,000 identical tables, insert a row into each of them and then drop them.</p>
<p>Establishing the ground rules: I do not care about durability. This is a test case, not a production system holding important data which means I can lie, cheat and steal to get performance.</p>
<p>The simplest way is to use <a href="http://flamingspork.com/projects/libeatmydata/">libeatmydata</a>. This is a small shared library designed to be LD_PRELOADed that disables just about every way an application can write data safely to disk. This is perfect for running a test suite for a database server as if your machine crashes halfway through a test run, you&#8217;ll just start the test run again &#8211; you are not dealing with any important data. Obviously, you should never, ever, ever use libeatmydata with anything you care about; it is called lib<strong>eat-</strong><strong>my-data</strong> for a <strong>reason</strong>.</p>
<p>Without libeatmydata and using the default options for the MySQL test suite, I noticed that I was only creating about 10-15 tables every second which means we&#8217;d take a very long time to create 30,000. After a bit of time, it sped up to about 20-25 per second. Of course, with the default timeout for a MySQL test (15 minutes), we quickly (well.. in 15 minutes) hit that and the test is failed for taking too long.</p>
<p>With libeatmydata the test takes about 77 seconds &#8211; a <strong>huge </strong>improvement.</p>
<p>So how could I possibly get this test to run (even with &#8211;big-test option to mysql-test-run) in reasonable time? Well&#8230; I can set some InnoDB options! I&#8217;m going to try the obvious first: innodb-flush-method, sync-frm and innodb-flush-log-at-trx-commit. There is an undocumented option for innodb-flush-method called &#8220;nosync&#8221; that is meant to not flush data to disk. Since you could hear how much syncing to disk was going on during my test run, not syncing to disk all the time would get closer to the libeatmydata performance. I also want to disable syncing of the FRM file to disk and set log flushing to happen as infrequently as possible. With these options I started to get somewhere between 25-90 CREATE TABLE per second. This gets the test execution time down to 12 minutes, so that <strong>just</strong> escapes the timeout.</p>
<p>I then added the options of innodb-adaptive-checkpoint=0 and flush-neighbor-pages=0 in the hope of avoiding a bunch of background flushing (which called fsync). It didn&#8217;t help.</p>
<p>I noticed that there was an fsync() call when extending the data file, so I tried setting a higher innodb-autoextend-increment and a larger initial size. This also did not help.</p>
<p>So how fast is InnoDB under all of this? Am I hitting a fundamental limitation in InnoDB?</p>
<p>Well&#8230;. I went and wrote a program using <a href="http://www.haildb.com">HailDB</a> &#8211; which is InnoDB as a shared library that you can call using an easy to use C API.</p>
<p>Writing a simple test program that creates 30,000 tables in a similar InnoDB configuration as default MySQL is pretty easy (easier than writing the mysqltest language that&#8217;s for sure). After a &#8220;I&#8217;m glad this isn&#8217;t a SSD&#8221; killer amount of fsync() activity, it took a total of 14.5 minutes. Not too bad. This is less than my initial test with MySQL, probably due to not writing and syncing FRM files. If I run the same program with libeatmydata, it only takes 15-20 seconds. Clearly it&#8217;s syncing things to disk that takes all the time.</p>
<p>If we make the HailDB program set flush_method to nosync and flush_log_at_trx_commit=2, the execution time is only 1 minute. This is <strong>much</strong> closer to the libeatmydata time than MySQL ever got.</p>
<p>With HailDB you can do more than one data dictionary operation in a single transaction. So if instead of setting flush_method and flush_log_at_trx_commit I instead group the CREATE TABLE into transactions of creating 100 tables at a time, I get an execution time of 3 minutes. This is a big difference to the original 14.5 minutes.</p>
<p>What&#8217;s the practical applications of all of this? Not much (unless you&#8217;re writing complex test cases) but it is clear that loading large amounts of DDL could be a lot faster than it is currently (although loading the data into tables is still going to take a while too).</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31408&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31408&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/12/23/optimizing-innodb-for-creating-30000-tables-and-nothing-else/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

