cockroachdb / cockroachdb/cockroach

kvserver: `(*kvserver.Store).Capacity` is allocation heavy

Open
#158,288 2 comments 0 reactions 0 assignees View on GitHub
A-kv A-kv-distribution branch-master C-bug T-kv
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

During an IMPORT of the 'bank' workload, I looked at a heap profile of recent allocations (attached). 33% of all allocations were from `(*kvserver.Store).Capacity`. It appears that individual comparisons during operation of a priority queue may allocate. This was on a recent master-branch SHA (9f20d4007192b7d2780d2029e6437f9e471983df).

Image

[profile (1).pb.gz](https://github.com/user-attachments/files/23731585/profile.1.pb.gz)

Jira issue: CRDB-57218

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.