Test compaction and compression
To determine which compaction and compression strategies are best for your clusters, do one or both of the following:
-
Set up a test environment to run simulated production workloads with different configurations.
-
Use write survey mode to test configuration changes on production clusters.
Use a test environment
-
Use an existing lower environment or create a new test environment with the same configuration as your production environment.
The minimum recommendation is a three-node cluster.
-
Use stress tools or your own custom test scripts to test simulated production workloads.
Use write survey mode in any environment
Write survey mode is a start-up option for testing new compaction and compression strategies. In write survey mode, you can test different compaction and compression strategies on an isolated node, using actual write traffic to benchmark write performance differences. In write survey mode, the isolated node has no impact on the other nodes in the cluster, so you can use it in any environment, including production.
Write survey mode adds a node to a cluster without joining the ring. This allows the node to accept all write traffic as if it were part of the normal cluster, but, because it hasn’t joined the ring, it doesn’t impact cluster performance or accept reads.
|
Write survey mode only tests write performance. If you want to test read performance with different compression and compaction strategies, deploy the node in a dedicated test environment. |
You can also use write survey mode to test minor and patch releases. Nodes added in write survey mode must have the same major version as the other nodes in the cluster, but they can run a different minor or patch version. The write survey mode relies on the streaming subsystem that transfers data between nodes in bulk, and this behavior differs between major versions.
-
To start a node in write survey mode, use the
write_surveyoption:cd PATH/TO/INSTALL/DIRECTORY && sudo bin/cassandra -Dcassandra.write_survey=true -
Once the node starts, check the
system.logto verify that the node is active in survey mode and waiting to join the ring.Don’t add the node to the ring. Write survey mode is designed to exclude the test node from the ring.
-
Monitor the performance metrics using
nodetool cfstatsor other HCD monitoring tools. -
To test other strategies and configurations, reconfigure the global or table-level compression and compaction settings, restart the node if necessary, and then continue monitoring its performance.
-
Once you have completed testing, you can shut down the node, and then apply your ideal compression and compaction settings to the other nodes in the cluster.