cockroachdb / cockroachdb/cockroach

server: introduce peak detection as a signal for taking cpu profiles

Open
#95,836 0 comments 0 reactions 0 assignees View on GitHub
C-enhancement
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Is your feature request related to a problem? Please describe.**
Relates to discussion from #95623.

**Describe the solution you'd like**
It would be better if taking a cpu profile also considered a sudden peak in cpu usage as they are sometimes seen in support escalations and those who are triaging the issue cannot determine why the peak occurred. Having a cpu profile taken at this point could help clarify what the cause of the peak is.

Something like https://github.com/MicahParks/peakdetect/blob/master/peakdetect.go could be implemented for peak detection.

**Describe alternatives you've considered**
Storing the last `CPUCombinedPercentNorm` value and comparing it to the current value was considered but it may not be as accurate as a peak detection implementation.

**Additional context**
Add any other context or screenshots about the feature request here.

Jira issue: CRDB-23770

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.