gateway: polls sps every 2s rather than every 1s. - #10952
Draft
jmcarp wants to merge 1 commit into
Draft
Conversation
This patch includes a tiny configuration change, as well as lots of commentary explaining the motivation. To recapitulate some of that commentary: as described in #10552, our test racks drop metrics when oximeter collects a large volume of samples during a short period of time. On average, oximeter drains its database queue faster than it collects samples, but if we collect more than DEFAULT_BATCH_SIZE * MAX_BUFFER_SIZE_MULTIPLIER metrics during a short interval, we overflow the queue and drop the oldest samples. This can happen regularly when multiple high-volume producers are collected from around the same time. The worst offender here is mgs, which currently produces about 40k samples per collection from each gateway; if oximeter is unlucky enough to poll both gateways around the same time, it's immediately at 80% of its maximum queue size. This patch configures mgs to poll the sps every 2s rather than every 1s, halving the volume of the spikiest oximeter producer. We also add notes to the relevant constants explaining how they should be sized, and what might cause us to change them in the future. Note: my original plan was to increase the size of the oximeter database queue, but if we don't identify any downsides to polling the sps every 2s rather than every 1s, this change is safer. Part of #10552.
Collaborator
|
I think this is probably fine, just a few thoughts.
|
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 patch includes a tiny configuration change, as well as lots of commentary explaining the motivation. To recapitulate some of that commentary: as described in #10552, our test racks drop metrics when oximeter collects a large volume of samples during a short period of time. On average, oximeter drains its database queue faster than it collects samples, but if we collect more than DEFAULT_BATCH_SIZE * MAX_BUFFER_SIZE_MULTIPLIER metrics during a short interval, we overflow the queue and drop the oldest samples. This can happen regularly when multiple high-volume producers are collected from around the same time. The worst offender here is mgs, which currently produces about 40k samples per collection from each gateway; if oximeter is unlucky enough to poll both gateways around the same time, it's immediately at 80% of its maximum queue size.
This patch configures mgs to poll the sps every 2s rather than every 1s, halving the volume of the spikiest oximeter producer. We also add notes to the relevant constants explaining how they should be sized, and what might cause us to change them in the future.
Note: my original plan was to increase the size of the oximeter database queue, but if we don't identify any downsides to polling the sps every 2s rather than every 1s, this change is safer.
Part of #10552.