3

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?

Pedro Cunha
  • 401
  • 1
  • 6
  • 16
  • 1
    Which is better, a wheelbarrow or a shopping cart? My point is -- they are designed for different use cases. Either can win _or_ lose a performance test based on the use case you pick. – Rick James Nov 01 '15 at 21:10

1 Answers1

6

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.

Jeff Jirsa
  • 4,391
  • 11
  • 24
  • Yes, I understand what you're saying. My goal is to make sure how behaves Cassandra compared to MySQL while data volume increases and access to data is greater. YCSB allows you to select existing tables and verify the performance of some queries already created? – Pedro Cunha Oct 26 '15 at 11:13
  • For existing data, look at the metrics exposed via JMX, or export your own from the application to compare. Most modern production apps should be doing that these days anyway - look at tools like graphite/statsd for hints (or read this blog to start: https://codeascraft.com/2011/02/15/measure-anything-measure-everything/ ) – Jeff Jirsa Oct 26 '15 at 20:27