Skip to content

metric: optimize Histogram.RecordValue (1.2% cpu on sysbench) #133306

@tbg

Description

@tbg

on current master, histogram observations account for >1% of cpu.1
This may be due to the bucket count, though the profile only spends a portion of the time in the bucket search.
Sadly most of the time is spent in dependencies. Still, this is a sizeable chunk of CPU.

https://pprof.me/fcd1cbfe64d478dd1e6211970ff9107e/?profileType=profile%253Acpu%253Ananoseconds%253Acpu%253Ananoseconds%253Adelta&filter_by_function=Observe&search_string=Observe

image

Jira issue: CRDB-43623

Footnotes

  1. https://github.com/cockroachlabs/perf-efficiency-team/pull/4/commits

Metadata

Metadata

Assignees

Labels

C-performancePerf of queries or internals. Solution not expected to change functional behavior.P-2Issues/test failures with a fix SLA of 3 monthsT-observabilitybranch-masterFailures and bugs on the master branch.o-perf-efficiencyRelated to performance efficiency

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions