<?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>Schadenfreude &#187; rsync</title>
	<atom:link href="http://www.ralree.com/tag/rsync/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ralree.com</link>
	<description>Malicious enjoyment derived from observing someone else's misfortune</description>
	<lastBuildDate>Thu, 09 Feb 2012 01:49:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Maximizing rsync performance between Linux and Solaris</title>
		<link>http://www.ralree.com/2011/08/20/maximizing-rsync-performance-between-linux-and-solaris/</link>
		<comments>http://www.ralree.com/2011/08/20/maximizing-rsync-performance-between-linux-and-solaris/#comments</comments>
		<pubDate>Sun, 21 Aug 2011 04:18:02 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[gigabit]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[openindiana]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[speed]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=23168</guid>
		<description><![CDATA[I now am a proud owner of an OpenIndiana server, and I&#8217;ve been moving files to it over gigabit ethernet for the past few hours. During this time, I&#8217;ve made some important realizations, and I figured I&#8217;d note them here for everyone&#8217;s benefit.  My transfers started off at about 10MB/s sustained, which is right around 100Mbit/s speeds, but on a gigabit network. 1. Ethernet Cables Something we don&#8217;t think about too often these days is the type/quality of Ethernet cable we&#8217;re using [...]]]></description>
			<content:encoded><![CDATA[<p>I now am a proud owner of an OpenIndiana server, and I&#8217;ve been moving files to it over gigabit ethernet for the past few hours. During this time, I&#8217;ve made some important realizations, and I figured I&#8217;d note them here for everyone&#8217;s benefit.  My transfers started off at about 10MB/s sustained, which is right around 100Mbit/s speeds, but on a <strong>gigabit network</strong>.</p>
<h2>1. Ethernet Cables</h2>
<p>Something we don&#8217;t think about too often these days is the type/quality of Ethernet cable we&#8217;re using in our homes.  I certainly thought I was using CAT5e until I actually looked today and found my desktop machine was hooked up with a plain-Jane CAT5 cable.  Yuck &#8211; that&#8217;s in the garbage now.  After that change, I noticed a small improvement in sustained transfer speed, but still holding at around 12MB/s.</p>
<h2>2. MTU</h2>
<p>If you have 2 gigabit cards that support it, <strong>and</strong> a network switch that supports it, you can get better speeds by increasing the maximum transmission unit of your network card.  In Linux, we do it like this:</p>
<pre><code>hank☢barad-dur:~ % sudo ifconfig eth0 mtu 8000</code></pre>
<p>In Solaris, or its derivatives, you do it like this:</p>
<pre><code>root@nyu:~ # ifconfig e1000g0 mtu 8170</code></pre>
<p>You also have to enable that mtu in <strong>/kernel/drv/e1000g.conf</strong>! I found that out thanks to <a href="http://saifulaziz.wordpress.com/2009/11/22/how-to-change-the-default-maximum-transmission-unit-mtu-size/">this post</a>. It&#8217;s quite easy &#8211; this is what mine looks like:</p>
<pre><code>MaxFrameSize=2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
# 0 is for normal ethernet frames.
# 1 is for upto 4k size frames.
# 2 is for upto 8k size frames.
# 3 is for upto 16k size frames.</code></pre>
<p>Each number corresponds to the last number in the interface, so <strong>e1000g0</strong> is the first number (set to 2 in this example) and so on. My switch only supports 9K Jumbo Frames, so this was fine.</p>
<p>This got me a little more stability, but I was still basically capped at 100Mbit (13MB/s). Time to roll out the big guns!</p>
<h2>3. Rsync compression</h2>
<p>The <strong>-z</strong> option in rsync compresses files before they&#8217;re sent.  I have nice beefy CPUs on both ends, so I thought that wouldn&#8217;t hurt &#8211; I was <em>completely </em>wrong about this.  For some reason it slows down the transfer by about 50% here.  CPU usage is very low on both machines, so this is really confusing, but as a general rule, do <strong>not</strong> use compression when transferring files with rsync on a LAN.  So, now that it&#8217;s off, I&#8217;m up to about 200Mbits/s.  Not bad, but we can do better!</p>
<h2>4. Rsync method</h2>
<p>So, when you run an rsync like this:</p>
<pre><code>rsync -arxWh --progress . root@192.168.1.8:/diclonius/data</code></pre>
<p>You&#8217;re telling rsync to log in (using rsh or ssh) to 192.168.1.8 using the root account.  Now, if rsh is selected, then everything is peachy and you&#8217;ll get great rates.  But, if ssh is selected, you&#8217;ll get encryption bloat, and your throughput will be reduced significantly (not to mention CPU usage will be higher).  There&#8217;s a fix for this &#8211; on the destination system, run an rsync daemon.  The instructions to do so can be found all over, but <a href="http://transamrit.net/docs/rsync/">these</a> were helpful for me.  I set up the rsyncd.conf and secrets file, and just ran <code>rsync --daemon</code>, which backgrounded.  I then executed this on the sending machine:</p>
<pre><code>rsync -arxWh --progress . rsync://hank@192.168.1.8/data</code></pre>
<p>And immediately got another 10MB/s (!!) bump in speed.  So, now files are cruising over the network at around 300Mbits/s, which is good enough for now.  If I didn&#8217;t have a crappy Marvell onboard network interface on my host machine, and actually got a real gigabit card (I have a PCI-E one in the mail that will supposedly do full gigabit), this would be a lot faster.  For now, I&#8217;ll just have to deal with 1/3 of its potential.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2011/08/20/maximizing-rsync-performance-between-linux-and-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ignoring SVN and CVS files with rsync</title>
		<link>http://www.ralree.com/2007/03/06/ignoring-svn-and-cvs-files-with-rsync/</link>
		<comments>http://www.ralree.com/2007/03/06/ignoring-svn-and-cvs-files-with-rsync/#comments</comments>
		<pubDate>Tue, 06 Mar 2007 21:07:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cvs]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/ignoring-svn-and-cvs-files-with-rsync</guid>
		<description><![CDATA[I found out how to get rid of those pesky Subversion and CVS files as well as some other crappy files laying around when rsyncing. It&#8217;s really quite simple. It turns out the *-C* switch does this for you: rsync -Cavrx ... Very nice.]]></description>
			<content:encoded><![CDATA[<p>I found out how to get rid of those pesky Subversion and CVS files as well as some other crappy files laying around when rsyncing.  It&#8217;s really quite simple.  It turns out the <em>*-C</em>* switch does this for you:</p>
<pre><code>
rsync -Cavrx ...
</code></pre>
<p>Very nice.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2007/03/06/ignoring-svn-and-cvs-files-with-rsync/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

