Features/VirtioIoeventfd

From QEMU
Revision as of 14:51, 11 October 2016 by Paolo Bonzini (talk | contribs) (moved Features-Done/VirtioIoeventfd to Features/VirtioIoeventfd over redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Virtqueue notify is currently handled synchronously in userspace virtio. This prevents the vcpu from executing guest code while hardware emulation code handles the notify.

On systems that support KVM, the ioeventfd mechanism can be used to make virtqueue notify a lightweight exit by deferring hardware emulation to the iothread and allowing the VM to continue execution. This model is similar to how vhost receives virtqueue notifies.

The result of this change is improved performance for userspace virtio devices. Virtio-blk throughput increases especially for multithreaded scenarios and virtio-net transmit throughput increases substantially.

The following performance results show an 8 core * 2 hyperthreaded host running the FFSB benchmark against high-end SAN-backed storage.

Not only does throughput increase, but more importantly CPU utilization per MB/s improves.

aio=native

Virtio-ioeventfd-native-cpu.gif

aio=threads

Virtio-ioeventfd-threads-cpu.gif