Performance Comparison of YugabyteDB and CockroachDB
An objective performance comparison between YugabyteDB (v1.3.0.0) and CockroachDB (v19.1.3) was conducted using the official test scenarios, covering write, read, mixed, secondary index, and transactional workloads on a three‑node Docker environment, with analysis of results and conclusions on their relative strengths.
Test Objective The official test report was questioned, prompting an independent and objective performance comparison of the latest releases of YugabyteDB and CockroachDB.
Test Methodology The comparison reused the official test scenarios and tools (yb‑sample‑apps). YugabyteDB version 1.3.0.0 (official test used 1.1.0) and CockroachDB version 19.1.3 (official test used 2.1.3) were deployed in a three‑node Docker environment on CentOS 7.6 with 8 CPU cores, 16 GB RAM and a 500 GB SSD. Workloads included write (CassandraKeyValue/SqlInserts), read, mixed read‑write, secondary‑index write and query, and explicit transactional writes. Data sizes were 50 million rows for the first three scenarios and 5 million rows for the others, matching the official conditions. YugabyteDB was accessed via YCQL (Cassandra‑compatible) while CockroachDB used the PostgreSQL protocol; attempts to use YugabyteDB’s YSQL (beta) failed due to time‑out errors.
Isolation Levels YugabyteDB tests used Snapshot isolation (the only level supported by YCQL). CockroachDB supports Serializable isolation, which is theoretically stricter and may incur slightly lower performance.
Test Statistics Results were captured for each workload and presented as images (write, read, mixed, secondary‑index, and transaction scenarios). The figures show performance ratios of YugabyteDB to CockroachDB for each metric.
Test Analysis By calculating the YugabyteDB/CockroachDB ratio for each workload, the following observations were made:
In implicit‑transaction, non‑index scenarios, YugabyteDB’s read‑write performance exceeds CockroachDB’s.
With implicit transactions and secondary indexes, YugabyteDB’s read performance is better, while write performance is roughly equivalent (≈1:1).
For explicit transactions without secondary indexes, YugabyteDB’s write performance is lower than CockroachDB’s, and CockroachDB demonstrates superior write‑stability.
Conclusion The independent benchmark indicates that YugabyteDB generally outperforms CockroachDB in read‑heavy and non‑indexed workloads, matches it on indexed writes, but lags behind in explicit transactional writes and stability, contrasting with the official vendor‑provided results.
JD Retail Technology
Official platform of JD Retail Technology, delivering insightful R&D news and a deep look into the lives and work of technologists.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.