# 3 Key Factors for Load Testing Apache Cassandra Applications

[Blog](/blog/)&gt;[Technology](/blog/category/technical/)&gt;3 Key Factors for Load Testing Apache Cassandra Applications 

3 Key Factors for Load Testing Apache Cassandra Applications
============================================================

March 16, 2016 | By [ Ben Slater](https://www.instaclustr.com/blog/author/bens/)

 

 

 

 



   [ ](https://x.com/intent/tweet?text=3%20Key%20Factors%20for%20Load%20Testing%20Apache%20Cassandra%20Applications&url=https://www.instaclustr.com/blog/3-key-factors-for-load-testing-apache-cassandra-applications/) [ ](https://www.linkedin.com/shareArticle?mini=true&url=https://www.instaclustr.com/blog/3-key-factors-for-load-testing-apache-cassandra-applications/&title=&summary=3%20Key%20Factors%20for%20Load%20Testing%20Apache%20Cassandra%20Applications&source=) 

Here at Instaclustr we have spent a lot of time running load tests on Apache Cassandra and dealing with the many different types of performance issues that crop up when running Cassandra in production. Through these exercises, we’ve learnt a lot (often by trial and error) about how to usefully load test Cassandra applications.

Although many of the principles of load testing Cassandra applications are similar to testing relational databases and other NoSQL systems, there are three specific factors which we’ve found to be particularly important when load testing Cassandra.

1. Consider background load
---------------------------

Compaction is a necessary, ongoing background task in Cassandra. Achieving a target write throughput for 15 minutes and then leaving 8 hours of compaction processing is not a useful test as the write throughput is clearly not sustainable for a long period. Similarly, achieving your read target with no write workload (and thus no compactions) is also not useful for the real world.

Repairs and backups can (to some degree) be scheduled outside peak times but many Cassandra applications (such as IOT) have very constant workloads and no lull for scheduling these types of activities.

2. Data profile matters
-----------------------

As we covered in an earlier blog post on the [top 3 data modelling traps](https://www.instaclustr.com/blog/common-cassandra-data-modelling-traps/), well distributed partition keys, careful treatment of updates and deletes to avoid tombstone issues and correct use of secondary indexes are all crucial to Cassandra’s performance. In testing, each of these issues will only be uncovered if your test data profile is well-matched to real production data. For example:

- unique, randomly distributed values for your partition key will generate massive differences in performance to a data set where 99% of values have a single partition key (we’ve seen 99% but even 5% is likely to be very significant);
- the volume of tombstones generated for a 1-2 hour test of updates and deletes may be very different to the volume generated over 10 days of running (the default period for which tombstones are alive). Increasing tombstone volumes can have major impacts on performance.

3. Show cassandra-stress some love
----------------------------------

**cassandra-stress**, as enhanced with Cassandra 2.1, is a fantastically powerful tool for load testing a Cassandra cluster and schema. However, like any powerful tool, it can be used poorly to generate not-very-useful results or used well to generate very accurate simulations. For example, when run with a duration setting, **cassandra-stress** will use a default limit of 1,000,000 for generating partition keys. However, when running with a ‘number of operations’ setting, the default limit is equal to the number of operations – potentially yielding very different results.

Takeaway
--------

We’ve hit some of the key Cassandra load testing factors here. However, don’t forget to consider normal load testing considerations such as peak loads and bottlenecks. Also, keep an eye on Cassandra tuning techniques, and make sure settings such as driver settings and the consistency level mirror your planned application configuration.

Want some help? Instaclustr Consulting is now offering [Instaclustr Performance Assurance for Cassandra](https://www.instaclustr.com/services/professional-services/) services. [Contact us](https://www.instaclustr.com/contact-us/) for more information.

 

### About the author

**[Ben Slater](https://www.instaclustr.com/blog/author/bens/)** | Chief Product Officer

Chief Product Officer, charged with steering Instaclustr’s development roadmap and overseeing the product engineering, production support, open source, and consulting teams.

 



 

 ![mail icon]()#### Get the latest articles for open sourceIn your inbox

 <a class="btn btn-primary btn-popup text-dark" href="">Sign up now</a> 

 

 

 

  ### Related content

 [ Zero Downtime Migration to Instaclustr 

 

 Yes, we can migrate existing Cassandra clusters to Instaclustr without any downtime. Here's what to expect from the process... 

 

 

 

 

 

 

 ](https://www.instaclustr.com/blog/zero-downtime-migration-to-instaclustr/) 

 [ Workflow Comparison: Uber Cadence vs Netflix Conductor 

 

 When choosing what’s right for your company’s opensource workflow needs it is important to know the difference and similarities ... 

 

 

 

 

 

 

 ](https://www.instaclustr.com/blog/workflow-comparison-uber-cadence-vs-netflix-conductor/) 

 [ Will Your Cassandra Database Project Succeed?: The New Stack 

 

 Open source Apache Cassandra® continues to stand out as an enterprise-proven solution for organizations seeking high availability... 

 

 

 

 

 

 

 ](https://www.instaclustr.com/blog/will-your-cassandra-database-project-succeed-the-new-stack/) 

 

  <a class="close-modal" href="">×</a>Sign upto ourNewsletter
-----------------------
