Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do performance tests between cassandra and mysql?

I am interested in doing some performance query tests in MySQL and Cassandra based on the same dataset and using only one node

What I want is to check the response time to queries in Cassandra and MySQL for different types of data volume and also with multiple data access. (try stressing the database).

What better way to do this? And what is the most appropriate benchmark for this?

like image 380
Pedro Cunha Avatar asked Dec 02 '25 15:12

Pedro Cunha


1 Answers

First, I'll try to answer your question.

Most people stress cassandra using the cassandra-stress tool, which will be more than useless at testing MySQL. You'll need to find some generic tool (say, YCSB) that services both MySQL and Cassandra, and then compare those the best you can. YCSB is at https://github.com/brianfrankcooper/YCSB/wiki , and you can probably google for more options.

That said, if you're comparing single machine performance, you're looking at the wrong thing. That's not why people use Cassandra - MySQL is probably as fast, or faster, than Cassandra, when you compare a single node at a time, and SQL is going to be far more developer friendly than CQL (JOINs can be really nice). However, Cassandra is designed for use cases where data doesn't fit on one machine, and indeed, may not fit on a dozen machines. It's designed for scenarios where you need multi-datacenter active/active HA. It's designed for use cases where you need to be able to scale up and scale down over time, adding and removing nodes to match your load. Those are all things that are very difficult to do with MySQL and nearly trivial with Cassandra.

If you're JUST comparing speed, you may not need Cassandra at all. Choosing Cassandra should be about choosing use case - mostly scalability and HA.

like image 192
Jeff Jirsa Avatar answered Dec 04 '25 07:12

Jeff Jirsa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!