logthrdestdrv: carry over fractional worker counts when computing partition stats#3
Closed
alltilla wants to merge 1 commit intoMrAnno:partition-statsfrom
Closed
Conversation
a564704 to
111ecf8
Compare
…tition stats The floor() call can remove significant fractions in certain scenarios, e.g.: 20 workers, 10 partitions, 1 wfo: - We retain 1 worker for the orphans. - We have 19 workers left for 10 partitions => 1.9 workers/partition - floor(1.9) = 1 worker/partition - 0.9 workers are lost per partition, which becomes 9 at the end - The remaining 9 workers are given to a single partition - Nearly half of the workers are severely underutilized Instead of accumulating all the rounding errors and giving it to the last partition, we can spread the rounding error to the following partition, which then spreads its rounding error to the next, etc. Signed-off-by: Attila Szakacs <[email protected]>
111ecf8 to
bc11639
Compare
Owner
|
I'd prefer review notes to my ongoing work over patches. This practice slowly eliminates the desire to contribute to AxoSyslog (especially in one's free time); this especially true for my other coworkers whose work previously had been rewritten. |
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 is an alternative solution for dealing with the rounding errors of
floor().The
floor()call can remove significant fractions in certain scenarios, e.g.:20 workers, 10 partitions (even load), 1 wfo:
Instead of accumulating all the rounding errors and giving it to the last partition, we can spread the rounding error to the following partition, which then spreads its rounding error to the next, etc.