Benchmark performance with NoSqlBench

Use NoSQLBench for performance benchmarking of your Astra DB Classic databases. You can emulate real application workloads and direct them to your actual data stores for reliable, reproducible benchmarking and population of a database with sophisticated synthetic data.

Prerequisites

Configure NoSQLBench for Astra DB

To configure NB5 for Astra DB, you need to provide the following information in your driver configuration or directly in the console when you Run a scenario:

  • The path to the SCB

  • A username, or a file containing the username, which is the literal string token

  • A password, or a file containing the password, which is your application token

If you prefer to store your credentials in a file, rather than expose them in the console or log files, you can use the userfile and passfile options:

driver=cqld4
scb=PATH_TO_SCB_ZIP
userfile=PATH_TO_USERNAME_FILE
passfile=PATH_TO_TOKEN_FILE

If you plan to test multiple databases, you might find it helpful to place all the credentials in the same subdirectory:

driver=cqld4
scb=PATH_TO_CREDENTIALS_DIRECTORY/SCB_ZIP
userfile=PATH_TO_CREDENTIALS_DIRECTORY/USERNAME_FILE
passfile=PATH_TO_CREDENTIALS_DIRECTORY/TOKEN_FILE

Because the username is always token, you can use the same username file for all tests.

Run a scenario

Use the NB5 CLI to run a scenario and start benchmarking. You can use built-in scenarios or create your own workloads.

  • nb5 binary

  • nb5 jar

nb5 SCENARIO_NAME astra \
username=token \
password=ASTRA_DB_APPLICATION_TOKEN \
keyspace=KEYSPACE_NAME \
secureconnectbundle=PATH_TO_SCB_ZIP
java -jar nb5.jar SCENARIO_NAME astra \
username=token \
password=ASTRA_DB_APPLICATION_TOKEN \
keyspace=KEYSPACE_NAME \
secureconnectbundle=PATH_TO_SCB_ZIP
Result

This example ran a scenario called cql-iot. Your results will reflect the name of the scenario that you run.

logging to logs/scenario_20201130_132903_455.log
cql_astra_schema: 100.00%/Stopped (details: min=0 cycle=1 max=1) (last report)
cqliot_astra_rampup: 0.37%/Stopped (details: min=0 cycle=36756 max=10000000)
cqliot_astra_rampup: 0.88%/Stopped (details: min=0 cycle=88159 max=10000000)
cqliot_astra_rampup: 1.40%/Stopped (details: min=0 cycle=139760 max=10000000)
cqliot_astra_rampup: 1.92%/Stopped (details: min=0 cycle=192445 max=10000000)
cqliot_astra_rampup: 2.44%/Stopped (details: min=0 cycle=243613 max=10000000)
cqliot_astra_rampup: 2.97%/Stopped (details: min=0 cycle=297122 max=10000000)
cqliot_astra_rampup: 3.51%/Stopped (details: min=0 cycle=350615 max=10000000)
cqliot_astra_rampup: 4.02%/Stopped (details: min=0 cycle=402398 max=10000000)
cqliot_astra_rampup: 4.45%/Stopped (details: min=0 cycle=444902 max=10000000)
cqliot_astra_rampup: 4.99%/Stopped (details: min=0 cycle=499381 max=10000000)
cqliot_astra_rampup: 5.53%/Stopped (details: min=0 cycle=552956 max=10000000)
cqliot_astra_rampup: 6.08%/Stopped (details: min=0 cycle=607688 max=10000000)
cqliot_astra_rampup: 6.56%/Stopped (details: min=0 cycle=656076 max=10000000)
cqliot_astra_rampup: 7.04%/Stopped (details: min=0 cycle=704018 max=10000000)
cqliot_astra_rampup: 7.55%/Stopped (details: min=0 cycle=754986 max=10000000)
cqliot_astra_rampup: 8.10%/Stopped (details: min=0 cycle=809898 max=10000000)
cqliot_astra_rampup: 8.89%/Stopped (details: min=0 cycle=888542 max=10000000)
cqliot_astra_rampup: 8.89%/Stopped (details: min=0 cycle=888542 max=10000000)
cqliot_astra_rampup: 9.19%/Stopped (details: min=0 cycle=919438 max=10000000)
cqliot_astra_rampup: 9.71%/Stopped (details: min=0 cycle=970703 max=10000000)
cqliot_astra_rampup: 10.25%/Stopped (details: min=0 cycle=1025088 max=10000000)
cqliot_astra_rampup: 10.71%/Stopped (details: min=0 cycle=1070983 max=10000000)
cqliot_astra_rampup: 11.20%/Stopped (details: min=0 cycle=1120478 max=10000000)
cqliot_astra_rampup: 11.68%/Stopped (details: min=0 cycle=1168035 max=10000000)
cqliot_astra_rampup: 12.19%/Stopped (details: min=0 cycle=1219462 max=10000000)

To get information about other Astra DB workloads, run nb5 --list-scenarios or java -jar nb5.jar --list-scenarios, and then search the output for astra.

Inspect results

After the scenario runs, there are several ways you can inspect the results:

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com