Skip to content

burette: add fio-based block I/O performance tests#3127

Open
jstarks wants to merge 5 commits intomicrosoft:mainfrom
jstarks:perf_tests_disk
Open

burette: add fio-based block I/O performance tests#3127
jstarks wants to merge 5 commits intomicrosoft:mainfrom
jstarks:perf_tests_disk

Conversation

@jstarks
Copy link
Copy Markdown
Member

@jstarks jstarks commented Mar 25, 2026

Add a disk_io benchmark to burette that boots an Alpine Linux VM, installs fio, and measures sequential/random read/write throughput (MiB/s) and IOPS.

Supports virtio-blk and storvsc (synthetic SCSI) backends. Uses UEFI boot with PCIe topology and discovers the data disk via /sys/block. Defaults to a RAM-backed disk to isolate virtio/storvsc overhead; optionally accepts a host file path for realistic storage latency.

@jstarks jstarks requested a review from a team as a code owner March 25, 2026 02:59
Copilot AI review requested due to automatic review settings March 25, 2026 02:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new burette performance benchmark that measures block I/O performance (via fio) in an Alpine Linux UEFI VM, aimed at comparing virtio-blk vs. storvsc backend overhead under a warm-VM iteration model.

Changes:

  • Introduces a new disk_io warm performance test that boots Alpine, installs fio, discovers an attached data disk, and records BW/IOPS metrics.
  • Extends the burette CLI to expose the new disk-io test plus disk-backend and disk-file/size options.
  • Adds required dependencies for disk resources, GUIDs, PCIe config, and resource plumbing.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
petri/burette/src/tests/mod.rs Registers the new disk_io test module.
petri/burette/src/tests/disk_io.rs Implements the fio-based block I/O benchmark, disk attachment, and metric parsing.
petri/burette/src/main.rs Adds the disk-io test selection and related CLI flags.
petri/burette/Cargo.toml Adds dependencies needed to configure disks/PCIe/virtio resources.
Cargo.lock Updates lockfile for new dependencies.

@github-actions github-actions bot added the Guide label Mar 25, 2026
jstarks added 2 commits March 26, 2026 16:28
Add a disk_io benchmark to burette that boots an Alpine Linux VM, installs
fio, and measures sequential/random read/write throughput (MiB/s) and IOPS.

Supports virtio-blk and storvsc (synthetic SCSI) backends. Uses UEFI boot
with PCIe topology and discovers the data disk via /sys/block. Defaults to
a RAM-backed disk to isolate virtio/storvsc overhead; optionally accepts a
host file path for realistic storage latency.
- Fix VirtioBlk doc comment: MMIO -> PCIe (virtio-pci)
- Add disk size validation (ensure > 0 GiB)
- Change make_disk_resource to return Result instead of panicking
- Hoist disk resource creation outside closure for error propagation
- Use GUID-based sysfs discovery for storvsc data disk instead of
  fragile sd* device name heuristics
- Restructure discover_data_disk to only list /sys/block for virtio-blk
- Add disk I/O section to Guide perf.md
Copilot AI review requested due to automatic review settings March 26, 2026 16:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.

mattkur
mattkur previously approved these changes Mar 26, 2026
Copy link
Copy Markdown
Contributor

@mattkur mattkur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I am concerned about the reliability and portability of reaching out to the internet to install things like fio, but that will be addressed by microsft/openvmm-deps#42 .

I'm also little dismayed by the number of lines of code required to set up the pcie hierarchy, but again this is a good starting point. Thanks!

Copilot AI review requested due to automatic review settings March 26, 2026 16:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.

@jstarks
Copy link
Copy Markdown
Member Author

jstarks commented Mar 26, 2026

I'm also little dismayed by the number of lines of code required to set up the pcie hierarchy, but again this is a good starting point.

Jack is fixing this.

@jackschefer-msft
Copy link
Copy Markdown
Contributor

I'm also little dismayed by the number of lines of code required to set up the pcie hierarchy, but again this is a good starting point.

Jack is fixing this.

If anyone is interested in reviewing #3118 then this is ready to go :)

- Run each fio mode (read, write, randread, randwrite) once instead of
  running randread/randwrite twice. Extract both BW and IOPS from the
  same JSON output for random modes, saving ~30s per iteration.

- Select Alpine VHD based on MachineArch::host() instead of hardcoding
  ALPINE_3_23_X64, matching the pattern used by the network test.
  Previously this would fail on aarch64 hosts due to arch mismatch.
@github-actions
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants