perf(fuzz): clone only assigned corpus shard#15106
Merged
Merged
Conversation
Member
|
I ran a focused local benchmark for the changed sharding path, comparing the old
TLDR: |
DaniPopes
approved these changes
Jun 9, 2026
0xKarl98
approved these changes
Jun 9, 2026
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.
Problem
PR #15070 shards the warmed corpus with
corpus_seed.clone().for_worker(..). That means each parallel worker first materializes a full cloned seed, then filters it down to the entries assigned to that worker.Fix
corpus_seed.clone_for_worker(..)borrows the campaign seed and clones only the entries assigned to the target worker. Shared warmed coverage and optimization state are still copied per worker, and corpus-content metrics are recomputed for the shard.Methodology
End-to-end real invariant campaign: 370-entry persisted corpus, depth-2000 sequences,
--invariant-workers 8, 3 interleaved iterations per binary, peak RSS via/usr/bin/time -l.Three
forgebinaries built from the parent commit, #15070, and this fix, run on the same persisted corpus. Source: https://gist.github.com/mablr/cb84076c6c0712ce4b2cb11efc39df0bResults (8 workers, 370 entries)
clone())clone().for_worker)clone_for_worker)Conclusion
Wall-clock was comparable across variants.
Peak RSS is the important metric for the memory issue #15070 targeted.
In this benchmark, #15070 increased peak RSS vs the parent, while this follow-up reduced peak RSS to ~2.8 GB, about 2.4x lower than #15070.