Skip to content

Commit

Permalink
kv: bump kv.range_merge.queue_interval to 5s
Browse files Browse the repository at this point in the history
Informs cockroachdb#62700.

This commit bumps the default value for the `kv.range_merge.queue_interval`
cluster setting from 1s to 5s. This setting serves as a per-store rate limit on
the number of range merges that will be initiated. We've seen in a few issues
like cockroachdb#62700 that excessive range merge traffic can cause instability in a
cluster. There's very little reason to be aggressive about range merging, as
range merges are rarely needed with any urgency. However, there are good reasons
to be conservative about them.

This change can also be justified as a (late) reaction to the increased max
range size from 64MB to 512MB. A range merge may need to rebalance replicas in a
range, so its cost can be a function of the sizes of ranges. This means that if
range merges are now more expensive, we should be running them less frequently.
  • Loading branch information
nvanbenschoten committed Apr 26, 2021
1 parent 3fcf931 commit e668bfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kv/kvserver/merge_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const (
var MergeQueueInterval = settings.RegisterDurationSetting(
"kv.range_merge.queue_interval",
"how long the merge queue waits between processing replicas",
time.Second,
5*time.Second,
settings.NonNegativeDuration,
)

Expand Down

0 comments on commit e668bfe

Please sign in to comment.