[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] A question about virtio inside qemu
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-discuss] A question about virtio inside qemu |
Date: |
Thu, 12 Dec 2013 14:45:40 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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