From 11ede155390f14df3f912428281d1245c3e11543 Mon Sep 17 00:00:00 2001 From: Austen McClernon Date: Wed, 30 Oct 2024 17:20:49 +0000 Subject: [PATCH] kvflowcontrol: set kvadmission.flow_control.mode default to apply_to_all With testing now in place, this commit changes the default cluster setting value of `kvadmission.flow_control.mode` from `apply_to_elastic`, to `apply_to_all`. Now by default, regular work will be subject to replication admission control, whereby a quorum will be allowed to proceed, queuing entries to any non-quorum required replica, when send tokens are exhausted. For more details, see #123509. Resolves: #133838 Release note (performance improvement): Regular writes are now subject to admission control by default, meaning that non-quorum required replicas may not be told about new writes from the leader if they are unable to keep up. This brings a large performance improvement during instances where there is a large backlog of replication work towards a subset of node(s), such as node restarts. The setting can be reverted to the <=24.3 default by setting `kvadmission.flow_control.mode` to `apply_to_elastic`. --- docs/generated/metrics/metrics.html | 5 +++++ pkg/kv/kvserver/kvflowcontrol/kvflowcontrol.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/generated/metrics/metrics.html b/docs/generated/metrics/metrics.html index a03d1d3dbe4c..92365efaacd4 100644 --- a/docs/generated/metrics/metrics.html +++ b/docs/generated/metrics/metrics.html @@ -19,6 +19,7 @@ STORAGEadmission.admitted.kv-stores.high-priNumber of requests admittedRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE STORAGEadmission.admitted.kv-stores.locking-normal-priNumber of requests admittedRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE STORAGEadmission.admitted.kv-stores.normal-priNumber of requests admittedRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE +STORAGEadmission.admitted.kv-stores.user-high-priNumber of requests admittedRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE STORAGEadmission.admitted.kv.high-priNumber of requests admittedRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE STORAGEadmission.admitted.kv.locking-normal-priNumber of requests admittedRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE STORAGEadmission.admitted.kv.normal-priNumber of requests admittedRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE @@ -54,6 +55,7 @@ STORAGEadmission.errored.kv-stores.high-priNumber of requests not admitted due to errorRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE STORAGEadmission.errored.kv-stores.locking-normal-priNumber of requests not admitted due to errorRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE STORAGEadmission.errored.kv-stores.normal-priNumber of requests not admitted due to errorRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE +STORAGEadmission.errored.kv-stores.user-high-priNumber of requests not admitted due to errorRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE STORAGEadmission.errored.kv.high-priNumber of requests not admitted due to errorRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE STORAGEadmission.errored.kv.locking-normal-priNumber of requests not admitted due to errorRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE STORAGEadmission.errored.kv.normal-priNumber of requests not admitted due to errorRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE @@ -101,6 +103,7 @@ STORAGEadmission.requested.kv-stores.high-priNumber of requestsRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE STORAGEadmission.requested.kv-stores.locking-normal-priNumber of requestsRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE STORAGEadmission.requested.kv-stores.normal-priNumber of requestsRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE +STORAGEadmission.requested.kv-stores.user-high-priNumber of requestsRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE STORAGEadmission.requested.kv.high-priNumber of requestsRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE STORAGEadmission.requested.kv.locking-normal-priNumber of requestsRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE STORAGEadmission.requested.kv.normal-priNumber of requestsRequestsCOUNTERCOUNTAVGNON_NEGATIVE_DERIVATIVE @@ -128,6 +131,7 @@ STORAGEadmission.wait_durations.kv-stores.high-priWait time durations for requests that waitedWait time DurationHISTOGRAMNANOSECONDSAVGNONE STORAGEadmission.wait_durations.kv-stores.locking-normal-priWait time durations for requests that waitedWait time DurationHISTOGRAMNANOSECONDSAVGNONE STORAGEadmission.wait_durations.kv-stores.normal-priWait time durations for requests that waitedWait time DurationHISTOGRAMNANOSECONDSAVGNONE +STORAGEadmission.wait_durations.kv-stores.user-high-priWait time durations for requests that waitedWait time DurationHISTOGRAMNANOSECONDSAVGNONE STORAGEadmission.wait_durations.kv.high-priWait time durations for requests that waitedWait time DurationHISTOGRAMNANOSECONDSAVGNONE STORAGEadmission.wait_durations.kv.locking-normal-priWait time durations for requests that waitedWait time DurationHISTOGRAMNANOSECONDSAVGNONE STORAGEadmission.wait_durations.kv.normal-priWait time durations for requests that waitedWait time DurationHISTOGRAMNANOSECONDSAVGNONE @@ -155,6 +159,7 @@ STORAGEadmission.wait_queue_length.kv-stores.high-priLength of wait queueRequestsGAUGECOUNTAVGNONE STORAGEadmission.wait_queue_length.kv-stores.locking-normal-priLength of wait queueRequestsGAUGECOUNTAVGNONE STORAGEadmission.wait_queue_length.kv-stores.normal-priLength of wait queueRequestsGAUGECOUNTAVGNONE +STORAGEadmission.wait_queue_length.kv-stores.user-high-priLength of wait queueRequestsGAUGECOUNTAVGNONE STORAGEadmission.wait_queue_length.kv.high-priLength of wait queueRequestsGAUGECOUNTAVGNONE STORAGEadmission.wait_queue_length.kv.locking-normal-priLength of wait queueRequestsGAUGECOUNTAVGNONE STORAGEadmission.wait_queue_length.kv.normal-priLength of wait queueRequestsGAUGECOUNTAVGNONE diff --git a/pkg/kv/kvserver/kvflowcontrol/kvflowcontrol.go b/pkg/kv/kvserver/kvflowcontrol/kvflowcontrol.go index 7662f094e341..787135be44ed 100644 --- a/pkg/kv/kvserver/kvflowcontrol/kvflowcontrol.go +++ b/pkg/kv/kvserver/kvflowcontrol/kvflowcontrol.go @@ -41,7 +41,7 @@ var Mode = settings.RegisterEnumSetting( settings.SystemOnly, "kvadmission.flow_control.mode", "determines the 'mode' of flow control we use for replication traffic in KV, if enabled", - modeDict[ApplyToElastic], /* default value */ + modeDict[ApplyToAll], /* default value */ modeDict, )