About the cassandra-stress tool

The cassandra-stress tool is a Java-based stress testing utility for basic benchmarking and load testing a DataStax Enterprise cluster.

Data modeling choices can greatly affect application performance. Significant load testing over several trials is the best method for discovering issues with a particular data model. The cassandra-stress tool is an effective tool for populating a cluster and stress testing CQL tables and queries. Use cassandra-stress to:

  • Quickly determine how a schema performs.

  • Understand how your database scales.

  • Optimize your data model and settings.

  • Determine production capacity.

The cassandra-stress tool also supports a YAML-based profile for defining specific schemas with various compaction strategies, cache settings, and types. Sample files are located in the tools directory:

  • cqlstress-counter-example.yaml

  • cqlstress-example.yaml

  • cqlstress-insanity-example.yaml

The YAML file supports user-defined keyspace, tables, and schema. The YAML file can be used to design tests of reads, writes, and mixed workloads.

When started without a YAML file, cassandra-stress creates a keyspace, keyspace1, and tables, standard1 or counter1, depending on what type of table is being tested. These elements are automatically created the first time you run a stress test and reused on subsequent runs. You can drop keyspace1 using DROP KEYSPACE. You cannot change the default keyspace and tables names without using a YAML file.

Usage

  • Package installations:

    cassandra-stress <command> [options]
  • Tarball installations:

    cd <install_location>/tools &&
    bin/cassandra-stress <command> [options]

Run cassandra-stress with authentication

The following example shows using the -mode option to supply a username and password:

cassandra-stress -mode native cql3 user=cassandra password=cassandra no-warmup cl=QUORUM

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