<?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>Linuxdisk i/o | Linux</title>
	<atom:link href="http://linux.sjolshagen.net/tag/disk-io/feed/" rel="self" type="application/rss+xml" />
	<link>http://linux.sjolshagen.net</link>
	<description>Linux for Businesses</description>
	<lastBuildDate>Wed, 01 Feb 2012 17:33:51 +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>Is your network playing nice?</title>
		<link>http://linux.sjolshagen.net/2010/08/27/is-your-network-playing-nice/</link>
		<comments>http://linux.sjolshagen.net/2010/08/27/is-your-network-playing-nice/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 11:08:12 +0000</pubDate>
		<dc:creator>Thomas S</dc:creator>
				<category><![CDATA[EqualLogic]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mission Critical Computing]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[bonding]]></category>
		<category><![CDATA[disk i/o]]></category>
		<category><![CDATA[dm-multipath]]></category>
		<category><![CDATA[equallogic]]></category>
		<category><![CDATA[half the expected performance]]></category>
		<category><![CDATA[infrastructure]]></category>
		<category><![CDATA[iscsi]]></category>
		<category><![CDATA[iscsi-initiator-utils]]></category>
		<category><![CDATA[multipath]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[RHEL 5.4]]></category>

		<guid isPermaLink="false">http://linux.sjolshagen.net/?p=477</guid>
		<description><![CDATA[Get stuck with odd performance in your iSCSI SAN? Try the obvious!]]></description>
			<content:encoded><![CDATA[<p>The other day I was working for a couple of hours with a colleague on trying to figure out why, regardless of what we did in terms of multipath configuration (bonded IP network+multiple virtual openiscsi initiator ports per bond + dm-multipath or multiple NICs on the same subnet + one openiscsi initiator per physical nic + dm-multipath), we were unable to get more than  between 110 &amp; 125MB/sec of throughput from our RHEL 5.4 host to our EqualLogic iSCSI SAN volumes.The expectation was to see more than 200MB/sec throughput but of course, we were essentially seeing about 1 paths&#8217; worth of throughput. <span id="more-477"></span></p>
<p>We tried everything. Different bonding algorithms (balanced-alb, 802.3ad, balanced-rr, etc), different IO testing tools, different network configurations, messing with the rr_io_min settings, tuning the network stack itself (increasing read/write buffer sizes) and then we got desperate and changed the IO schedulers (For the record: I consider that &#8220;an act of desperation&#8221; since I would never expect an IO scheduler change to give us a 100% increase).</p>
<p>Since we didn&#8217;t configure the physical aspects of the network and we&#8217;re playing with equipment hosted in a rather large and very established Lab SAN, it took me a while to think of and accept that it might be a physical problem and not a host configuration one. It was probably about time to walk to the switches and get a visual on the port status for the host links, the Controller port lights and any ISLs or (if present) stacking links.</p>
<p>Guess what&#8230; the ISL between the switch connected to the test host and the switch connected to the EqualLogic group was operating at 1/2 its intended capacity.</p>
<p>&#8220;Mystery&#8221; solved.</p>
<p>You know, sometimes the blinking lights are the most important troubleshooting tool. Sometimes, the color of the blinking lights are the difference between wasting 3 hours and not. And, sometimes, a person with more than 10 years experience designing, configuring and reviewing SANs in mission critical environments can be reminded &#8211; in very embarrassing ways &#8211; that you should always verify the physical aspects of the configuration first and that simple is more often than not better than the alternative(s). Even if the simple approach includes a hike, a flight of stairs and entering into the noisy data center.</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.sjolshagen.net/2010/08/27/is-your-network-playing-nice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KVM/Qemu and caching of I/O</title>
		<link>http://linux.sjolshagen.net/2010/01/10/kvmqemu-and-caching-of-io/</link>
		<comments>http://linux.sjolshagen.net/2010/01/10/kvmqemu-and-caching-of-io/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 15:00:36 +0000</pubDate>
		<dc:creator>Thomas S</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[disk i/o]]></category>
		<category><![CDATA[KVM]]></category>
		<category><![CDATA[libvirt]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://linux.sjolshagen.net/?p=97</guid>
		<description><![CDATA[A feeble(ish) attempt at documenting the 'cache' properties for the Kernel Virtual Machine when managed by libvirtd.]]></description>
			<content:encoded><![CDATA[<p>I like to live &#8220;on the edge&#8221;. At least technologically speaking.</p>
<p>As a consequence, in my environment, I&#8217;ve got a couple of KVM guests that are running Fedora 12 with Red Hat Cluster v3.0.6 installed. That&#8217;s not really &#8220;living on the edge&#8221;. The &#8220;living on the edge&#8221; part of that configuration is that the two guests share a clustered file system. This clustered file system is hosted on a DRDB replicated volume between two standard internal SATA drives hosted on two different KVM host systems. And these host systems are, in turn their own Fedora 12 based Red Hat Cluster.</p>
<p>Obviously, there are plenty of opportunities for data to go &#8220;missing&#8221; (get corrupted/get lost/disappear/etc) in a configuration like this. And I thought I&#8217;d been able to eliminate them all.</p>
<p>That was what I thought, until I ran one of the KVM guests on one of the hosts, and the other on the other. My GFS2 file system wasn&#8217;t impressed! And I was stumped. DRBD had been configured with synchronous replication (let&#8217;s not talk about the performance impact of that decision, shall we&#8230;?) but obviously the data wasn&#8217;t being committed simultaneously to both drives<sup>[1]</sup>.</p>
<p>I now suspect that&#8217;s happening because the KVM hosts were caching the data on the guests behalf. Could be a very spiffy performance boost<sup>[2]</sup> but causes all sorts of problems for my clustered applications that rely on the data in the file system being where it&#8217;s supposed to be.</p>
<p>So, I had to dig around a little and discovered  that Qemu/KVM/libvirt actually supports setting the caching properties for the &#8216;physical&#8217; devices backing its virtual hard drives (i.e. the hard drives or container files exported to the guest as &#8220;disks&#8221;). And it&#8217;s &#8211; if you&#8217;re using the CLI interfaces for managing KVM, libvirtd &amp; virsh &#8211; fairly easy to set it to what you want/need it to be.</p>
<p>The caching properties you can set are:</p>
<ul>
<li>writeback</li>
<li>writethrough</li>
<li>none</li>
<li>default</li>
</ul>
<p>Unfortunately, I&#8217;ve not been able to locate some way to set this while creating the guest with virt-manager. However, virt-install does let you set it, and if the guest is inactive (i.e. not running), you can set it by editing the &lt;driver&gt; tag.</p>
<p>For example:</p>
<blockquote>
<pre>&lt;disk type='block' device='disk'&gt;
   &lt;driver name='qemu' cache='none'/&gt;
   &lt;source dev='/dev/mapper/sharedVG01-www--local'/&gt;
   &lt;target dev='vde' bus='virtio'/&gt;
&lt;/disk&gt;</pre>
</blockquote>
<div><span style="color: #800000;">NOTE: </span><span style="color: #000080;">Early versions of libvirtd may </span><strong><em><span style="color: #000080;">not</span></em><span style="font-weight: normal;"><span style="color: #000080;"> support the &lt;driver cache=&#8221;&gt; nomenclature.</span> I&#8217;m using 0.7.5 in my environment, but I believe any recent (0.7 and later, for sure) of libvirtd include support for this. To check your libvirt version, issue the command:</span></strong></div>
<blockquote>
<pre># virsh version</pre>
</blockquote>
<pre></pre>
<h3>Apropos:</h3>
<pre></pre>
<p>[1] = I know, I know. A DRBD mirror set up to use &#8220;protocol C&#8221; doesn&#8217;t, technically, commit the data simultaneously to both devices. It only &#8220;looks&#8221; like that because the write() operation does not return success until the data has been successfully written on the &#8220;remote&#8221; device as well as the local one.</p>
<p>[2] = It is, actually. As an example, the reason why the likes of Xen, KVM, etc have been able to post IO benchmarks that are more than 100% the performance of the underlying hardware is because the host environment caches the data on the guests behalf. Looks good on benchmarks. Not so much if your host fails before the data have been flushed from the host cache onto the physical disk devices. Applications tend to get cranky when data they &#8220;know&#8221; was committed to persistent storage is missing&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.sjolshagen.net/2010/01/10/kvmqemu-and-caching-of-io/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

