<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>domas mituzas &#187; backup</title>
	<atom:link href="http://dom.as/tag/backup/feed/" rel="self" type="application/rss+xml" />
	<link>http://dom.as</link>
	<description></description>
	<lastBuildDate>Thu, 02 Feb 2012 21:29:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='dom.as' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/6e344c6e0cd7462eb056f8b98eb2cbcd?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>domas mituzas &#187; backup</title>
		<link>http://dom.as</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dom.as/osd.xml" title="domas mituzas" />
	<atom:link rel='hub' href='http://dom.as/?pushpress=hub'/>
		<item>
		<title>On hot backups</title>
		<link>http://dom.as/2010/05/08/on-hot-backups/</link>
		<comments>http://dom.as/2010/05/08/on-hot-backups/#comments</comments>
		<pubDate>Sat, 08 May 2010 22:15:56 +0000</pubDate>
		<dc:creator>Domas Mituzas</dc:creator>
				<category><![CDATA[facebook]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[snapshot]]></category>
		<category><![CDATA[xtrabackup]]></category>

		<guid isPermaLink="false">http://mituzas.lt/?p=739</guid>
		<description><![CDATA[Few years ago I was looking at crash recovery code, and realized that InnoDB has removed all the comments from the code [this assumption is debunked by Heikki in comments section], related to replay of transaction log. Judging by high &#8230; <a href="http://dom.as/2010/05/08/on-hot-backups/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=739&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Few years ago I was looking at crash recovery code, and realized that InnoDB has removed all the comments from the code <i>[this assumption is debunked by Heikki in comments section]</i>, related to replay of transaction log. Judging by high quality of comments in the remaining codebase, I realized that it was all done to obscure any efforts to build another InnoDB hot backup solution &#8211; competitor to first Innobase standalone offering.</p>
<p>I was enjoying the moment when Percona <a href="http://www.mysqlperformanceblog.com/2009/02/24/xtrabackup-open-source-alternative-for-innodb-hot-backup-call-for-ideas/">launched their own implementation</a> of the tool. Since the inception, it became more and more robust and feature rich.</p>
<p>We have used xtrabackup in our environment a lot &#8211; just&#8230; not for backup &#8211; the major use case right now is for cloning server instances &#8211; either for building new replicas, shadow servers, or replacing masters &#8211; and allows us to do that without interrupting any operation.</p>
<p>Now what makes the whole situation way more interesting &#8211; Oracle/MySQL announced at the conference, that InnoDB Hot Backup will be part of the Enterprise offering &#8211; which makes it way more available to MySQL customer community, than when it required quite expensive per-server licenses.</p>
<p>Of course, open source xtrabackup is way easier to tweak for our environment  (O_DIRECT support, posix_fadvise(), flashcache hints, etc &#8211; was all added after release) &#8211; and it is interesting, how Oracle-provided tool will evolve. Right now xtrabackup already supports streaming operation, which makes it much more usable in large-database-on-small-hardware (read: sharded) environments, and provides flexibility to the users. Oracle of course owns much more of in-house expertise of both current internals operation, as well as all the future changes that will happen, so we may see leadership in the field coming from their side too.</p>
<p>One of our reasons for not using physical backup solution is simply that it is not space efficient. There may be multiple ways to approach that &#8211; from robust incremental backups, to partial backups, that wouldn&#8217;t include secondary indexes or have limited set of tables taken.</p>
<p>Some changes may actually require extended MySQL/InnoDB support &#8211; on multiple-terabyte instances one may not want to rescan the dataset for each incremental backup run &#8211; as resulting diff would be just a hundred gigabytes or less. This would require support for always-running backup agent that would aggregate information about block changes and allow for more efficient backup operation.</p>
<p>Discarding secondary indexes is way more attractive option with 5.1/Plugin ability to do fast independent index builds, that don&#8217;t require one row at a time B-Tree builds for all indexes at once (and of course, hit severe memory penalties on large tables or in parallel workloads).</p>
<p>Having always ready backups is important not only for ability to rebuild a box (and we have replicas for machine failures) &#8211; the real value is when backups can be used for massive-scale thousands of machines subset of table rows extraction. For that one cannot just ship full instance data around from backup storage &#8211; so recovery tools will have to be way flexible.</p>
<p>Probably core feature for that kind of operation would be ability to import tables directly from hot backup to online instances &#8211; unfortunately, restarting database instance is still costly (though we&#8217;re doing quite some work in that direction too).</p>
<p>I&#8217;m extremely happy that InnoDB started fixing operational issues like crash recovery performance, but there&#8217;s still a wide area of problems not touched properly yet &#8211; extremely in disaster recovery space, and I&#8217;m eager to see developments in this field &#8211; both from Oracle, and community members.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/domasmituzas.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/domasmituzas.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/domasmituzas.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/domasmituzas.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/domasmituzas.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/domasmituzas.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/domasmituzas.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/domasmituzas.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/domasmituzas.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/domasmituzas.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/domasmituzas.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/domasmituzas.wordpress.com/739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/domasmituzas.wordpress.com/739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/domasmituzas.wordpress.com/739/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=739&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dom.as/2010/05/08/on-hot-backups/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c660a6eb3a4005232acb111303bef12c?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">domasmituzas</media:title>
		</media:content>
	</item>
		<item>
		<title>mydumper</title>
		<link>http://dom.as/2009/02/03/mydumper/</link>
		<comments>http://dom.as/2009/02/03/mydumper/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 14:23:57 +0000</pubDate>
		<dc:creator>Domas Mituzas</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[mydumper]]></category>

		<guid isPermaLink="false">http://dammit.lt/?p=309</guid>
		<description><![CDATA[mydumper grew to a bigger project and now lives in a separate website at http://mydumper.org/ Last weekend I ended up working on small pet project &#8211; and today I&#8217;m kind of releasing it. So, I had that idea that there&#8217;s &#8230; <a href="http://dom.as/2009/02/03/mydumper/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=309&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><i>mydumper grew to a bigger project and now lives in a separate website at <a href='http://mydumper.org/'>http://mydumper.org/</a></i></p>
<p>Last weekend I ended up working on small pet project &#8211; and today I&#8217;m kind of releasing it.</p>
<p>So, I had that idea that there&#8217;s no good tool to do logical dump of MySQL data for large sites &#8211; mysqldump doesn&#8217;t provide too much of I/O pressure, mk-parallel-dump is closer, but it doesn&#8217;t do consistent snapshots, uses same mysqldump, as well as is written in Perl (haha!), and&#8230; I just wanted something new to hack, as proof of concept. For a while to use it one had to edit constants in code, but my colleague Mark contributed options support and it doesn&#8217;t need recompiles anymore to run it :)</p>
<p>So, let me introduce <a href='https://launchpad.net/mydumper'>mydumper</a>. It doesn&#8217;t dump table definitions, all it does is extracting data and writing it to files, fast. <span id="more-309"></span></p>
<p>I took ~20GB-sized French Wikipedia core database (<a href='http://p.defau.lt/?OFdwYHWaPEOhH6EB1_hqyA'>SHOW TABLE STATUS</a>), and tried dumping it with three different methods &#8211; mysqldump, mk-parallel-dump and mydumper (used 32 thread, chunked backup setting for last two).</p>
<p>Dump times, smaller is better:</p>
<pre>
mysqldump: 75m18s
maatkit:    8m13s
mydumper:   6m44s \o/ WINNER \o/
</pre>
<p>There&#8217;s no cache skew &#8211; I restarted mysqld before every test, and it is using O_DIRECT.</p>
<p>At certain moments it seemed like gigabit network wasn&#8217;t enough for the test&#8230; It seems, it was using underlying I/O properly too:</p>
<pre>
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          12.58    0.00    3.28   48.14    0.00   36.00

Device:         rrqm/s   wrqm/s     r/s     w/s   rsec/s   wsec/s
sda              19.00    26.00 3077.00    6.00 151720.00   306.00

   avgrq-sz avgqu-sz   await  svctm  %util
      49.31    32.09   10.27   0.32 100.00
</pre>
<p>Though, once I tried from warm caches, and saw 2m rows read a second, I had a warm fuzzy feeling :)</p>
<p>Apparently the trick of having successful fast mysql dump was applying lots of pressure to underlying storage as well as using multi-processor capabilities. So we do, so can you!</p>
<p>Oh, and easiest way to start is:</p>
<pre>
bzr co lp:mydumper/0.1
cd mydumper
make
./mydumper --help
</pre>
<p>Alternatively, one can use &#8216;lp:mydumper&#8217; to get trunk &#8211; though various things (like startup options) can change. Feel free to file bugs, ask questions, and contribute with anything you think is worth contributing (thats why it ended up on Launchpad).</p>
<p><a href='https://answers.launchpad.net/mydumper/+faqs'>FAQs page</a> can have answers to questions that might arise too :)</p>
<p>Update: Added also downloadable archive for bzr impaired at <a href='https://launchpad.net/mydumper/+download'>downloads</a> page.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/domasmituzas.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/domasmituzas.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/domasmituzas.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/domasmituzas.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/domasmituzas.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/domasmituzas.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/domasmituzas.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/domasmituzas.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/domasmituzas.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/domasmituzas.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/domasmituzas.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/domasmituzas.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/domasmituzas.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/domasmituzas.wordpress.com/309/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=309&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dom.as/2009/02/03/mydumper/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c660a6eb3a4005232acb111303bef12c?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">domasmituzas</media:title>
		</media:content>
	</item>
	</channel>
</rss>
