From: Anthony Liguori <anthony@codemonkey.ws>
To: Ryo Tsuruta <ryov@valinux.co.jp>
Cc: kvm-devel@lists.sourceforge.net, dm-devel@redhat.com,
virtualization@lists.linux-foundation.org
Subject: Re: [kvm-devel] I/O bandwidth control on KVM
Date: Thu, 06 Mar 2008 10:05:59 -0600 [thread overview]
Message-ID: <47D01667.10809@codemonkey.ws> (raw)
In-Reply-To: <20080306.212305.104034101.ryov@valinux.co.jp>
Ryo Tsuruta wrote:
> Hi Anthony.
>
>
>> The attached patch implements AIO support for the virtio backend so if this is the case, you should see the proper proportions.
>>
>
> First, thank you very much for making the patch.
> I ran the same test program on KVM with the patch but I wasn't able to
> get good results.
> I checked the dm-ioband log, the I/Os didn't seem to be issued simultaneously.
>
There's an aio_init in block-raw-posix.c that sets the thread count to
1. If you #if 0 out that block, or increase the threads to something
higher (like 16), you should see multiple simultaneous requests. Sorry
about that, I had that in a different patch in my tree.
> It looked like the next I/O was blocked until the previous I/O was completed.
>
> The number of issued I/Os for 60 seconds
> --------------------------------------------------------------------
> | device | sda11 | sda12 |
> | weight setting | 80% | 20% |
> |-----------+----------------+-------------------+-------------------|
> | KVM AIO | I/Os | 4596 | 4728 |
> | | ratio to total | 49.3% | 50.7% |
> |-----------+----------------+-------------------+-------------------|
> | KVM | I/Os | 5217 | 5623 |
> | | ratio to total | 48.1% | 51.9% |
> --------------------------------------------------------------------
>
> Here is an another test result, which is very interesting.
> I/Os were issued from a KVM virtual machine and from the host machine
> simultaneously.
>
>
> The number of issued I/Os for 60 seconds
> --------------------------------------------------------
> | issue from | Virtual Machine | Host Machine |
> | device | sda11 | sda12 |
> | weight setting | 80% | 20% |
> |----------------+-------------------+-------------------|
> | I/Os | 191 | 9466 |
> | ratio to total | 2.0% | 98.0% |
> --------------------------------------------------------
>
> The most I/Os that were processed were the I/Os issued by the host machine.
> There might exist another bottleneck somewhere as well.
>
The virtio block backend isn't quite optimal right now. I have some
patches (that are currently suffering bitrot) that switch over to
linux-aio which allows zero-copy and for proper barrier support (so the
guest block device will use an ordered queue). The QEMU aio
infrastructure makes it tough to integrate it properly though.
Regards,
Anthony Liguori
> Here is a block diagram representing the test.
>
> +---------------------------+
> | Virtual Machine |
> | |
> | Read/Write with O_DIRECT | +--------------------------+
> | process x 128 | | Host Machine |
> | | | | |
> | V | | Read/Write with O_DIRECT |
> | /dev/vda1 | | process x 128 |
> +-------------|-------------+ +-------------|------------+
> +-------------V---------------------------------V------------+
> | /dev/mapper/ioband1 | /dev/mapper/ioband2 |
> | 80% weight | 20% weight |
> | | |
> | Control I/O bandwidth according to the weights |
> +-------------|---------------------------------|------------+
> +-------------V-------------+ +-------------|------------+
> | /dev/sda11 | | /dev/sda12 |
> +---------------------------+ +--------------------------+
>
> Thanks,
> Ryo Tsuruta
>
next prev parent reply other threads:[~2008-03-06 16:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080229.210531.226799765.ryov__28298.7898834564$1204287044$gmane$org@valinux.co.jp>
2008-03-02 4:18 ` I/O bandwidth control on KVM Anthony Liguori
2008-03-02 16:45 ` Avi Kivity
2008-03-02 18:08 ` Anthony Liguori
2008-03-04 6:41 ` Ryo Tsuruta
2008-03-05 15:53 ` [kvm-devel] " Ryo Tsuruta
2008-03-05 16:30 ` Anthony Liguori
2008-03-06 12:23 ` Ryo Tsuruta
2008-03-06 16:05 ` Anthony Liguori [this message]
2008-03-10 12:05 ` Ryo Tsuruta
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=47D01667.10809@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=dm-devel@redhat.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=ryov@valinux.co.jp \
--cc=virtualization@lists.linux-foundation.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