Open Gaming & Graphics

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 file system used to share data between guest VMs and host systems. Unlike VirtIO's typical asynchronous model, synchronous queues let the host vCPU thread complete I/O requests before returning to the guest. In benchmarks, this cut build times for libkrunfw from 7 minutes 43 seconds to 5 minutes 34 seconds. The work is available as a pending pull request for libkrun adding optional VIRTIO_FS_F_SYNC support.

What changes in VirtIO-FS synchronous queues

  • Current model: VirtIO-FS normally uses asynchronous queues, where I/O requests are submitted and completed later
  • New approach: Synchronous queues allow the host vCPU thread to block and complete the request before returning to guest execution
  • Measured improvement: libkrunfw build time dropped from 7:43 to 5:34 (roughly 28% faster)
  • Additional gains: Significant random I/O performance improvements and lower file deletion latency
  • Implementation status: Experimental pull request for libkrun with optional VIRTIO_FS_F_SYNC flag

Why it matters

If merged, this could improve I/O-heavy workloads in container and VM environments using libkrun, particularly for build systems and development workflows that rely on shared host-guest file systems.

Original reference: www.phoronix.com →