cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.16k stars 3.82k forks source link

ts: maintaining time series costs a few percent of sysbench oltp_read_only throughput #135901

Open tbg opened 10 hours ago

tbg commented 10 hours ago

Not a scientific experiment, but: throughput on oltp_read_only with all background work and timeseries disabled is very stable, with timeseries enabled throughput oscillates between 41k and 43k. The effect is likely larger in practice in long-running clusters, as timeseries roll-ups and pruning also kicks in.

There is a direct effect of consuming CPU for these writes, but also timeseries writes were observed to contribute 7mb/s of steady state write traffic to disk, with bursty writes into the 70+mb/s range likely caused by compactions. Compactions occupy CPU for 10s of ms and thus significantly reduce the amount of foreground work the system can do.

TODO: run a more representative experiment.

SHA was 6a7b1e20e70c0ba8e6bb7a42d52512d9437cd75b

Epic: CRDB-42584

Jira issue: CRDB-44781