-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
131857: .*: introduce send queue and range controller metrics r=sumeerbhola a=kvoli The following metrics are introduced: ``` -- send queue token metrics kvflowcontrol.tokens.send.regular.deducted.prevent_send_queue (counter) kvflowcontrol.tokens.send.elastic.deducted.prevent_send_queue (counter) kvflowcontrol.tokens.send.elastic.deducted.force_flush_send_queue (counter) -- range controller metrics kvflowcontrol.range_controller.count (gauge) -- send queue metrics kvflowcontrol.send_queue.bytes (gauge) kvflowcontrol.send_queue.count (gauge) kvflowcontrol.send_queue.prevent.count (counter) kvflowcontrol.send_queue.scheduled.deducted_bytes (gauge) kvflowcontrol.send_queue.scheduled.force_flush (gauge) ``` The follower related metric names are updated from: ``` kvflowcontrol.tokens.eval.regular.disconnected kvflowcontrol.tokens.eval.elastic.disconnected kvflowcontrol.tokens.send.regular.disconnected kvflowcontrol.tokens.send.elastic.disconnected ``` To: ``` kvflowcontrol.tokens.eval.regular.returned.disconnect kvflowcontrol.tokens.eval.elastic.returned.disconnect kvflowcontrol.tokens.send.regular.returned.disconnect kvflowcontrol.tokens.send.elastic.returned.disconnect ``` In order to align with the format of having a general metric `(deducted|returned)`, accounting for all token deductions or returns, and a series of metrics which break down the deduction or return further, using a suffix to denote the reason. The `SendStreamStats` method is also split into two methods: ``` SendStreamStatsRaftMuLocked BasicSendStreamStats ``` In order to enable efficient send queue gauge update calls, and any future allocator interaction which requires the send queue size (bytes|count). The allocator now uses `BasicSendStreamStats`, while metrics uses the more expensive `SendStreamStatsRaftMuLocked` Resolves: #131752 Release note (ops change): Metrics representing the state of the replication flow control send queue's are added, which when the following settings are set to: ``` kvadmission.flow_control.mode = "apply_to_all" kvadmission.flow_control.enabled = true ``` Will be populated using the corresponding replication admission control send queue state. Also note, the disconnected metric name is renamed, see the commit message and the metric name diff below for further information. ```diff diff --git a/pkg/kv/kvserver/kvflowcontrol/rac2/testdata/simulation/metric_names b/pkg/kv/kvserver/kvflowcontrol/rac2/testdata/simulation/metric_names index c0b4755f1eb..96b237bb57f 100644 --- a/pkg/kv/kvserver/kvflowcontrol/rac2/testdata/simulation/metric_names +++ b/pkg/kv/kvserver/kvflowcontrol/rac2/testdata/simulation/metric_names `@@` -20,6 +20,12 `@@` kvflowcontrol.eval_wait.regular.requests.admitted kvflowcontrol.eval_wait.regular.requests.bypassed kvflowcontrol.eval_wait.regular.requests.errored kvflowcontrol.eval_wait.regular.requests.waiting +kvflowcontrol.range_controller.count +kvflowcontrol.send_queue.bytes +kvflowcontrol.send_queue.count +kvflowcontrol.send_queue.prevent.count +kvflowcontrol.send_queue.scheduled.deducted_bytes +kvflowcontrol.send_queue.scheduled.force_flush kvflowcontrol.streams.eval.elastic.blocked_count kvflowcontrol.streams.eval.elastic.total_count kvflowcontrol.streams.eval.regular.blocked_count `@@` -30,21 +36,24 `@@` kvflowcontrol.streams.send.regular.blocked_count kvflowcontrol.streams.send.regular.total_count kvflowcontrol.tokens.eval.elastic.available kvflowcontrol.tokens.eval.elastic.deducted -kvflowcontrol.tokens.eval.elastic.disconnected kvflowcontrol.tokens.eval.elastic.returned +kvflowcontrol.tokens.eval.elastic.returned.disconnect kvflowcontrol.tokens.eval.elastic.unaccounted kvflowcontrol.tokens.eval.regular.available kvflowcontrol.tokens.eval.regular.deducted -kvflowcontrol.tokens.eval.regular.disconnected kvflowcontrol.tokens.eval.regular.returned +kvflowcontrol.tokens.eval.regular.returned.disconnect kvflowcontrol.tokens.eval.regular.unaccounted kvflowcontrol.tokens.send.elastic.available kvflowcontrol.tokens.send.elastic.deducted -kvflowcontrol.tokens.send.elastic.disconnected +kvflowcontrol.tokens.send.elastic.deducted.force_flush_send_queue +kvflowcontrol.tokens.send.elastic.deducted.prevent_send_queue kvflowcontrol.tokens.send.elastic.returned +kvflowcontrol.tokens.send.elastic.returned.disconnect kvflowcontrol.tokens.send.elastic.unaccounted kvflowcontrol.tokens.send.regular.available kvflowcontrol.tokens.send.regular.deducted -kvflowcontrol.tokens.send.regular.disconnected +kvflowcontrol.tokens.send.regular.deducted.prevent_send_queue kvflowcontrol.tokens.send.regular.returned +kvflowcontrol.tokens.send.regular.returned.disconnect kvflowcontrol.tokens.send.regular.unaccounted ``` Co-authored-by: Austen McClernon <[email protected]>
- Loading branch information
Showing
56 changed files
with
3,581 additions
and
2,357 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.