<?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>Toru Maesaka &#187; tc</title>
	<atom:link href="http://torum.net/tag/tc/feed/" rel="self" type="application/rss+xml" />
	<link>http://torum.net</link>
	<description>Hackaholic and a Web Addict based in Tokyo</description>
	<lastBuildDate>Sat, 01 Oct 2011 18:46:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>BlitzDB Primary Key Based Insertion Performance</title>
		<link>http://torum.net/2009/07/blitzdb-primary-key-based-insertion-performance/</link>
		<comments>http://torum.net/2009/07/blitzdb-primary-key-based-insertion-performance/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 02:16:52 +0000</pubDate>
		<dc:creator>Toru Maesaka</dc:creator>
				<category><![CDATA[drizzle]]></category>
		<category><![CDATA[oss]]></category>
		<category><![CDATA[blitzdb]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[tc]]></category>

		<guid isPermaLink="false">http://torum.net/?p=2276</guid>
		<description><![CDATA[Like most things, I think storage engine development is about divide and conquer. The first sub-problem that I&#8217;m tackling with BlitzDB is squeezing as much juice out as possible from Tokyo Cabinet to achieve fast write performance. This by the way happens to be the primary reason that I wrote skyload. Writing skyload turned out [...]]]></description>
			<content:encoded><![CDATA[<p>Like most things, I think storage engine development is about divide and conquer. The first sub-problem that I&#8217;m tackling with <a href="https://launchpad.net/blitzdb">BlitzDB</a> is squeezing as much juice out as possible from <a href="http://tokyocabinet.sourceforge.net">Tokyo Cabinet</a> to achieve fast write performance. This by the way happens to be the primary reason that I wrote <a href="http://code.google.com/p/skyload">skyload</a>.</p>
<p>Writing skyload turned out to be worthwhile since it helped me find several critical bugs in the engine that only occurred under concurrent insertion load. Thanks to <a href="http://developer.cybozu.co.jp/kazuho/in_english/">Kazuho Oku</a> for helping me through the issues that I was facing.</p>
<p>I think I&#8217;ve now reached a stage where I can share how well BlitzDB can perform insertion from concurrent connections. But before moving ahead, I&#8217;d like to emphasize that for a real guideline, I believe that performance comparison should be done by an unbiased third party. So please don&#8217;t take the results in this post as the &#8220;truth&#8221;. Heh, I did write both the storage engine and the load emulator after all :)</p>
<p>So, with the above in mind, here&#8217;s a skyload result on inserting one-hundred-thousand rows under different concurrency levels with BlitzDB and <a href="http://dev.mysql.com/doc/refman/5.4/en/myisam-storage-engine.html">MyISAM</a> (both engines under default configuration). </p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/tmaesaka/3727653385/" title="Skyload Result - MyISAM and BlitzDB by tmaesaka, on Flickr"><img src="http://farm3.static.flickr.com/2556/3727653385_790b0a8b81_o.png" width="500" height="305" alt="Skyload Result - MyISAM and BlitzDB" /></a></p>
<p>Figures presented above are calculated from an average of 5 runs per each concurrency level. Admittedly, an average from 5 runs is not sufficient to claim credibility of my result since the figures can easily be affected by the dirty buffer flush between the kernel and the filesystem (<a href="http://en.wikipedia.org/wiki/Ext3">ext3</a> in this particular benchmark). For this, I plan on extending skyload to run multiple runs of an identical test and compute the median and average.</p>
<p>For those that are interested, this is what the test table looks like:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> t1 <span style="color: #66cc66;">&#40;</span>
    id int <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span><span style="color: #66cc66;">,</span>
    col1 int<span style="color: #66cc66;">,</span>
    col2 double<span style="color: #66cc66;">,</span>
    col3 varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span> ENGINE<span style="color: #66cc66;">=</span>blitz;</pre></div></div>

<p>I didn&#8217;t bother benchmarking anything beyond 32 connections since I ran both the client and the server on the same quad core machine (there&#8217;s no point). This is probably why you can see a nice curve up to four concurrent connections with BlitzDB in the graph. Yet another reason why you should not believe everything I&#8217;ve provided in this entry.</p>
<h3>BlitzDB needs you</h3>
<p>BlitzDB is still very early in it&#8217;s making and I still have insane amount of work to do. For example, BlitzDB currently requires you to supply a primary key on your table. I plan on removing this limitation by generating a &#8220;fake&#8221; primary key internally but I still haven&#8217;t got around to it at this point.</p>
<p>Support for multiple indexes is not done yet despite having all the necessary components to achieve it. I could do all this on my own but I prefer not to. I’m totally open for ideas and contributors. If you&#8217;re interested in this storage engine project, please don&#8217;t hesitate to ping me (dev @ this domain) or the <a href="https://launchpad.net/~drizzle-discuss">Drizzle community</a>.  More eyeballs the merrier :)</p>
]]></content:encoded>
			<wfw:commentRss>http://torum.net/2009/07/blitzdb-primary-key-based-insertion-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

