All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com,
	Mark Williamson <mark.williamson@cl.cam.ac.uk>,
	Adam Heath <doogie@brainfood.com>
Subject: Loopback Performance (Was Re: Disk naming)
Date: Fri, 15 Apr 2005 17:11:48 -0500	[thread overview]
Message-ID: <42603C24.8060303@us.ibm.com> (raw)
In-Reply-To: <A95E2296287EAD4EB592B5DEEFCE0E9D1E3BCA@liverpoolst.ad.cl.cam.ac.uk>

Ian Pratt wrote:

>I think I'd prefer not to complicate blkback, unless something's
>fundamentally wrong with the design of the loopback device. Anyone know
>about this? The trick with this kind of thing is avoiding deadlock under
>low memory situations... 
>
I poked through the loopback code and it seems to be doing the 
reasonable thing.  I decided to investigate for myself what the 
performance issues with the loopback device were.  My theory was that 
the real cost was the double inode lookups (looking up the inodes in the 
filesystem on the loopback and then looking up the inodes on the host 
filesystem).

To verify, I ran a series of primitive tests with dd.  First I baselined 
the performance of writing to a large file (by running dd if=/dev/zero 
conv=notrunc) on the host filesystem.  Then I created a loopback device 
with the same file and ran the same tests writing directly to the 
loopback device.

I then created a filesystem on the loopback device, mounted it, then ran 
the same test on a file within the mount.

The results are what I expected.  Writing directly to the loopback 
device was equivalent to writing directly to the file (usually faster 
actually--I attribute that to buffering).  Writing to the file within 
the filesystem on the loopback device was significantly slower (about a 
~70% slowdown).

If my hypothesis is right, that the slowdown is caused by the double 
inode lookups, then I don't think there's anything we could do in the 
blkback drivers to help that.  This is another good reason to use LVM.

This was all pretty primitive so take it with a grain of salt.

Regards,
Anthony Liguori

  reply	other threads:[~2005-04-15 22:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-15 21:44 Disk naming (Was Re: [PATCH] Guest boot loadersupport[1/2]) Ian Pratt
2005-04-15 22:11 ` Anthony Liguori [this message]
2005-04-15 23:29   ` Loopback Performance (Was Re: Disk naming) Mark Williamson
2005-04-16  0:12     ` Anthony Liguori

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=42603C24.8060303@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=doogie@brainfood.com \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=mark.williamson@cl.cam.ac.uk \
    --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.