Skip to content

kvserver: consolidate replica load accounting #87187

@kvoli

Description

@kvoli

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-kv-distributionRelating to rebalancing and leasing.C-enhancementSolution 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.T-kvKV Team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions