Oximeter: jitter collection intervals.#10711
Open
jmcarp wants to merge 1 commit into
Open
Conversation
424b1eb to
25ef2f7
Compare
As of this writing, the oximeter collector's database batcher can queue at most 100_000 samples. In realistic conditions, it can receive about 80_000 metrics at once: each mgs producer sends about 40_000 metrics per collection on a full rack, and with the two mgs producers sampled with the same interval and offset, we receive all their collected metrics at roughly the same time. As a result, even when overall metrics volume isn't particularly high, we can drop samples when too many arrive at once. To mitigate thundering herds of samples, this patch introduces a jittered offset to each collection task timer, offsetting by 0..interval. This doesn't save us from having to size the collector queue properly, but spreads out load over time on average. Part of #10552.
25ef2f7 to
2f05d86
Compare
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.
As of this writing, the oximeter collector's database batcher can queue at most 100_000 samples. In realistic conditions, it can receive about 80_000 metrics at once: each mgs producer sends about 40_000 metrics per collection on a full rack, and with the two mgs producers sampled with the same interval and offset, we receive all their collected metrics at roughly the same time. As a result, even when overall metrics volume isn't particularly high, we can drop samples when too many arrive at once.
To mitigate thundering herds of samples, this patch introduces a jittered offset to each collection task timer, offsetting by 0..interval. This doesn't save us from having to size the collector queue properly, but spreads out load over time on average.
Part of #10552.