<?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>pixelchaos.net &#187; IOS</title>
	<atom:link href="http://www.pixelchaos.net/category/ios/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pixelchaos.net</link>
	<description>random bits for your terminal</description>
	<lastBuildDate>Tue, 18 Jan 2011 16:25:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Coraid Odyssey: Part 5 (AoE vs iSCSI)</title>
		<link>http://www.pixelchaos.net/2008/04/16/coraid-odyssey-part-5-aoe-vs-iscsi/</link>
		<comments>http://www.pixelchaos.net/2008/04/16/coraid-odyssey-part-5-aoe-vs-iscsi/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 19:40:53 +0000</pubDate>
		<dc:creator>jcl</dc:creator>
				<category><![CDATA[AoE]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[IOS]]></category>
		<category><![CDATA[iSCSI]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.pixelchaos.net/?p=51</guid>
		<description><![CDATA[The next phase of this project is choosing AoE or iSCSI. The debate on the relative merits of each protocol continues to rage on the Internet but in my particular case the criteria are pretty simple; which one performs better without causing excessive system load? Just from reading about the two protocols I am already [...]]]></description>
			<content:encoded><![CDATA[<p>The next phase of this project is choosing AoE or iSCSI. The debate on the relative merits of each protocol continues to rage on the Internet but in my particular case the criteria are pretty simple; which one performs better without causing excessive system load? Just from reading about the two protocols I am already leaning toward iSCSI for the simple fact that I can use all my TCP/IP management tools (routing, NAT, firewalling, etc.) on every iSCSI device. The only (potential) drawback is CPU load on the involved systems since it has to calculate TCP checksums for all those packets. Yes, there are many, many other advantages of one protocol over the other. No, they don&#8217;t matter to me in this scenario :-) So here we go!</p>
<p><span id="more-51"></span><br />
In keeping with my character, the first thing I did was start all over again from scratch by reinstalling the operating system. This time around I set up /dev/md0 as /boot (255 MB) and /dev/md1 as an LVM physical volume (the remainder of the disk), within which /, /home, /usr and friends reside as logical volumes. Its something I&#8217;ve wanted to start doing with all my systems for a long time now and shouldn&#8217;t have any bearing on the performance tests we are about to do.</p>
<p>Regardless of which protocol will be used we need to enable jumbo frames on all the involved devices. For my setup that means the target (stor01), the initiator (node02), and the switch (a Cisco Catalyst 2970).</p>
<p>First, we turn on jumbo frames for gigabit ethernet at the switch. Beware that this requires a reset (aka reboot) of the switch to take effect:</p>
<p><code type="text"><br />
c2970# system mtu jumbo 9000<br />
</code></p>
<p>Now we enable an MTU of 9000 on both the target and the initiator:</p>
<p><code type="text"><br />
root@stor01:~# ifconfig bond0 mtu 9000<br />
</code></p>
<p><code type="text"><br />
root@node02:~# ifconfig eth0 mtu 9000<br />
</code></p>
<p>For the sake of comparison, here is an iperf test done between the target and initiator with the standard MTU of 1500, and then with an MTU of 9000:</p>
<p><code type="text"><br />
root@stor01:~# iperf -s<br />
------------------------------------------------------------<br />
Server listening on TCP port 5001<br />
TCP window size: 1.00 MByte (default)<br />
------------------------------------------------------------<br />
[  4] local 65.171.150.4 port 5001 connected with 65.171.150.161 port 58731<br />
[  4]  0.0-10.0 sec    780 MBytes    654 Mbits/sec<br />
[  5] local 65.171.150.4 port 5001 connected with 65.171.150.161 port 58732<br />
[  5]  0.0-10.0 sec    916 MBytes    768 Mbits/sec<br />
</code></p>
<p>As you can see, just enabling jumbo frames produces a raw throughput increase of 17.43%. Nothing to sneeze at.</p>
<p>At this point I tried enabling flow control on the catalyst switch (it is already enabled for both send and receive by default in the e1000 driver) but it did not have any effect on iperf numbers. I turned it back off for now.</p>
<p>So now we set up a 20GB LVM volume on the target and export it using vblade to be mounted on the initiator. We then run a simple dd test to check throughput:</p>
<p><code type="text"><br />
root@node02:~# dd if=/dev/zero of=/mnt/test oflag=direct bs=4M<br />
419+0 records in<br />
419+0 records out<br />
1757413376 bytes (1.8 GB) copied, 133.476 seconds, 13.2 MB/s<br />
</code></p>
<p>CPU load on the target was 10-15% during the dd operation. Now we try writing direct to the (unmounted) block device to rule out any performance penalties of the filesystem itself&#8230;</p>
<p><code type="text"><br />
root@node02:~# dd if=/dev/zero of=/dev/etherd/e0.1 oflag=direct bs=4M<br />
513+0 records in<br />
512+0 records out<br />
2147483648 bytes (2.1 GB) copied, 170.991 seconds, 12.6 MB/s<br />
</code></p>
<p>CPU usage was slightly higher in that test, running 15-20%. So some slight difference but nothing to be too concerned about.</p>
<p>Now we take that same LVM device and share it via iSCSI for the same dd tests:</p>
<p><code type="text"><br />
ladmin@node02:~$ dd if=/dev/zero of=/mnt/test oflag=direct bs=4M<br />
462+0 records in<br />
461+0 records out<br />
1933574144 bytes (1.9 GB) copied, 38.2375 seconds, 50.6 MB/s<br />
</code></p>
<p>CPU load was 6-8% during that test. We also run that same test with flow control enabled at the switch:</p>
<p><code type="text"><br />
ladmin@node02:~$ dd if=/dev/zero of=/mnt/test oflag=direct bs=4M<br />
463+0 records in<br />
462+0 records out<br />
1937768448 bytes (1.9 GB) copied, 38.1851 seconds, 50.7 MB/s<br />
</code></p>
<p>Essentially the same&#8230;</p>
<p>Now this raises the question of why AoE is so much slower than iSCSI on an essentially default install of Debian Etch. To AoE&#8217;s credit, many people report getting just as good (50MB/s or better) of performance from AoE on their systems as I&#8217;m seeing with iSCSI. I spent quite a large amount of time playing with flow control, kernel ring buffer values, filesystem options, etc. and was unable to determine why performance is so terrible for me. I did find a pretty high number (half a dozen at least) of recent posts to the AoE mailing list by other people having essentially identical problems so I&#8217;m certainly not alone. In the interest of completing my testing, I&#8217;ve decided to move forward with iSCSI.</p>
<p>Now we try reformatting with the stride option to mkfs:</p>
<p><code type="text"><br />
mkfs.ext3 -E stride=16<br />
</code></p>
<p>The results of several more tests are shown here&#8230;</p>
<p><code type="text"><br />
root@node02:~# dd if=/dev/zero of=/mnt/test oflag=direct bs=4M<br />
2038431744 bytes (2.0 GB) copied, 41.8938 seconds, 48.7 MB/s<br />
2038431744 bytes (2.0 GB) copied, 42.2633 seconds, 48.2 MB/s<br />
2038431744 bytes (2.0 GB) copied, 41.3756 seconds, 49.3 MB/s<br />
</code></p>
<p>So we don&#8217;t see any appreciable difference when using a combination of the stride= option and flow control, at least with a simple dd test.</p>
<p>Next we turn flow control back off, and reformat again without the stride= option. We are now back to our baseline setup for a new test with bonnie++.</p>
<p><code type="text"><br />
ladmin@node02:~$ /usr/sbin/bonnie++ -d /mnt -s 4096Mb -n 10 -x 5 -q<br />
</code></p>
<p>This test produced block writes of about 82MB/s and block reads of about 37MB/s. The cause for the difference in write speed between the dd and bonnie++ tests is still unclear to me. There also appears to be a known issue where writes are much faster than reads which is apparently due to interrupt handling. This is further evidenced by running a quick dd test that does a read instead of a write:</p>
<p><code type="text"><br />
ladmin@node02:~$ dd if=/mnt/test of=/dev/null bs=4M<br />
3602907136 bytes (3.6 GB) copied, 96.2053 seconds, 37.5 MB/s<br />
3602907136 bytes (3.6 GB) copied, 90.5524 seconds, 39.8 MB/s<br />
3602907136 bytes (3.6 GB) copied, 90.0425 seconds, 40.0 MB/s<br />
3602907136 bytes (3.6 GB) copied, 88.5708 seconds, 40.7 MB/s<br />
</code></p>
<p>As you can see, read operations are about 20% slower than write operations which goes against common thinking with regard to stripped disk arrays.</p>
<p>So there you have it. In my particular situation, with no tuning/optimizing done, iSCSI performs much better than AoE. Even in the event that I were to go to the trouble to performance tune AoE and get it as good as, or even better than, iSCSI I would still be inclined to standardize around iSCSI. Authentication, routing, NAT, etc. can all be done very easily on iSCSI protocol with all the standard TCP/IP tools that are out there. For me that&#8217;s a pretty big advantage.</p>
<p>Next up will be our final piece of the puzzle, left over from the initial system setup &#8211; getting hot swap working with the sata_mv module!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelchaos.net/2008/04/16/coraid-odyssey-part-5-aoe-vs-iscsi/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Coraid Odyssey: Part 4 (ethernet bonding)</title>
		<link>http://www.pixelchaos.net/2008/04/10/coraid-oddyssey-part-4/</link>
		<comments>http://www.pixelchaos.net/2008/04/10/coraid-oddyssey-part-4/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 14:13:30 +0000</pubDate>
		<dc:creator>jcl</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[IOS]]></category>

		<guid isPermaLink="false">http://www.pixelchaos.net/?p=50</guid>
		<description><![CDATA[On the plate today is getting ethernet interface bonding working to provide load balancing and failover on the dual onboard gigabit interfaces on our home-built Coraid. This actually turns out to be much easier than expected&#8230; The first thing we need to do is install the ifenslave utility: root@stor01:~# apt-get install ifenslave Reading package lists... [...]]]></description>
			<content:encoded><![CDATA[<p>On the plate today is getting ethernet interface bonding working to provide load balancing and failover on the dual onboard gigabit interfaces on our home-built Coraid.</p>
<p>This actually turns out to be much easier than expected&#8230;</p>
<p><span id="more-50"></span><br />
The first thing we need to do is install the ifenslave utility:</p>
<p><code type="text"><br />
root@stor01:~# apt-get install ifenslave<br />
Reading package lists... Done<br />
Building dependency tree... Done<br />
The following extra packages will be installed:<br />
ifenslave-2.6<br />
The following NEW packages will be installed:<br />
ifenslave ifenslave-2.6<br />
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.<br />
Need to get 12.4kB of archives.<br />
After unpacking 57.3kB of additional disk space will be used.<br />
Do you want to continue [Y/n]?<br />
</code></p>
<p>Now we create /etc/modprobe.d/bonding and add to it:</p>
<p><code type="text"><br />
alias bond0 bonding<br />
options bonding mode=802.3ad miimon=100 downdelay=200 updelay=200<br />
</code></p>
<p>Once that file is created, run &#8220;update-modules&#8221; to, well, update our module parameters. Of special note is the mode parameter. It tells the ethernet bonding modules to use 802.3ad bonding mode, which is supported by my Cisco Catalyst 2900 series gigabit switch.</p>
<p>Now add a new bond0 interface to /etc/network/interfaces (removing all the &#8220;slave&#8221; interfaces from that file at the same time):</p>
<p><code style="text"><br />
auto bond0<br />
iface bond0 inet static<br />
        address 192.168.1.4<br />
        netmask 255.255.255.0<br />
        network 192.168.1.0<br />
        broadcast 192.168.1.255<br />
        gateway 192.168.1.1<br />
        # dns-* options are implemented by the resolvconf package, if installed<br />
        dns-nameservers 192.168.1.254<br />
        dns-search pixelchaos.net<br />
        up /sbin/ifenslave bond0 eth0<br />
        up /sbin/ifenslave bond0 eth1<br />
</code></p>
<p>Thats it! For the sake of simplicity, I just rebooted my server at this point. I&#8217;m of course leaving out the configuration of my Cisco Catalyst 2900 series switch to enable an 802.3ad etherchannel on the two ports we are plugged in to.</p>
<p>Next up will be performance testing AoE vs iSCSI&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelchaos.net/2008/04/10/coraid-oddyssey-part-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clear a Cisco 1605 router password</title>
		<link>http://www.pixelchaos.net/2008/03/02/clear-a-cisco-router-password/</link>
		<comments>http://www.pixelchaos.net/2008/03/02/clear-a-cisco-router-password/#comments</comments>
		<pubDate>Sun, 02 Mar 2008 20:26:26 +0000</pubDate>
		<dc:creator>jcl</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[IOS]]></category>

		<guid isPermaLink="false">http://www.pixelchaos.net/index.php/archives/45</guid>
		<description><![CDATA[I recently had need to wipe the passwords on a Cisco 1605 router and thought I&#8217;d document the process here. It&#8217;s really pretty easy&#8230; Hook the router up via the serial console to ttyS0 of some Linux box. Fire up minicom and connect to /dev/ttyS0 at 9600 bps, 8 data bits, no parity, 1 stop [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had need to wipe the passwords on a Cisco 1605 router and thought I&#8217;d document the process here. It&#8217;s really pretty easy&#8230;</p>
<p><span id="more-45"></span></p>
<ol>
<li>Hook the router up via the serial console to ttyS0 of some Linux box.</li>
<li>Fire up minicom and connect to /dev/ttyS0 at 9600 bps, 8 data bits, no parity, 1 stop bit.</li>
<li>Power cycle the router.</li>
<li>Within 60 seconds of powering it up, send a BREAK signal to it.</li>
<li>The router will drop you into the rom monitor with a &#8220;rommon 1 &gt; &#8221; prompt.</li>
<li>Type &#8216;confreg&#8217; to enter the configuration register utility. You will be asked a series of questions. Answer no to all questions except;<br />
do you wish to change the configuration? y/n  [n]: y<br />
enable  &#8220;ignore system config info&#8221;? y/n  [n]: y<br />
change the boot characteristics? y/n  [n]: y<br />
enter to boot: 2<br />
do you wish to change the configuration? y/n  [n]: n</li>
<li>Power cycle the router.</li>
<li>Would you like to enter the initial configuration dialog? [yes/no]: no</li>
<li>At the &#8220;Router&gt;&#8221; prompt, type `enable` to enter privileged mode.</li>
<li>Type `configure memory` to copy the configuration file from NVRAM into RAM.</li>
<li>Type `configure terminal` command to enter configuration mode.</li>
<li>Type`no enable password` and `no enable secret` to clear both of those passwords.</li>
<li>Type `line 0` (thats a zero) then `no password` to clear the console port password.</li>
<li>Press &lt;control-z&gt; to exit configuration mode.</li>
<li>Type `copy running-config startup-config`.</li>
<li>Destination filename [startup-config]? startup-config</li>
<li>Power cycle the router.</li>
<li>Would you like to enter the initial configuration dialog? [yes/no]: no</li>
<li>Type `enable`.</li>
<li>Type `configure terminal`.</li>
<li>Type `config-register 0&#215;2102`.</li>
<li>Press &lt;control-z&gt;.</li>
<li>Type `write`.</li>
<li>Power cycle the router.</li>
</ol>
<p>That should  be it. Your router is back to a default state. You can now restore its config from a backup or do whatever else you like.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelchaos.net/2008/03/02/clear-a-cisco-router-password/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

