Bug 1858816

Summary: RFE add <driver io="native"> option for disks
Product: Container Native Virtualization (CNV) Reporter: Stefan Hajnoczi <stefanha>
Component: VirtualizationAssignee: Daniel Belenky <dbelenky>
Status: CLOSED ERRATA QA Contact: zhe peng <zpeng>
Severity: medium Docs Contact:
Priority: urgent    
Version: 2.4.0CC: atheurer, cnv-qe-bugs, dbelenky, fdeutsch, ipinto, jhopper, kbidarka, krister, pelauter, sgarbour, sgott
Target Milestone: ---   
Target Release: 2.4.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-operator-container-v2.4.1-2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-03 20:31:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Upstream patch to add support to configure QEMU I/O mode on VMIs none

Description Stefan Hajnoczi 2020-07-20 13:24:27 UTC
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.

Comment 2 Daniel Belenky 2020-08-02 13:37:03 UTC
Created attachment 1703204 [details]
Upstream patch to add support to configure QEMU I/O mode on VMIs

Comment 3 Daniel Belenky 2020-08-02 13:43:06 UTC
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.

Comment 17 zhe peng 2020-08-17 06:33:33 UTC
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.

Comment 21 errata-xmlrpc 2020-09-03 20:31:08 UTC
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