qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On virtio and glusterfs block device


From: Dmitry Antipov
Subject: On virtio and glusterfs block device
Date: Mon, 9 Nov 2020 12:42:39 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

Hello,

I'm running x86 Ubuntu VM with GlusterFS-backed /, e.g.

qemu-system-x86_64 -enable-kvm -smp 8 -m 4096 -drive \
file=gluster://192.168.1.xxx/test/bionic.qcow2,if=virtio

and the following Fio (https://github.com/axboe/fio) benchmark inside a VM:

[global]
name=fio-rand-write-libaio
filename=fio-rand-write
ioengine=libaio
create_on_open=1
rw=randwrite
direct=0
numjobs=8
time_based=1
runtime=60

[test-4-kbytes]
bs=4k
size=1G
iodepth=8

(e.g. 8 tasks issues 4K-sized random writes across 1G file inside a VM).

Tracing I/O path down to qemu_gluster_co_rw() (block/gluster.c), I've found that
glfs_pwritev_async() is asked to write I/O vectors of the very different length
(mostly 1, average may be 15-20, and maximum value is around 150). Since the
workload generated by Fio looks regular and stable over the running time, this
looks suboptimal. At the first glance, long batches of I/O vectors of the same
length should give the better performance.

Next, looking through virtio_blk_submit_multireq() shows that non-sequential
requests are not merged. IIUC this approach assumes that the virtual block 
device
is always backed by the physical one - but what if not? In GlusterFS API, each
glfs_xxx() call requires the roundtrip to the server at least, and merging more
(even non-sequential) requests into longer I/O vectors may be really useful.

So, 1) is my understanding of the whole picture is correct and 2) is there
something to tune in attempt to improve an I/O performance in my case?

Thanks,
Dmitry



reply via email to

[Prev in Thread] Current Thread [Next in Thread]