Repository navigation
bench: time cold installs on a 10 Mbit link - #1901
Merged
Merged
Conversation
Cold used to be measured with package downloads primed outside the timed window and with framework packages retained, so the 2.5 GB -> ~40 MB ESP32 framework reduction never appeared in the numbers. - Add --network-mbit (default 0) and emit network_mbit in latest.json. - ESP32-S3 cold cleanup now deletes the fbuild framework platform packages (~/.fbuild/<mode>/cache/platforms/framework-arduinoespressif32*) and PlatformIO's framework-arduinoespressif32* + cache* entries. Toolchains are deliberately kept so the run fits the 60-minute CI timeout. - Replace the prime-downloads step with a toolchain-only fbuild install warmup; the benchmark deletes framework packages before every timed build. - Shape the runner NIC to 10 Mbit/s with tc tbf, fail loudly if shaping or readback fails, and always remove the qdisc. - Disclose the 10 Mbit/s condition and the cold download definition on the published site.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
tc qdisc root tbf shapes egress only. Downloads are ingress, so the previous setup would have left every framework/lib fetch at full link speed while the report said 10 Mbit/s, and the qdisc readback check would have passed anyway. Redirect ingress into an ifb device and shape that (fallback: ingress policing), then prove it bites by pulling 10 MB and failing the job if the achieved rate exceeds ~10 Mbit/s. Tear down the ingress qdisc and ifb in the cleanup step.
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.
Why
The published cold numbers showed fbuild only ~1.66x faster than PlatformIO, not because fbuild is slow but because the measurement excluded the win by construction:
Prime package downloads outside timed measurementsstep, andThe ESP32 framework reduction (2.5 GB whole bundle -> ~40 MB per-chip slice) therefore never landed inside the timed window. Network transfer is part of a real cold install, so it must be measured.
What changed
bench-build-comparison--network-mbit <u32>option (default0= unthrottled), threaded throughOptionsandMetadata.network_mbitis emitted inlatest.jsonmetadata.<cache>/platforms/framework-arduinoespressif32*(verified layout:~/.fbuild/<mode>/cache/platforms/<stem>/<hash>/<version>/; the libs archive is cached inside that tree attools/.libs-archives).~/.platformio/packages/framework-arduinoespressif32*and~/.platformio/cache*.cache/toolchains/,~/.platformio/packages/toolchain-*) are deliberately untouched; a ~175 MB toolchain download on 10 Mbit would risk the 60-minute job timeout.* Measured on a link limited to 10 Mbit/s (tc traffic shaping); cold includes framework/lib download time.fbuild installwarmup; the harness deletes framework packages before every timed build, so their download is still timed.tc qdisc replace ... tbf rate 10mbit burst 64kbit latency 50ms, verifies the qdisc readback, and fails the job (never publishes) if shaping fails.if: always()cleanup step.--network-mbit 10.Caveat
Cold now includes framework/lib downloads; toolchains remain warm by design. Uno cold behavior is unchanged. The first ESP32 trial also installs anything missing from a totally clean cache, but medians are over 3 trials.
Verification (local, unshaped)
soldr cargo test -p fbuild-bench-fastled-examples-> 38 passed, 0 failedsoldr cargo build --release -p fbuild-bench-fastled-examples --bin bench-build-comparison-> Finishedsoldr cargo fmt --all -- --check-> cleantcshaping applied locally.