Skip to content
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

kvserver: enable cpu balancing by default #97424

Merged
merged 1 commit into from
Feb 22, 2023

Conversation

kvoli
Copy link
Collaborator

@kvoli kvoli commented Feb 21, 2023

This commit switches the default load based rebalancing objective from qps to cpu. A performance comparison can be found on #90590.

resolves: #90582

Release note (ops change): CPU balancing is enabled as the default load based rebalancing objective. This can be reverted by setting kv.allocator.load_based_rebalancing.objective to qps.

@blathers-crl
Copy link

blathers-crl bot commented Feb 21, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@kvoli kvoli force-pushed the 230221.enable-cpu-balancing branch from 8f23d19 to c8a8b91 Compare February 21, 2023 22:47
This commit switches the default load based rebalancing objective from
`qps` to `cpu`. A performance comparison can be found on cockroachdb#90590.

resolves: cockroachdb#90582

Release note (ops change): CPU balancing is enabled as the default load
based rebalancing objective. This can be reverted by setting
`kv.allocator.load_based_rebalancing.objective` to `qps`.
@kvoli kvoli force-pushed the 230221.enable-cpu-balancing branch from c8a8b91 to 8b202b9 Compare February 21, 2023 22:55
@kvoli kvoli marked this pull request as ready for review February 21, 2023 23:01
@kvoli kvoli requested a review from a team as a code owner February 21, 2023 23:01
@kvoli kvoli self-assigned this Feb 21, 2023
@kvoli
Copy link
Collaborator Author

kvoli commented Feb 22, 2023

bors r=nvanbenschoten

@craig
Copy link
Contributor

craig bot commented Feb 22, 2023

Build succeeded:

@craig craig bot merged commit fb1b2ec into cockroachdb:master Feb 22, 2023
kvoli added a commit to kvoli/cockroach that referenced this pull request Feb 23, 2023
This commit updates the clusters used in `splits/load` roachtests to use
QPS load based splitting, rather than CPU, which was enabled by default
in cockroachdb#97424.

These tests were failing as they assumed QPS load based splitting when
calculating the number of final ranges to assert against.

These tests should be run against all load based split objectives, this
is tracked in cockroachdb#97540.

Resolves: cockroachdb#97494
Resolves: cockroachdb#97455
Informs:  cockroachdb#97540

Release note: None
craig bot pushed a commit that referenced this pull request Feb 23, 2023
97542: roachtest: use qps splitting for splits/load tests r=shralex a=kvoli

This commit updates the clusters used in `splits/load` roachtests to use
QPS load based splitting, rather than CPU, which was enabled by default
in #97424.

These tests were failing as they assumed QPS load based splitting when
calculating the number of final ranges to assert against.

These tests should be run against all load based split objectives, this
is tracked in #97540.

Resolves: #97494
Resolves: #97455
Informs:  #97540

Co-authored-by: Austen McClernon <[email protected]>
kvoli added a commit to kvoli/cockroach that referenced this pull request Mar 27, 2023
We introduced CPU balancing by default in cockroachdb#97424. This had the side
effect of changing the hot ranges api to return the hottest replicas by
CPU, rather than QPS.

This patch updates the replica rankings struct to support tracking both
by CPU and QPS simultaneously. The hot ranges API collects the top k by
QPS and the store rebalancer collects depending on the setting of
`kv.allocator.load_based_rebalancing.objective`, which is by default
`cpu`.

Resolves: cockroachdb#99605

Release note (bug fix): The hot ranges UI page would show hot ranges by
CPU and not QPS, depending on the value of
`kv.allocator.load_based_rebalancing.objective` (default `cpu`). Now the
UI page will always collect based on QPS.
kvoli added a commit to kvoli/cockroach that referenced this pull request Mar 28, 2023
We introduced CPU balancing by default in cockroachdb#97424. This had the side
effect of changing the hot ranges api to return the hottest replicas by
CPU, rather than QPS.

This patch updates the replica rankings struct to support tracking both
by CPU and QPS simultaneously. The hot ranges API collects the top k by
QPS and the store rebalancer collects depending on the setting of
`kv.allocator.load_based_rebalancing.objective`, which is by default
`cpu`.

Resolves: cockroachdb#99605

Release note (bug fix): The hot ranges UI page would show hot ranges by
CPU and not QPS, depending on the value of
`kv.allocator.load_based_rebalancing.objective` (default `cpu`). Now the
UI page will always collect based on QPS.
kvoli added a commit to kvoli/cockroach that referenced this pull request Mar 30, 2023
We introduced CPU balancing by default in cockroachdb#97424. This had the side
effect of changing the hot ranges api to return the hottest replicas by
CPU, rather than QPS.

This patch updates the replica rankings struct to support tracking both
by CPU and QPS simultaneously. The hot ranges API collects the top k by
QPS and the store rebalancer collects depending on the setting of
`kv.allocator.load_based_rebalancing.objective`, which is by default
`cpu`.

Resolves: cockroachdb#99605

Release note (bug fix): The hot ranges UI page would show hot ranges by
CPU and not QPS, depending on the value of
`kv.allocator.load_based_rebalancing.objective` (default `cpu`). Now the
UI page will always collect based on QPS.
craig bot pushed a commit that referenced this pull request Mar 30, 2023
99669: roachtest: bump jepsen version r=smg260 a=renatolabs

This commit bumps the jepsen version now to include a fix that allows
jepsen to set custom range sizes. See:

cockroachdb/jepsen#34

Epic: none

Release note: None

99716: kvserver: use qps for hot ranges sorting r=koorosh a=kvoli

We introduced CPU balancing by default in #97424. This had the side effect of changing the hot ranges api to return the hottest replicas by CPU, rather than QPS.

This patch updates the replica rankings struct to support tracking both by CPU and QPS simultaneously. The hot ranges API collects the top k by QPS and the store rebalancer collects depending on the setting of `kv.allocator.load_based_rebalancing.objective`, which is by default `cpu`.

Resolves: #99605


Co-authored-by: Renato Costa <[email protected]>
Co-authored-by: Austen McClernon <[email protected]>
blathers-crl bot pushed a commit that referenced this pull request Mar 30, 2023
We introduced CPU balancing by default in #97424. This had the side
effect of changing the hot ranges api to return the hottest replicas by
CPU, rather than QPS.

This patch updates the replica rankings struct to support tracking both
by CPU and QPS simultaneously. The hot ranges API collects the top k by
QPS and the store rebalancer collects depending on the setting of
`kv.allocator.load_based_rebalancing.objective`, which is by default
`cpu`.

Resolves: #99605

Release note (bug fix): The hot ranges UI page would show hot ranges by
CPU and not QPS, depending on the value of
`kv.allocator.load_based_rebalancing.objective` (default `cpu`). Now the
UI page will always collect based on QPS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kvserver: allocator cpu balancing for overload protection
3 participants