Difficulty: Beginner
Estimated Time: 10-15 minutes

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!

ver 0.007

In this scenario, we learned how to:

  • Install NoSQLBench
  • Create a test schema
  • Write some test data
  • Perform a benchmark test
  • Understand the test results

Of course, we've only scratched the surface. Here's a link for a deeper dive.

Hot Topic: NoSQLBench

Step 1 of 5

Install NoSQLBench

Installing NoSQLBench on your Linux platform is easy. Before you get started, you will want to have Cassandra installed and running.

nodetool status

We'll start by downloading the NoSQLBench executable called nb. You can find the releases here.

We've copied the link address for the latest executable. Here's the command to download it.

wget https://github.com/nosqlbench/nosqlbench/releases/latest/download/nb

We need to make sure we can execute nb.

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.

./nb cql-iot

If you want to save time, feel free to stop the benchmark before it's done.

# Ctrl+C

In the next few steps, we'll explain much more about nb. 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;"

That's all there is to it! You're already running NoSQLBench!