qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ryan Harper <ryanh@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com, kvm@vger.kernel.org
Subject: [Qemu-devel] [PATCH 0/3] Refactor AIO to allow multiple AIO implementations
Date: Mon, 22 Sep 2008 18:17:31 -0500	[thread overview]
Message-ID: <1222125454-21744-1-git-send-email-ryanh@us.ibm.com> (raw)

The patchset adds additional AIO driver abstraction to the block raw driver to
support multiple aio implementations for each device.  The first patch pulls
the posix aio implementation out of the block-raw device using a generic call
to the newly created AIO Driver structure.  The posix aio implementation that
was contained in block-raw-posix.c has been refactored in to aio-posix.c.  The
next patch adds a linux aio implementation for raw devices being opened
O_DIRECT via cache=off drive option.  We only use linux aio when cache=off as
linux aio falls back to synchronous ops if not opened with O_DIRECT flag.

Addtional work has been done on top of QEMU for KVM and virtio-blk devices.
While virtio-blk is not yet upstream in QEMU, the AIO changes here provide a
tremendous performance improvement (from 7.6% of native, to 100% of randwrite,
and 3.9% of native, to 101.4% of native for seq write) for virtio
devices with cache=off.

Storage subsystem:
  IBM EXP300 - 14 Disk Fiber Expansion, 17G - 15K RPMS
  Host: AMD Barcelona, 2 socket, 8G RAM
  HBA: QLogic Corp. ISP2312-based 2Gb Fibre Channel to PCI-X HBA (rev 02)

Benchmark[1]:
           fio --name=guestrun --filename=/dev/mapper/volumes-fibre \
               --rw=randwrite --bs=16k --ioengine=libaio --direct=1 \
               --norandommap --runtime=120 --time_based --numjobs=1 \
               --group_reporting --thread --size=25g --write_lat_log \
               --write_bw_log --iodepth=74

Qemu parameters:
 -m 1024 \
 -drive file=/images/npt2-guest-virtio.qcow2,if=ide,boot=on,snapshot=off \
 -drive file=/dev/mapper/volumes-fibre,if=virtio,cache=(on|off) \
 -drive file=/dev/mapper/volumes-npt2--dom1,if=virtio,cache=off
 -net nic,macaddr=00:FF:FF:00:00:01,model=rtl8139 -net tap -vnc :123 \
 -monitor stdio

Guest io scheduler: noop

Results:
 These results are with the patch series applied to KVM (plus a small KVM only
 change -- KVM patches forthcoming).


 16k randwrite 1 thread, 74 iodepth | MB/s | avg sub lat (us) | avg comp lat (ms)
 ---------------------------------------+---------------------+------------------
 baremetal (O_DIRECT, aka cache=off)| 61.2 |   13.07          |  19.59
 kvm: cache=off posix-aio w/o patch |  4.7 | 3467.44          | 254.08
 kvm: cache=off linux-aio           | 61.1 |   75.35          |  19.57
 kvm: cache=on  posix-aio w/o patch |127.0 |  115.78          |   9.19
 kvm: cache=on  posix-aio w/ patch  |126.0 |   67.35          |   9.30


 16k write 1 thread, 74 iodepth     | MB/s | avg sub lat (us) | avg comp lat (ms)
 ---------------------------------------+---------------------+------------------
 baremetal (O_DIRECT, aka cache=off)|128.1 |   10.90          |   9.45
 kvm: cache=off posix-aio w/o patch |  5.1 | 3152.00          | 231.06 
 kvm: cache=off linux-aio           |130.0 |   83.83          |   8.99
 kvm: cache=on  posix-aio w/o patch |184.0 |   80.46          |   6.35
 kvm: cache=on  posix-aio w/ patch  |165.0 |   70.90          |   7.09


1. http://brick.kernel.dk/snaps/fio-1.21.tar.bz2

             reply	other threads:[~2008-09-22 23:18 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-22 23:17 Ryan Harper [this message]
2008-09-22 23:17 ` [Qemu-devel] [PATCH 1/3] Only call aio flush handler if set Ryan Harper
2008-09-23  2:38   ` [Qemu-devel] " Anthony Liguori
2008-09-23 14:26     ` Ryan Harper
2008-09-23 14:34       ` Anthony Liguori
2008-09-23 14:41         ` Ryan Harper
2008-09-23 14:50           ` Anthony Liguori
2008-09-22 23:17 ` [Qemu-devel] [PATCH 2/3] Move aio implementation out of raw block driver Ryan Harper
2008-09-23  1:16   ` [Qemu-devel] " Ryan Harper
2008-09-23  2:45   ` Anthony Liguori
2008-09-23 14:39     ` Ryan Harper
2008-09-23 14:40       ` Anthony Liguori
2008-09-23 14:53       ` Gerd Hoffmann
2008-09-23 16:06         ` Anthony Liguori
2008-09-23 18:04           ` Gerd Hoffmann
2008-09-23 18:28             ` Anthony Liguori
2008-09-24 22:31     ` Marcelo Tosatti
2008-09-22 23:17 ` [Qemu-devel] " Ryan Harper
2008-09-23  1:22   ` [Qemu-devel] [PATCH 3/3] Add linux aio implementation for raw block devices Ryan Harper
2008-09-23  3:32 ` [Qemu-devel] Re: [PATCH 0/3] Refactor AIO to allow multiple AIO implementations Anthony Liguori
2008-09-23 14:43   ` Ryan Harper
2008-09-23 14:47     ` Anthony Liguori
2008-09-23 16:09     ` Anthony Liguori
2008-09-23 10:27 ` [Qemu-devel] " Jamie Lokier
2008-10-02 22:41 ` [Qemu-devel] " john cooper
2008-10-03 13:33   ` Ryan Harper

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=1222125454-21744-1-git-send-email-ryanh@us.ibm.com \
    --to=ryanh@us.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=kvm@vger.kernel.org \
    --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).