CRDB Transaction Load

Hello,

We are testing CRDB in the last couple of days.

Our application has lots of transaction and updates, around 2000~ inserts or update per second.

We deployed 9 nodes cluster, with m3.2xlarge (ebs optimize), and we got poor result. (see the attached screenshots).

Each transaction has 100 inserts/update.

Not sure if we can tune the cluster, but we sure can optimize the queries. Any suggestions?

Thanks,
Roey

What does your schema look like? Secondary indexes and foreign keys currently make inserts and updates relatively slow, so minimizing those will improve write performance. If your schema is hierarchical, using interleaved tables can improve performance significantly.

Key distribution is very important for performance: it’s best if rows being modified in the same transaction have primary keys that are near each other, and rows being modified in different transactions have primary keys that are far from each other. It’s usually better to err on the side of scattering your keys randomly (e.g. use uuid_v4() as a primary key instead of SERIAL unless your query patterns benefit from the temporal ordering that SERIAL provides).

We did the test with only one table, which has the id as primary key (uuid v4).