cockroachdb / cockroachdb/cockroach
kvserver: maybeAddRangeInfoToResponse called frequently under sysbench (0.1% cpu)
Open
branch-master
C-performance
o-perf-efficiency
P-3
T-kv
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Potentially on each request. I saw this take >3% on a blocking profile and it shows up on the CPU profile as well.
I ran `BenchmarkSysbench/SQL/3node/oltp_read_write-1` with `-test.benchtime=1000x` and it printed 520 times, i.e. around 52k invocations.
```
if rand.Intn(100) == 1 {
fmt.Fprintln(os.Stderr, "NOW")
}
```
This suggests that we have a caching problem, and this function isn't cheap.
Epic CRDB-55523
Jira issue: CRDB-44725
Contributor guide
Assessment
This issue has not been assessed yet.