Bug 1858816 - RFE add <driver io="native"> option for disks
Summary: RFE add <driver io="native"> option for disks
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Virtualization
Version: 2.4.0
Hardware: Unspecified
OS: Unspecified
urgent
medium
Target Milestone: ---
: 2.4.1
Assignee: Daniel Belenky
QA Contact: zhe peng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-20 13:24 UTC by Stefan Hajnoczi
Modified: 2020-09-03 20:31 UTC (History)
11 users (show)

Fixed In Version: virt-operator-container-v2.4.1-2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-03 20:31:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Upstream patch to add support to configure QEMU I/O mode on VMIs (46 bytes, patch)
2020-08-02 13:37 UTC, Daniel Belenky
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt kubevirt pull 3923 0 None closed Add support to configure vmi disk I/O mode options 2021-01-27 17:24:00 UTC
Red Hat Product Errata RHBA-2020:3629 0 None None None 2020-09-03 20:31:20 UTC

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


Note You need to log in before you can comment on or make changes to this bug.