On Sat, Jul 24, 2021 at 04:38:46PM +0300, Vladimir Sementsov-Ogievskiy wrote: > There is no conflict and no dependency if we have parallel writes to > different subclusters of one cluster when cluster itself is already
when the cluster itself > allocated. So, relax extra dependency. > > Measure performance: > First, prepare build/qemu-img-old and build/qemu-img-new images. > > cd scripts/simplebench > ./img_bench_templater.py > > Paste the following to stdin of running script: > > qemu_img=../../build/qemu-img-{old|new} > $qemu_img create -f qcow2 -o extended_l2=on /ssd/x.qcow2 1G > $qemu_img bench -c 100000 -d 8 [-s 2K|-s 2K -o 512|-s $((1024*2+512))] \ > -w -t none -n /ssd/x.qcow2 > > The result: > > All results are in seconds > > ------------------ --------- --------- > old new > -s 2K 6.7 ± 15% 6.2 ± 12% > -7% > -s 2K -o 512 13 ± 3% 11 ± 5% > -16% > -s $((1024*2+512)) 9.5 ± 4% 8.4 > -12% > ------------------ --------- --------- Cool improvement. > > So small writes are more independent now and that helps to keep deeper > io queue which improves performance. > > 271 iotest output becomes racy for three allocation in one cluster. > Second and third writes may finish in different order. Second and > third requests don't depend on each other any more. Still they both > depend on first request anyway. Keep only one for consistent output. Interesting fallout. Yes, it looks like the test is still robust enough without the extra request. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > --- > block/qcow2-cluster.c | 11 +++++++++++ > tests/qemu-iotests/271 | 4 +--- > tests/qemu-iotests/271.out | 2 -- > 3 files changed, 12 insertions(+), 5 deletions(-) Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org