From: Vivek Goyal <vgoyal@redhat.com>
To: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Cc: axboe@kernel.dk, takuya.yoshikawa@gmail.com,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] CFQ I/O starvation problem triggered by RHEL6.0 KVM guests
Date: Thu, 8 Sep 2011 09:49:45 -0400 [thread overview]
Message-ID: <20110908134945.GA7024@redhat.com> (raw)
In-Reply-To: <20110908181353.8b3eb66d.yoshikawa.takuya@oss.ntt.co.jp>
On Thu, Sep 08, 2011 at 06:13:53PM +0900, Takuya Yoshikawa wrote:
> This is a report of strange cfq behaviour which seems to be triggered by
> QEMU posix aio threads.
>
> Host environment:
> OS: RHEL6.0 KVM/qemu-kvm (with no patch applied)
> IO scheduler: cfq (with the default parameters)
So you are using both RHEL 6.0 in both host and guest kernel? Can you
reproduce the same issue with upstream kernels? How easily/frequently
you can reproduce this with RHEL6.0 host.
>
> On the host, we were running 3 linux guests to see if I/O from these guests
> would be handled fairly by host; each guest did dd write with oflag=direct.
>
> Guest virtual disk:
> We used a host local disk which had 3 partitions, and each guest was
> allocated one of these as dd write target.
>
> So our test was for checking if cfq could keep fairness for the 3 guests
> who shared the same disk.
>
> The result (strage starvation):
> Sometimes, one guest dominated cfq for more than 10sec and requests from
> other guests were not handled at all during that time.
>
> Below is the blktrace log which shows that a request to (8,27) in cfq2068S (*1)
> is not handled at all during cfq2095S and cfq2067S which hold requests to
> (8,26) are being handled alternately.
>
> *1) WS 104920578 + 64
>
> Question:
> I guess that cfq_close_cooperator() was being called in an unusual manner.
> If so, do you think that cfq is responsible for keeping fairness for this
> kind of unusual write requests?
- If two guests are doing IO to separate partitions, they should really
not be very close (until and unless partitions are really small).
- Even if there are close cooperators, these queues are merged and they
are treated as single queue from slice point of view. So cooperating
queues should be merged and get a single slice instead of starving
other queues in the system.
Can you upload the blktrace logs somewhere which shows what happened
during that 10 seconds.
>
> Note:
> With RHEL6.1, this problem could not triggered. But I guess that was due to
> QEMU's block layer updates.
You can try reproducing this with fio.
Thanks
Vivek
next prev parent reply other threads:[~2011-09-08 13:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-08 9:13 [Qemu-devel] CFQ I/O starvation problem triggered by RHEL6.0 KVM guests Takuya Yoshikawa
2011-09-08 13:49 ` Vivek Goyal [this message]
2011-09-09 9:00 ` Takuya Yoshikawa
2011-09-09 13:48 ` Stefan Hajnoczi
2011-09-09 14:38 ` Vivek Goyal
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=20110908134945.GA7024@redhat.com \
--to=vgoyal@redhat.com \
--cc=axboe@kernel.dk \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=takuya.yoshikawa@gmail.com \
--cc=yoshikawa.takuya@oss.ntt.co.jp \
/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).