-
Notifications
You must be signed in to change notification settings - Fork 4.1k
kvserver: consolidate replica load accounting #87187
Copy link
Copy link
Open
Labels
A-kv-distributionRelating to rebalancing and leasing.Relating to rebalancing and leasing.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)E-starterMight be suitable for a starter project for new employees or team members.Might be suitable for a starter project for new employees or team members.T-kvKV TeamKV Team
Description
Is your feature request related to a problem? Please describe.
The replica stats struct is instantiated for different dimensions of load accounting, for a replica. These are contained within replica load:
cockroach/pkg/kv/kvserver/replica_load.go
Lines 20 to 27 in ced56ad
| type ReplicaLoad struct { | |
| batchRequests *replicastats.ReplicaStats | |
| requests *replicastats.ReplicaStats | |
| writeKeys *replicastats.ReplicaStats | |
| readKeys *replicastats.ReplicaStats | |
| writeBytes *replicastats.ReplicaStats | |
| readBytes *replicastats.ReplicaStats | |
| } |
Every replica has this load accounting. It is desirable to reduce GC'able objects by allocating all replica load accounting memory together and once.
The solution is to migrate the different accounting fields into a single sliding window manager, which would contain all dimensions in each window - rather than maintaining separate window managers for each dimension.
Jira issue: CRDB-19199
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-kv-distributionRelating to rebalancing and leasing.Relating to rebalancing and leasing.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)E-starterMight be suitable for a starter project for new employees or team members.Might be suitable for a starter project for new employees or team members.T-kvKV TeamKV Team