Add competing benchmark workflow: pdu (master) vs dust vs dua#340
Add competing benchmark workflow: pdu (master) vs dust vs dua#340
Conversation
Co-authored-by: KSXGitHub <11488886+KSXGitHub@users.noreply.github.com>
Co-authored-by: KSXGitHub <11488886+KSXGitHub@users.noreply.github.com>
|
@copilot Fascinating. |
Great question. The ~2× advantage comes from a few architectural decisions in 1. Fully recursive Rayon parallelism at every depth The key is in let children = children
.into_par_iter() // ← Rayon parallel iterator
.map(|name| TreeBuilder { ... })
.map(Self::from); // ← recursive, so every subdirectory spawns more parallel workEvery directory's children are dispatched as parallel Rayon tasks, and because 2. Lock-free concurrent hardlink recording
3. Early In 4.
Dust's recent performance commits likely improved its Rayon usage or reduced allocations, which is why it went from being 3–4× slower in older benchmarks to the ~1.9× slower we see now. But |
|
Curiosity satisfied. |
Adds a focused
workflow_dispatchbenchmark workflow comparing onlypdu(built from master with--release),dust(latest), anddua(latest) — a trimmed-down variant of thecompeting_benchmarkjob indeploy.yaml.Changes
.github/workflows/competing-benchmark.yaml— Standalone workflow triggered viaworkflow_dispatch. Buildspdufrom the checked-out master branch with--release, dynamically fetches the latestdustandduareleases via GitHub API, runs hyperfine benchmarks, and uploads a report archive as a workflow artifact.ci/github-actions/competing-benchmark-pdu-dust-dua.ts— Slimmed benchmark matrix covering three categories (apparent-size,block-size,deduplicate-hardlinks) with onlydustandduaas competitors (dropsncdu,gdu,du,dutree).Benchmark Results (Linux 5.12 source tree, ~1.2 GB)
Apparent size
pdu --quantity=apparent-sizedust --no-progress --apparent-sizedua --count-hard-links --apparent-sizeBlock size
pdu --quantity=block-sizedust --no-progressdua --count-hard-linksDeduplicate hardlinks
pdu --deduplicate-hardlinksdust --no-progressduapdu(master) is ~1.9× faster thandust1.2.4 and ~3× faster thandua2.34.0 across all categories.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/KSXGitHub/parallel-disk-usage/actions/workflows/competing-benchmark.yaml/dispatches/usr/bin/curl curl -s -X POST -H Accept: application/vnd.github+json -H Authorization: ****** -d {"ref":"copilot/benchmark-pdu-dust-dua"} -w \nHTTP Status: %{http_code}\n(http block)https://api.github.com/repos/bootandy/dust/releases/latest/usr/bin/curl curl -sf REDACTED(http block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.