Repository navigation
Let dua-core queue more of the walk in place of the draining thread - #81
Merged
Merged
Conversation
dua-core 4.2.0 has `Options::queued_batches_per_worker`, from Byron/dua-cli#413. With room for 128 batches per worker, the walk's loop in a large Rails app waited a median 64 ms on dua-core, against 113 ms with the thread and 301 ms with dua-core's default of 2.
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.
Summary
Options::queued_batches_per_worker, from perf: let walk workers queue more batches ahead of the iterator Byron/dua-cli#413. pks now asks for room for 128 batches per worker, and the thread that Walk the app with dua-core in place of jwalk #79 added to drain the walk is gone.package.yml. The thread kept them going by draining the walk into an unbounded channel.Measurements
The walk loop's median wait on dua-core over 15 runs in a large Rails app, at a load average of about 22 on 12 cores:
main)The total walk time was too noisy to separate the setups, apart from the default of 2. Rerun with 4.2.0 at a load average of about 47, it's a median 801 ms against 820 ms for
main.Test plan
cargo test(374 tests),cargo fmt --checkandcargo clippy --all-targets --all-features -- -Dwarnings.list-included-files,list-packsandlist-referencesmatchmainon every fixture and four Rails apps.list-referencesonapp_with_monkey_patchespanics on both, naming either duplicate constant at random, as onmain.Buildjobs, including Windows.