kernel-os

Experimental sync queues cut VirtIO-FS build times by 28%

Key Takeaway

Pending synchronous queue support for VirtIO-FS reduced a libkrunfw build from 7:43 to 5:34 in testing by Sergio López.

Summary

Sergio López has developed experimental synchronous queue support for VirtIO-FS, the paravirtualized filesystem used for host-guest VM data transfers. Unlike VirtIO's typical asynchronous model, synchronous queues let the host vCPU thread complete I/O requests before returning to the guest. Testing showed a libkrunfw build time drop from 7 minutes 43 seconds to 5 minutes 34 seconds, alongside improvements in random I/O and file deletion latency. The work is available as a pending pull request for libkrun with optional VIRTIO_FS_F_SYNC support.

How synchronous queues change VirtIO-FS behavior

  • Default VirtIO model: asynchronous queues where the guest continues execution without waiting for host I/O completion
  • Sync queue mechanism: host vCPU thread blocks and completes the filesystem request before returning control to guest
  • Measured workload: libkrunfw build time reduced from 7:43 to 5:34 (~28% improvement)
  • Additional gains: significant random I/O performance improvement and lower file deletion latency
  • Implementation status: experimental pull request for libkrun adding optional VIRTIO_FS_F_SYNC flag support

Why it matters

If merged, this could substantially improve I/O-bound workload performance for cloud VMs and container sandboxes using VirtIO-FS, particularly for compilation and build scenarios where synchronous completion is already effectively required.

Original reference: www.phoronix.com →