qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: qemu-devel@nongnu.org
Cc: kvm-devel@lists.sourceforge.net,
	Anthony Liguori <aliguori@us.ibm.com>,
	Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [kvm-devel] [Qemu-devel] Re: [PATCH 1/3] Refactor AIO interface to allow other AIO implementations
Date: Mon, 21 Apr 2008 13:10:29 +0100	[thread overview]
Message-ID: <20080421121028.GD4193@shareable.org> (raw)
In-Reply-To: <480C36A3.6010900@qumranet.com>

Avi Kivity wrote:
> >At such a tiny difference, I'm wondering why Linux-AIO exists at all,
> >as it complicates the kernel rather a lot.  I can see the theoretical
> >appeal, but if performance is so marginal, I'm surprised it's in
> >there.
> 
> Linux aio exists, but that's all that can be said for it.  It works 
> mostly for raw disks, doesn't integrate with networking, and doesn't 
> advance at the same pace as the rest of the kernel.  I believe only 
> databases use it (and a userspace filesystem I wrote some time ago).

And video streaming on some embedded devices with no MMU!  (Due to the
page cache heuristics working poorly with no MMU, sustained reliable
streaming is managed with O_DIRECT and the app managing cache itself
(like a database), and that needs AIO to keep the request queue busy.
At least, that's the theory.)

> >I'm also surprised the Glibc implementation of AIO using ordinary
> >threads is so close to it.  
> 
> Why are you surprised?

Because I've read that Glibc AIO (which uses a thread pool) is a
relatively poor performer as AIO implementations go, and is only there
for API compatibility, not suggested for performance.

But I read that quite a while ago, perhaps it's changed.

> Actually the glibc implementation could be improved from what I've 
> heard.  My estimates are for a thread pool implementation, but there is 
> not reason why glibc couldn't achieve exactly the same performance.

Erm...  I thought you said it _does_ achieve nearly the same
performance, not that it _could_.

Do you mean it could achieve exactly the same performance by using
Linux AIO when possible?

> >And then, I'm wondering why use AIO it
> >all: it suggests QEMU would run about as fast doing synchronous I/O in
> >a few dedicated I/O threads.
> 
> Posix aio is the unix API for this, why not use it?

Because far more host platforms have threads than have POSIX AIO.  (I
suspect both options will end up supported in the end, as dedicated
I/O threads were already suggested for other things.)

> >>Also, I'd presume that those that need 10K IOPS and above will not place 
> >>their high throughput images on a filesystem; rather on a separate SAN 
> >>LUN.
> >
> >Does the separate LUN make any difference?  I thought O_DIRECT on a
> >filesystem was meant to be pretty close to block device performance.
> 
> On a good extent-based filesystem like XFS you will get good performance 
> (though more cpu overhead due to needing to go through additional 
> mapping layers.  Old clunkers like ext3 will require additional seeks or 
> a ton of cache (1 GB per 1 TB).

Hmm.  Thanks.  I may consider switching to XFS now....

-- Jamie

  reply	other threads:[~2008-04-21 12:11 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-17 19:26 [Qemu-devel] [PATCH 1/3] Refactor AIO interface to allow other AIO implementations Anthony Liguori
2008-04-17 19:26 ` [Qemu-devel] [PATCH 2/3] Split out posix-aio code Anthony Liguori
2008-04-17 19:26 ` [Qemu-devel] [PATCH 3/3] Implement linux-aio backend Anthony Liguori
2008-04-18 15:09   ` [Qemu-devel] " Marcelo Tosatti
2008-04-18 15:18     ` Anthony Liguori
2008-04-18 17:46       ` Marcelo Tosatti
2008-04-17 19:38 ` [Qemu-devel] Re: [kvm-devel] [PATCH 1/3] Refactor AIO interface to allow other AIO implementations Daniel P. Berrange
2008-04-17 19:41   ` Anthony Liguori
2008-04-17 20:00     ` Daniel P. Berrange
2008-04-17 20:05       ` Anthony Liguori
2008-04-18 12:43       ` Jamie Lokier
2008-04-18 15:23         ` Anthony Liguori
2008-04-18 16:22           ` Jamie Lokier
2008-04-18 16:32           ` [kvm-devel] [Qemu-devel] " Avi Kivity
2008-04-20 15:49             ` Jamie Lokier
2008-04-20 18:43               ` Avi Kivity
2008-04-20 23:39                 ` Jamie Lokier
2008-04-21  6:39                   ` Avi Kivity
2008-04-21 12:10                     ` Jamie Lokier [this message]
2008-04-22  8:10                       ` Avi Kivity
2008-04-22 14:28                         ` Jamie Lokier
2008-04-22 14:53                           ` Anthony Liguori
2008-04-22 15:05                             ` Avi Kivity
2008-04-22 15:23                               ` Jamie Lokier
2008-04-22 15:12                             ` Jamie Lokier
2008-04-22 15:03                           ` Avi Kivity
2008-04-22 15:36                             ` Jamie Lokier
2008-05-02 16:37                               ` Antonio Vargas
2008-05-02 17:18                                 ` Jamie Lokier
2008-05-02 17:52                                   ` Anthony Liguori
2008-05-02 18:24                                     ` Jamie Lokier

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=20080421121028.GD4193@shareable.org \
    --to=jamie@shareable.org \
    --cc=aliguori@us.ibm.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).