cockroachdb / cockroachdb/cockroach

kvserver: maybeAddRangeInfoToResponse called frequently under sysbench (0.1% cpu)

Open
#135,806 1 comment 0 reactions 0 assignees View on GitHub
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.

image

Epic CRDB-55523
Jira issue: CRDB-44725

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.