Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started



graemenewlands avatar image
graemenewlands asked Erick Ramirez answered

Investigating Docker performance benefit vs costs

Docker is an amazing bit of kit. The docker hub images for cassandra are very well designed and allow for very quick deployment and configuration of clusters, including running locally in debug or full production servers.

I've been running cassandra quite happily between my personal cluster (pi cluster) and my laptop (ubuntu) within docker. I found that running cassandra-stress on C*4 gave better performance improvements moving from jdk8 in docker to 11 in docker than from jdk8 no docker to jdk8 in docker, indicating that there are probably other performance gains that are more significant than the cost of containerisation.

I am wondering if there is any advice about running cassandra in production within containers? Has anyone done any methodical study into the performance overheads experienced (if any), on different types of server?

Advise or pointers very gratefully received!

10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

smadhavan avatar image
smadhavan answered

@graemenewlands, not a direct answer to your question, but take a look at this blog where the author discusses the perf benchmarks of running C* on K8s -- and hope that helps!

10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Erick Ramirez avatar image
Erick Ramirez answered

Organisations who choose to deploy Cassandra in Docker do so for the operational benefits, not for performance. In fact, it is possible for some applications to perform worse when Dockerised compared to running on a native operating system.

That is not to say that running Cassandra in Docker is a bad thing. Lots of companies do this in production for a number of years now. As Madhavan alluded to, runs Cassandra in containers. K8ssandra is an open-source platform that is our opinionated way of deploying Cassandra on Kubernetes. Again, it's about operational simplicity, not about performance.

From a JVM perspective, Java 11 performs better than Java 8 as expected given that it is years ahead compared to Java 8 which is very old. Cassandra 4.x provides support for Java 11.

A little off-track but I wanted to mention that future releases of Cassandra will support Java 17 (CASSANDRA-16895) and there's a lot of excitement around the ZGC and Shenandoah garbage collectors. See Alex Dejanovski's blog post Apache Cassandra 4.0 Benchmarks at The Last Pickle if you're interested. Cheers!

10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.