4 ms·
(Cockroach Labs CTO here) Jepsen is essentially a worst-case stress test for a consistent database: all the transactions conflict with each other. CockroachDB'
by bdarnell 10y ago
(Cockroach Labs CTO here)
Jepsen is essentially a worst-case stress test for a consistent database: all the transactions conflict with each other. CockroachDB's optimistic concurrency control performs worse with this kind of workload than the pessimistic (lock-based) concurrency control seen in most non-distributed databases. But this high-contention scenario is not the norm for most databases. Most transactions don't conflict with each other and can proceed without waiting. Without contention, CockroachDB can serve thousands of reads or writes per second per node (and depending on access patterns, can scale linearly with the number of nodes).
And of course, we're continually working on performance (it's our main focus as we work towards 1.0), and things will get better on both the high- and low-contention scenarios. Just today we're about to land a major improvement for many high-contention tests, although it didn't speed up the jepsen tests as much as we had hoped.
- bfrog 10y agoCouldn't this be a problem for application authors and a potential source of DoS activities? It seems this should be a big red warning flag somewhere.
- stickfigure 10y agoNot really. All databases tend to struggle to under contention. If you are an application author building a high-scale app, you need to avoid contention by design. That single counter row you were planning to increment on every visit? Bad idea; maybe insert a new visit record instead. The contention in this example is an aspect of the test design, not database design. You wouldn't try to build an app this way.
- ej_campbell 10y agoIt'd only be a DOS vector, if the rest of the db bogged down during this type of contention.
- andymans 10y agoI can verify. I've been testing with node.js's pg client (not even using the 'native' option) and on 1 node I get > 1,000 single inserts /sec. I'm seeing this scale linearly too. NB I'm testing on a pretty overloaded macbook with only 8gb RAM. On a decent-sized cluster with production-grade hardware and network, performance is really unlikely to be a bottleneck. Also, it'll significantly improve during this year, one imagines.