qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Yaodong Yang <yaodong.yangy@icloud.com>
Cc: qemu-devel@nongnu.org, qemu-discuss@nongnu.org
Subject: Re: [Qemu-devel] A question about virtio inside qemu
Date: Thu, 12 Dec 2013 14:45:40 +0100	[thread overview]
Message-ID: <20131212134540.GD2485@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <6b069e96-eeb3-4a95-8a53-076daafa7cb8@me.com>

On Wed, Dec 11, 2013 at 08:55:33PM +0000, Yaodong Yang wrote:
> I have a quick question about the virtio inside qemu. When the user application sends to a specific virtual disk a large number of read requests in a very short time, where should these requests be queued? Inside the virtqueue? virtqueue available ring or the underlying bdrv_read_aio()?

Requests take up descriptor space in the vring.  Remember the vring
consists of 3 things:
1. Descriptor space
2. Available ring
3. Used ring

While the request is pending its vring descriptors will be in use,
regardless of whether the head index is in the avail/used rings.

> Currently, I run one guest vm with two virtual disks (one for ubuntu system, the other is to serve the data access.) When the system is running, I can check there are for instance 50 inflight requests to read or write the system virtual disk. However, the inflight requests to the data virtual disk is always one. Which is not reasonable, because inside the vm we calculated the avery response time for each request is much larger than the time interval between two adjacent requests.

I don't understand this paragraph.  But virtio-blk and virtio-scsi
support multiple in-flight requests.  The guest should be able to
achieve queue depths of around 128 with virtio-blk.

> My ultimate goal is to get the number of in-flight requests for a certain virtual disk. Could someone give me some hints?

Tools like iostat(1) can tell you about in-flight requests at the Linux
block layer level.

Stefan

      reply	other threads:[~2013-12-12 13:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11 20:55 [Qemu-devel] A question about virtio inside qemu Yaodong Yang
2013-12-12 13:45 ` Stefan Hajnoczi [this message]

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=20131212134540.GD2485@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-discuss@nongnu.org \
    --cc=yaodong.yangy@icloud.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 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).