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

sql: turning off DistSQL gives 7.5% qps boost on oltp_read_only (conjecture: 3.5% cpu on oltp_read_write) #135898

Open tbg opened 11 hours ago

tbg commented 11 hours ago

In an ad-hoc experiment, changing sql.defaults.distsql to off resulted in a 7.5 improvement in qps, from around 40k to around 43k.^1

DistSQL is likely used for the sysbench "range" queries, which scan 100 consecutive keys. It likely makes no sense to use DistSQL here, as the overhead does not get amortized. There are no unbounded scans here either.

Epic: CRDB-42584

Jira issue: CRDB-44780