Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Guide/src/dev_guide/tests/perf.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,28 @@ By default a RAM-backed disk is used to isolate virtio/storvsc overhead
without host filesystem noise. Pass `--data-disk` with a path on fast
storage (e.g., NVMe) for end-to-end latency measurements.

### virtio-fs readdir

Measures virtio-fs directory listing (readdir) throughput using a
directory populated with many small files. Exercises the FUSE readdir
and readdirplus paths in the VMM:

```bash
burette run --test virtio-fs-readdir -o readdir.json

# Custom file count (default: 10,000)
burette run --test virtio-fs-readdir --readdir-file-count 30000
```

Reported metrics:

- `virtiofs_readdir_plain_time` /
`virtiofs_readdir_plain_entries_per_sec` —
plain READDIR path (no per-entry lookups)
- `virtiofs_readdir_plus_time` /
`virtiofs_readdir_plus_entries_per_sec` —
READDIRPLUS path (with per-entry lookups)

## Comparing Reports

```bash
Expand Down
23 changes: 23 additions & 0 deletions petri/burette/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ enum TestName {
DiskIo,
/// virtio-fs file server throughput via fio.
VirtioFs,
/// virtio-fs directory listing (readdir) performance.
VirtioFsReaddir,
Comment thread
benhillis marked this conversation as resolved.
}

/// Global log source for petri, initialized once.
Expand Down Expand Up @@ -155,6 +157,10 @@ struct RunArgs {
/// Test file size in MiB for the virtio_fs test.
#[arg(long, default_value = "512")]
virtiofs_file_size_mib: u64,

/// Number of files to create for the virtio_fs_readdir test.
#[arg(long, default_value = "10000")]
readdir_file_count: u32,
}

#[derive(clap::Args)]
Expand Down Expand Up @@ -259,6 +265,7 @@ fn cmd_run(args: RunArgs) -> anyhow::Result<()> {
TestName::Network,
TestName::DiskIo,
TestName::VirtioFs,
TestName::VirtioFsReaddir,
];
let tests_to_run: Vec<TestName> = if let Some(name) = args.test {
vec![name]
Expand Down Expand Up @@ -371,6 +378,22 @@ fn cmd_run(args: RunArgs) -> anyhow::Result<()> {
.context("virtio_fs test failed")?;
all_stats.extend(stats);
}
TestName::VirtioFsReaddir => {
let test = tests::virtio_fs::VirtioFsReaddirTest {
diag: args.diag,
perf_dir: args.perf_dir.clone(),
file_count: args.readdir_file_count,
};

let artifacts = resolve_artifacts(tests::virtio_fs::register_artifacts)?;
let resolver = petri::ArtifactResolver::resolver(&artifacts);

let stats = pal_async::DefaultPool::run_with(async |driver| {
harness::run_warm_test(&test, &resolver, &driver, args.iterations).await
})
.context("virtio_fs_readdir test failed")?;
all_stats.extend(stats);
}
}
}

Expand Down
Loading
Loading