burette: add virtio-fs readdir benchmark test#3451
Open
benhillis wants to merge 4 commits into
Open
Conversation
Add a new burette performance test that measures virtio-fs directory listing (readdir) throughput. The test creates a directory populated with 10,000 files and measures: - Plain readdir (ls -f): exercises the FUSE READDIR path via the kernel's READDIRPLUS_AUTO fallback. This is the path optimized by PR microsoft#3440 (removing per-entry lookup_helper calls). - Readdirplus (ls -l): exercises the FUSE READDIRPLUS path with per-entry lookups, serving as a control that should be unaffected by the optimization. The test uses GNU coreutils from the petritools erofs image (via chroot) to ensure ls -f does not stat entries, and uses date +%s.%N for nanosecond timing precision. Benchmark results on ext4 backing store show the optimization in PR microsoft#3440 yields ~42% improvement in plain readdir throughput while leaving readdirplus unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new burette warm performance benchmark that measures virtio-fs directory listing throughput in a Linux-direct VM, aiming to quantify improvements from the plain readdir optimization described in #3440.
Changes:
- Introduces
virtio_fs_readdirwarm perf test that populates a host-backed virtio-fs directory with many files and measures guest enumeration time forls -f(plain readdir) andls -l(readdirplus-like workload). - Wires the new test into the burette CLI (
--test virtio-fs-readdir) and adds--readdir-file-countfor parameterization. - Ensures packaging includes the new test’s artifact requirements.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| petri/burette/src/tests/virtio_fs_readdir.rs | Adds new virtio-fs readdir benchmark implementation and metric reporting. |
| petri/burette/src/tests/mod.rs | Exposes the new test module. |
| petri/burette/src/main.rs | Registers the new test/CLI option and adds an argument to control file count; includes artifacts in packaging. |
- Fix metric names in module docs to match actual emitted names - Add unmeasured priming pass so plain readdir timing excludes the initial READDIRPLUS iteration - Improve mount error message with CONFIG_VIRTIO_FS hint - Document virtio-fs-readdir test in Guide/src/dev_guide/tests/perf.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the readdir benchmark test from its own file into virtio_fs.rs to match the existing burette pattern where each component is a single .rs file. Both tests share the same register_artifacts function since they need identical artifacts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Redirect priming pass ls -f to /dev/null to avoid large stdout - Account for . and .. entries in entries/s calculation - Wrap long guide bullet lines to ~80 chars Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Add a new burette performance test that measures virtio-fs directory listing (readdir) throughput. The test creates a directory populated with 10,000 files and measures:
Plain readdir (
ls -f): exercises the FUSE READDIR path via the kernel's READDIRPLUS_AUTO fallback. This is the path optimized by virtiofs: remove unnecessary per-entry lookup from plain readdir #3440 (removing per-entrylookup_helpercalls).Readdirplus (
ls -l): exercises the FUSE READDIRPLUS path with per-entry lookups, serving as a control that should be unaffected by the optimization.The test uses GNU coreutils from the petritools erofs image (via chroot) to ensure
ls -fdoes not stat entries, and usesdate +%s.%Nfor nanosecond timing precision.Benchmark results
On ext4 backing store, the optimization in #3440 yields: