[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/7] qcow2: async handling of fragmented io
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [PATCH 0/7] qcow2: async handling of fragmented io |
Date: |
Thu, 16 Aug 2018 02:51:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 2018-08-07 19:43, Vladimir Sementsov-Ogievskiy wrote:
> Hi all!
>
> Here is an asynchronous scheme for handling fragmented qcow2
> reads and writes. Both qcow2 read and write functions loops through
> sequential portions of data. The series aim it to parallelize these
> loops iterations.
>
> It improves performance for fragmented qcow2 images, I've tested it
> as follows:
>
> I have four 4G qcow2 images (with default 64k block size) on my ssd disk:
> t-seq.qcow2 - sequentially written qcow2 image
> t-reverse.qcow2 - filled by writing 64k portions from end to the start
> t-rand.qcow2 - filled by writing 64k portions (aligned) in random order
> t-part-rand.qcow2 - filled by shuffling order of 64k writes in 1m clusters
> (see source code of image generation in the end for details)
>
> and the test (sequential io by 1mb chunks):
>
> test write:
> for t in /ssd/t-*; \
> do sync; echo 1 > /proc/sys/vm/drop_caches; echo === $t ===; \
> ./qemu-img bench -c 4096 -d 1 -f qcow2 -n -s 1m -t none -w $t; \
> done
>
> test read (same, just drop -w parameter):
> for t in /ssd/t-*; \
> do sync; echo 1 > /proc/sys/vm/drop_caches; echo === $t ===; \
> ./qemu-img bench -c 4096 -d 1 -f qcow2 -n -s 1m -t none $t; \
> done
>
> short info about parameters:
> -w - do writes (otherwise do reads)
> -c - count of blocks
> -s - block size
> -t none - disable cache
> -n - native aio
> -d 1 - don't use parallel requests provided by qemu-img bench itself
Hm, actually, why not? And how does a guest behave?
If parallel requests on an SSD perform better, wouldn't a guest issue
parallel requests to the virtual device and thus to qcow2 anyway?
(I suppose the global qcow2 lock could be an issue here, but then your
benchmark should work even without -d 1.)
Max
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 0/7] qcow2: async handling of fragmented io, Vladimir Sementsov-Ogievskiy, 2018/08/07
- [Qemu-devel] [PATCH 1/7] qcow2: move qemu_co_mutex_lock below decryption procedure, Vladimir Sementsov-Ogievskiy, 2018/08/07
- [Qemu-devel] [PATCH 6/7] qcow2: refactor qcow2_co_pwritev locals scope, Vladimir Sementsov-Ogievskiy, 2018/08/07
- [Qemu-devel] [PATCH 2/7] qcow2: bdrv_co_pwritev: move encryption code out of lock, Vladimir Sementsov-Ogievskiy, 2018/08/07
- [Qemu-devel] [PATCH 3/7] qcow2: split out reading normal clusters from qcow2_co_preadv, Vladimir Sementsov-Ogievskiy, 2018/08/07
- [Qemu-devel] [PATCH 4/7] qcow2: async scheme for qcow2_co_preadv, Vladimir Sementsov-Ogievskiy, 2018/08/07
- [Qemu-devel] [PATCH 5/7] qcow2: refactor qcow2_co_pwritev: split out qcow2_co_do_pwritev, Vladimir Sementsov-Ogievskiy, 2018/08/07
- [Qemu-devel] [PATCH 7/7] qcow2: async scheme for qcow2_co_pwritev, Vladimir Sementsov-Ogievskiy, 2018/08/07
- Re: [Qemu-devel] [PATCH 0/7] qcow2: async handling of fragmented io,
Max Reitz <=