Skip to content

kvserver: attribute recent replica cpu usage #90589

@kvoli

Description

@kvoli

This issue is to attribute and record the amount of time spent scheduled on a processor for each replica within a store. The purpose of recording cpu usage is to use as an input into allocation decisions pertaining to overload and load balance among nodes within a cluster.

The requirements for tracking are similar to the existing primary load statistic used for this purpose, QPS.

  • Recency bias: Recent CPU usage should be recorded, such that a summary statistic over a to be determined period can be produced (see replica_stats)
  • Accounting: As many possible code entry and exit points cpu time be attributed solely to a replica should be recorded, for the sake of accuracy.

A proof of concept cpu time attribution exists here: https://github.com/kvoli/cockroach/tree/220314.kvoli-cputime

Jira issue: CRDB-20850

Epic CRDB-20845

Metadata

Metadata

Assignees

Labels

A-kv-distributionRelating to rebalancing and leasing.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-kvKV Team

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions