-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
release-23.2: kv: bound minimum raft scheduler workers per store #120798
Merged
nvanbenschoten
merged 1 commit into
release-23.2
from
blathers/backport-release-23.2-120162
Apr 11, 2024
Merged
release-23.2: kv: bound minimum raft scheduler workers per store #120798
nvanbenschoten
merged 1 commit into
release-23.2
from
blathers/backport-release-23.2-120162
Apr 11, 2024
Conversation
This file contains 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
blathers-crl
bot
force-pushed
the
blathers/backport-release-23.2-120162
branch
from
March 20, 2024 23:27
374dd73
to
ba4a455
Compare
blathers-crl
bot
added
blathers-backport
This is a backport that Blathers created automatically.
O-robot
Originated from a bot.
labels
Mar 20, 2024
Thanks for opening a backport. Please check the backport criteria before merging:
If your backport adds new functionality, please ensure that the following additional criteria are satisfied:
Also, please add a brief release justification to the body of your PR to justify this |
blathers-crl
bot
added
the
backport
Label PR's that are backports to older release branches
label
Mar 20, 2024
erikgrinaker
approved these changes
Mar 21, 2024
Reminder: it has been 3 weeks please merge or close your backport! |
kvoli
approved these changes
Apr 11, 2024
In a448edc, we switched from replicating COCKROACH_SCHEDULER_CONCURRENCY on each store to evenly distributing the workers across each store. For example, in an 8-store, 32-vCPU node, the number of raft scheduler workers per store went from 96 to 12. This was done to avoid scheduler thrashing and excessive memory usage in many-store nodes. Unfortunately, we have seen that this change could also lead to situations where workers were spread so thin across stores in a many-store system that any single store's worker pool could not keep up with temporary imbalanced load. In extreme cases where the `PreIngestDelay` mechanism is kicking in, this could lead to high scheduler latency across replica on the store. This commit establishes an intermediate solution. We will continue to distribute workers across stores, but we will also ensure that each store has at least `COCKROACH_SCHEDULER_MIN_CONCURRENCY_PER_STORE` workers. This will prevents any single store from being able to absorb imbalanced load. The value defaults to `GOMAXPROCS`, so that in the previous example, each store would have at least 32 workers. Epic: None Release note (ops change): a minimum Raft scheduler concurrency is now enforced per store so that nodes with many stores do not spread workers too thin. This avoids high scheduler latency across replicas on a store when load is imbalanced.
nvanbenschoten
force-pushed
the
blathers/backport-release-23.2-120162
branch
from
April 11, 2024 21:41
ba4a455
to
d3f5e71
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport
Label PR's that are backports to older release branches
blathers-backport
This is a backport that Blathers created automatically.
no-backport-pr-activity
O-robot
Originated from a bot.
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.
Backport 1/1 commits from #120162 on behalf of @nvanbenschoten.
/cc @cockroachdb/release
In a448edc, we switched from replicating COCKROACH_SCHEDULER_CONCURRENCY on each store to evenly distributing the workers across each store. For example, in an 8-store, 32-vCPU node, the number of raft scheduler workers per store went from 96 to 12.
This was done to avoid scheduler thrashing and excessive memory usage in many-store nodes. Unfortunately, we have seen that this change could also lead to situations where workers were spread so thin across stores in a many-store system that any single store's worker pool could not keep up with temporary imbalanced load. In extreme cases where the
PreIngestDelay
mechanism is kicking in, this could lead to high scheduler latency across replica on the store.This commit establishes an intermediate solution. We will continue to distribute workers across stores, but we will also ensure that each store has at least
COCKROACH_SCHEDULER_MIN_CONCURRENCY_PER_STORE
workers. This will prevents any single store from being able to absorb imbalanced load. The value defaults toGOMAXPROCS
, so that in the previous example, each store would have at least 32 workers.Epic: None
Release note (ops change): a minimum Raft scheduler concurrency is now enforced per store so that nodes with many stores do not spread workers too thin. This avoids high scheduler latency across replicas on a store when load is imbalanced.
Release justification: avoids cluster instability with too few raft workers per store.