burette: add virtio-fs performance test#3446
Merged
benhillis merged 3 commits intoMay 8, 2026
Merged
Conversation
Adds a virtio_fs test to burette that boots a Linux VM with a virtio-fs device backed by a host tempdir, mounts it inside the guest, and runs four fio jobs (sequential/random read/write, io_uring, 4 KiB blocks, iodepth 32) against a pre-allocated 128 MiB test file. This gives us an end-to-end measurement of the OpenVMM virtio-fs file server's throughput and IOPS that we can use as the baseline for upcoming perf work in oss/vm/devices/virtio/virtiofs/. Use: burette run --test virtio-fs -o baseline.json # ... apply a perf change, rebuild openvmm ... burette run --test virtio-fs -o candidate.json burette compare baseline.json candidate.json Reports: - fio_virtiofs_seq_read_bw (MiB/s) - fio_virtiofs_seq_write_bw (MiB/s) - fio_virtiofs_rand_read_bw (MiB/s) - fio_virtiofs_rand_read_iops (IOPS) - fio_virtiofs_rand_write_bw (MiB/s) - fio_virtiofs_rand_write_iops (IOPS) The mount lives at /perf/tmp/vfs in the guest (the tmpfs that prepare_chroot sets up over the read-only erofs perf rootfs), so fio sees /tmp/vfs/test.dat once chrooted into /perf. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The original test used 4k blocks with direct=0 and ramp_time=5 on a 128 MiB file in a 1 GB VM. After the ramp period the entire file sat in guest page cache, so measurements reflected page-cache throughput rather than the virtio-fs FUSE request path. Fixes: - Increase default file size to 512 MiB (exceeds page cache capacity) - Drop guest page caches before each fio job - Set ramp_time=0 so reads start cold (harness warmup handles VM warm-up) - Use 128k blocks for sequential tests (exercises zero-copy + max-pages) - Keep 4k blocks for random tests (measures IOPS / multi-queue) - Add --invalidate=1 and --end_fsync=1 to flush writes through FUSE - Align CLI default (--virtiofs-file-size-mib) with the new constant Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new burette benchmark that measures virtio-fs performance by booting a minimal Linux VM, mounting a host-backed virtio-fs share, and running fio to report throughput and IOPS metrics.
Changes:
- Introduces a new warm-mode virtio-fs fio benchmark test with bandwidth/IOPS parsing and perf recording.
- Wires the new
virtio_fstest into the test module registry and CLI (burette run+ packaging artifacts). - Adds a CLI flag to configure the virtio-fs test file size.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| petri/burette/src/tests/virtio_fs.rs | Implements virtio-fs VM setup, fio execution, and metric extraction. |
| petri/burette/src/tests/mod.rs | Exposes the new virtio_fs test module. |
| petri/burette/src/main.rs | Adds CLI integration, arg plumbing, and artifact registration for the new test. |
- Add --time_based=1 so fio runs for the full 10s measurement window even if the file size is consumed early on fast configurations. - Run sync before dropping caches to flush dirty pages first, making cache state deterministic between fio jobs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jstarks
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a virtio-fs file server performance test to the burette benchmark suite.
What it does
Boots a minimal Linux VM with a virtio-fs device backed by a host tempdir, mounts it inside the guest, and runs fio against a regular file on the mount. Measures sequential and random read/write bandwidth (MiB/s) and IOPS across multiple iterations using warm mode (VM booted once, reused for all iterations).
Test design
ramp_time=0ensures cold-start measurement; harness warmup iteration handles VM warm-up--end_fsync=1flushes buffered writes through FUSE before reporting--direct=0(buffered I/O) because Linux FUSE does not support O_DIRECT withoutFOPEN_DIRECT_IOMetrics
fio_virtiofs_seq_read_bwfio_virtiofs_seq_write_bwfio_virtiofs_rand_read_bwfio_virtiofs_rand_read_iopsfio_virtiofs_rand_write_bwfio_virtiofs_rand_write_iopsUsage