Repository navigation
perf(goexec): benchmark Go scheduler and cache stealing peers - #101
Merged
Merged
Conversation
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.
Each scheduler checkpoint rebuilt every worker's stealing-peer list under the scheduler mutex, adding allocation and reference-count traffic as worker counts grew. Cache each worker's rotated peer list until the worker set grows, and publish its single-writer poll counter with atomic stores instead of read-modify-write operations. Checkpoint frequency, handoff policy, return priority, and thread/permit limits remain unchanged.
Add a Go companion benchmark and a reproducible runner covering cooperative yields, empty blocking boundaries, cached reads, CPU work, blocking socket waits, and mixed workloads. The runner records shuffled serial repetitions, environment metadata, binary hashes, raw CSV, and median/min/max summaries under the ignored target directory; generated result files are not checked in. A deterministic regression test verifies that existing workers discover work on newly added workers.
Measurements and limitations
syscall.Read/Writewith external Rust peers. These results do not measure Go's network poller or general application performance, and explicitGoscheddiffers from local future rescheduling.Validation
cargo fmt --all -- --checkcargo clippy -p goexec --all-targets --locked -- -D warningscargo test -p goexec --locked: 33 unit/integration/doc tests passedcargo test -p goexec --locked --features loom --lib: six models passedgo vet; Go companion built with-race, with no races reportedRust commands used
RUSTC_WRAPPER=because the host's configuredsccachewas unavailable.