Repository navigation
Conversation
This commit makes a change to resolve a performance regression reported privately by Adam Kardos, which was not detected by form-bench tests at the time of commit 5f8f71d. That commit parallelised the term merging in the final sortbot, and the writing out of the data by the master. Usually the master writes out much faster than the terms are merged, which can interact badly with the final sortbot's detection of a "waiting reader". We resolve this by inflating the MINWRITENUMBEROFTERMS value by 16 for that final transfer. This was determined to be a reasonably number "experimentally", but the optimal value is problem and system dependent. Additionally, reorganise the sortblock book-keeping from SoA to AoS layout. This reduces false cache-line sharing between sortbot threads. This change improves performance on some tests, for which the above change makes no difference. Co-authored-by: AnaIPereira <AnaIPereira@users.noreply.github.com>
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.
This commit makes a change to resolve a performance regression reported privately by Adam Kardos, which was not detected by form-bench tests at the time of commit 5f8f71d.
That commit parallelised the term merging in the final sortbot, and the writing out of the data by the master. Usually the master writes out much faster than the terms are merged, which can interact badly with the final sortbot's detection of a "waiting reader". We resolve this by inflating the MINWRITENUMBEROFTERMS value by 16 for that final transfer. This was determined to be a reasonably number "experimentally", but the optimal value is problem and system dependent.
Additionally, reorganise the sortblock book-keeping from SoA to AoS layout. This reduces false cache-line sharing between sortbot threads. This change improves performance on some tests, for which the above change makes no difference.
For Adam's test (tform -w12, AMD Ryzen 7900X), this is a speedup of 1.07 ± 0.01.
And for the form-bench tests on a few systems:
Baseline runtimes and speedups w.r.t tform-master -w12 (AMD Ryzen 7900X)
Parallel speedup w.r.t tform-master -w32 (2x AMD EPYC 7302)
Parallel speedup w.r.t tform-master -w64 (AMD Ryzen Threadripper PRO 7985WX)