Before you deploy, you want to do load testing! NoSQLBench is a great tool to help you do that.
In this scenario, we'll learn how to:
- Install NoSQLBench
- Create a test schema
- Write some test data
- Perform a benchmark test
- Understand the test results
NoSQLBench is a great load-testing tool! We'll get you started!
Check out our datastax.com/dev site, where you can find many more resources to help you succeed with Apache Cassandra™.
Run your first NoSQLBench benchmark against Cassandra
Installing NoSQLBench on your Linux platform is easy. Before you get started, you will want to have Cassandra installed and running.
We'll start by downloading the NoSQLBench executable called
You can find the releases here.
We've copied the link address for the latest executable. Here's the command to download it.
We need to make sure we can execute
chmod +x nb
Let's try running it just to see it work. This will run for a few minutes, and you won't see any output. Benchmarks take a while to run because you want to see how the workload impacts the system over time. Later, we'll show you how to make the benchmark give you feedback as it proceeds, but the point of this exercise is to show you the simplest form of running a benchmark.
If you want to save time, feel free to stop the benchmark before it's done.
In the next few steps, we'll explain much more about
For now, just know that you just ran a pre-packaged benchmark.
ProTip: We are currently running NoSQLBench on the same machine as the Cassandra instance. But you can target a cluster on different machines by using the
host=<host-or-ip> parameter to the
nb command (and replacing the
<host-or-ip> with the, uh, host or IP address - but maybe we didn't need to explain that part).
This benchmark created a keyspace. Let's delete it just to keep things clean.
cqlsh -e "DROP KEYSPACE baselines;"