From: "Pasi Kärkkäinen" <pasik@iki.fi>
To: Tracy Reed <treed@ultraviolet.org>,
xen-devel@lists.xensource.com,
Aoetools-discuss@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [Xen-devel] domU is causing misaligned disk writes
Date: Tue, 20 Apr 2010 22:54:42 +0300 [thread overview]
Message-ID: <20100420195442.GC1878@reaktio.net> (raw)
In-Reply-To: <20100420193952.GP5660@tracyreed.org>
On Tue, Apr 20, 2010 at 12:39:52PM -0700, Tracy Reed wrote:
> On Tue, Apr 20, 2010 at 11:49:55AM +0300, Pasi Kärkkäinen spake thusly:
> > Please paste your domU partition table:
> > sfdisk -d /dev/xvda
>
> I have tried many different things including dd straight to the raw
> unpartitioned device. That should not be affected by
> partitioning/lvm/filesystem problems right?
>
Yeah, partitioning doesn't affect when you use the straight/raw disk device.
> > Are you using filesystems on normal partitions, or LVM in the domU?
> > I'm pretty sure this is a domU partitioning problem.
>
> I have done all of the above. Here I am an xvdg device in my domU to
> which I am directly doing a dd to, no partitioning or anything:
>
> # dd if=/dev/zero of=/dev/xvdg bs=4096 count=3000000
> 3000000+0 records in
> 3000000+0 records out
> 12288000000 bytes (12 GB) copied, 449.109 seconds, 27.4 MB/s
>
Please try with "bs=1024k" and maybe with "bs=64k" aswell.
4k blocksize transfer will always be slower in domU than in dom0
since virtual disk abstraction makes some overhead, which is more
visible with small blocksizes.
> # /sbin/sfdisk -d /dev/xvdg
>
> sfdisk: ERROR: sector 0 does not have an msdos signature
> /dev/xvdg: unrecognized partition table type
> No partitions found
>
> and running iostat on the target shows the following:
>
> Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
> sda 0.00 3474.60 1070.60 46.40 4311.20 13680.00 32.21 2.08 1.83 0.49 54.32
> sdb 0.00 3376.00 1060.20 45.60 4289.60 13686.40 32.51 2.46 2.23 0.53 58.12
>
> Or I can partition it with a geometry of 248 heads and 56 sectors
> which is a multiple of 8 which should avoid the misalignment due to
> the extra partition table (there is a partition on the physical disk
> on the target already then I create a logical volume to export to the
> initiator which then puts its own partition in it which causes
> misalignment):
>
> dd if=/dev/zero of=/dev/xvdg1 bs=4096 count=3000000
> 3000000+0 records in
> 3000000+0 records out
> 12288000000 bytes (12 GB) copied, 445.338 seconds, 27.6 MB/s
>
So the speed is the same to the partitioned disk than to the raw disk?
What disk backend are you using in dom0? phy:? tap:aio: ?
> # /sbin/sfdisk -d /dev/xvdg
> # partition table of /dev/xvdg
> unit: sectors
>
> /dev/xvdg1 : start= 56, size=566227592, Id=8e
> /dev/xvdg2 : start= 0, size= 0, Id= 0
> /dev/xvdg3 : start= 0, size= 0, Id= 0
> /dev/xvdg4 : start= 0, size= 0, Id= 0
>
> Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
> sda 0.00 3472.20 1188.20 51.00 4805.60 14097.60 30.51 2.71 2.13 0.52 64.02
> sdb 0.00 3472.40 1187.00 52.00 4784.00 14092.80 30.47 2.82 2.22 0.56 68.80
>
> Or I can take a standard partition geometry and set it to start at 64
> instead of 63 like so many RAID alignment pages talk about:
>
> It is taking even longer this time and I am tired of waiting for dd
> before sending off this email but suffice it to say it is painfully
> slow.
>
You can cancel dd and it'll print the stats so far.
-- Pasi
WARNING: multiple messages have this Message-ID (diff)
From: "Pasi Kärkkäinen" <pasik@iki.fi>
To: Tracy Reed <treed@ultraviolet.org>,
xen-devel@lists.xensource.com,
Aoetools-discuss@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: domU is causing misaligned disk writes
Date: Tue, 20 Apr 2010 22:54:42 +0300 [thread overview]
Message-ID: <20100420195442.GC1878@reaktio.net> (raw)
In-Reply-To: <20100420193952.GP5660@tracyreed.org>
On Tue, Apr 20, 2010 at 12:39:52PM -0700, Tracy Reed wrote:
> On Tue, Apr 20, 2010 at 11:49:55AM +0300, Pasi Kärkkäinen spake thusly:
> > Please paste your domU partition table:
> > sfdisk -d /dev/xvda
>
> I have tried many different things including dd straight to the raw
> unpartitioned device. That should not be affected by
> partitioning/lvm/filesystem problems right?
>
Yeah, partitioning doesn't affect when you use the straight/raw disk device.
> > Are you using filesystems on normal partitions, or LVM in the domU?
> > I'm pretty sure this is a domU partitioning problem.
>
> I have done all of the above. Here I am an xvdg device in my domU to
> which I am directly doing a dd to, no partitioning or anything:
>
> # dd if=/dev/zero of=/dev/xvdg bs=4096 count=3000000
> 3000000+0 records in
> 3000000+0 records out
> 12288000000 bytes (12 GB) copied, 449.109 seconds, 27.4 MB/s
>
Please try with "bs=1024k" and maybe with "bs=64k" aswell.
4k blocksize transfer will always be slower in domU than in dom0
since virtual disk abstraction makes some overhead, which is more
visible with small blocksizes.
> # /sbin/sfdisk -d /dev/xvdg
>
> sfdisk: ERROR: sector 0 does not have an msdos signature
> /dev/xvdg: unrecognized partition table type
> No partitions found
>
> and running iostat on the target shows the following:
>
> Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
> sda 0.00 3474.60 1070.60 46.40 4311.20 13680.00 32.21 2.08 1.83 0.49 54.32
> sdb 0.00 3376.00 1060.20 45.60 4289.60 13686.40 32.51 2.46 2.23 0.53 58.12
>
> Or I can partition it with a geometry of 248 heads and 56 sectors
> which is a multiple of 8 which should avoid the misalignment due to
> the extra partition table (there is a partition on the physical disk
> on the target already then I create a logical volume to export to the
> initiator which then puts its own partition in it which causes
> misalignment):
>
> dd if=/dev/zero of=/dev/xvdg1 bs=4096 count=3000000
> 3000000+0 records in
> 3000000+0 records out
> 12288000000 bytes (12 GB) copied, 445.338 seconds, 27.6 MB/s
>
So the speed is the same to the partitioned disk than to the raw disk?
What disk backend are you using in dom0? phy:? tap:aio: ?
> # /sbin/sfdisk -d /dev/xvdg
> # partition table of /dev/xvdg
> unit: sectors
>
> /dev/xvdg1 : start= 56, size=566227592, Id=8e
> /dev/xvdg2 : start= 0, size= 0, Id= 0
> /dev/xvdg3 : start= 0, size= 0, Id= 0
> /dev/xvdg4 : start= 0, size= 0, Id= 0
>
> Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
> sda 0.00 3472.20 1188.20 51.00 4805.60 14097.60 30.51 2.71 2.13 0.52 64.02
> sdb 0.00 3472.40 1187.00 52.00 4784.00 14092.80 30.47 2.82 2.22 0.56 68.80
>
> Or I can take a standard partition geometry and set it to start at 64
> instead of 63 like so many RAID alignment pages talk about:
>
> It is taking even longer this time and I am tired of waiting for dd
> before sending off this email but suffice it to say it is painfully
> slow.
>
You can cancel dd and it'll print the stats so far.
-- Pasi
next prev parent reply other threads:[~2010-04-20 19:54 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-20 8:09 domU is causing misaligned disk writes Tracy Reed
2010-04-20 8:09 ` Tracy Reed
2010-04-20 8:49 ` [Xen-devel] " Pasi Kärkkäinen
2010-04-20 8:49 ` Pasi Kärkkäinen
2010-04-20 8:54 ` [Xen-devel] " Pasi Kärkkäinen
2010-04-20 8:54 ` Pasi Kärkkäinen
2010-04-20 18:40 ` [LKML] " Konrad Rzeszutek Wilk
2010-04-20 22:58 ` [LKML] Re: [Xen-devel] " Tracy Reed
2010-04-20 19:39 ` Tracy Reed
2010-04-20 19:39 ` Tracy Reed
2010-04-20 19:54 ` Pasi Kärkkäinen [this message]
2010-04-20 19:54 ` Pasi Kärkkäinen
2010-04-20 20:03 ` [Xen-devel] " Tracy Reed
2010-04-20 20:00 ` Tracy Reed
2010-04-20 20:25 ` Konrad Rzeszutek Wilk
2010-04-20 21:19 ` Tracy Reed
2010-04-20 21:19 ` Tracy Reed
2010-04-28 19:55 ` [Aoetools-discuss] [Xen-devel] " Gabor Gombas
2010-04-28 19:55 ` Gabor Gombas
2010-04-20 20:41 ` Brendan Cully
2010-04-20 20:41 ` Brendan Cully
2010-04-20 21:58 ` [Xen-devel] " Tracy Reed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100420195442.GC1878@reaktio.net \
--to=pasik@iki.fi \
--cc=Aoetools-discuss@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=treed@ultraviolet.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.