I am doing some basic load testing against cockroachDB, mongoDB and Aurora. I just have a project which can keep read/write into one of those three DBs. In that project, we can configure groutine numbers about read/write so that we can mimic different test scenarios: read-heavy, write-heavy, balanced.
The result shows cockroachDB's performance is terrible compared to another two. I don't expected cockroachDB performance is that bad. Wondering some tricky settings may be needed to be configured for cockroachDB. Any suggestions? Thanks forks!

Balanced traffic: 500 write: 500 read. This is the avg operation per second:
Heavy write traffic: 1000 write: 100 read. This is the avg operation per second:
Heavy write traffic: 100 write: 1000 read. This is the avg operation per second:
The default transaction isolation level in cockroachDB is SERIALIZABLE, which is stronger than Aurora's default transaction isolation level of "REPEATABLE_READ", which explains the reduced write performance under load. CockroachDB is doing extra work to "coordinate" the write transactions, ordering them in a way that produces an output as if they were executed in sequence. From the CockroachDB docs:
"In contrast to most databases, CockroachDB offers SERIALIZABLE isolation by default, which is the strongest of the four transaction isolation levels defined by the SQL standard and is stronger than the SNAPSHOT isolation level developed later. SERIALIZABLE isolation guarantees that even though transactions may execute in parallel, the result is the same as if they had executed one at a time, without any concurrency. This ensures data correctness by preventing all "anomalies" allowed by weaker isolation levels."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With