QEMU offers "threads", "native", and "io_uring" AIO engines. The libvirt <driver io="threads"/"native"/"io_uring"> syntax can be used to specify the engine. io="native" is generally recommended because it performs well in a wide variety of cases. Currently there is no way to set this option in CNV. io="io_uring" is a new AIO engine that has less real-world usage so far but is expected to be at least as fast as aio="native". It is possible that this will become the recommended setting for QEMU/KVM guests in the future. io="threads" is typically not the fastest option (although there are corner cases). Being able to specify all three options would be helpful so that performance tuning is possible. I have CCed Karl Rister regarding performance data. An comparison of io="threads" vs io="native" was done across a wide variety of storage. He may be able to share the data.
Created attachment 1703204 [details] Upstream patch to add support to configure QEMU I/O mode on VMIs
We will not be able to support 'io_uring' just yet because it was introduced in QEMU 5 which was released just a few month ago. We still use qemu 4.2 for virt-launcher.
verify with build: $ oc version Client Version: 4.4.0-0.nightly-2020-02-17-022408 Server Version: 4.5.6 Kubernetes Version: v1.18.3+002a51f $ virtctl version Client Version: version.Info{GitVersion:"v0.30.6", GitCommit:"61dc223d4aadbbed2b55b66816ee8b2118db02c4", GitTreeState:"clean", BuildDate:"2020-08-12T10:59:03Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{GitVersion:"v0.30.6", GitCommit:"61dc223d4aadbbed2b55b66816ee8b2118db02c4", GitTreeState:"clean", BuildDate:"2020-08-12T10:54:40Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"} step: 1.create a vm with yaml: ... disks: - bootOrder: 1 disk: bus: virtio io: native name: fedorarootdisk ... 2. start the vm 3. check disk io $ oc exec virt-launcher-vm-cirros-hpp-4gzc2 -c compute -it -- cat /etc/libvirt/qemu/default_vm-cirros-hpp.xml | egrep disk -B 1 <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none' io='native'/> <source file='/var/run/kubevirt-ephemeral-disks/disk-data/containerdisk/disk.qcow2'/> test both native and threads, all worked as expect, move to verified.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (OpenShift Virtualization 2.4.1 images), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:3629