Data consistency and performance

Changing the consistency level can affect read performance. The tracing output shows that as you change the consistency level from ONE to QUORUM to ALL, performance degrades in from 1714 to 1887 to 2391 microseconds, respectively. If you follow the steps in this tutorial, it is not guaranteed that you will see the same trend because querying a one-row table is a degenerate case, used for example purposes. The difference between QUORUM and ALL is slight in this case, so depending on conditions in the cluster, performance using ALL might be faster than QUORUM.

Under the following conditions, performance using ALL is worse than QUORUM:

  • The data consists of thousands of rows or more.

  • One node is slower than others.

  • A particularly slow node was not selected to be part of the quorum.

Tracing queries on large datasets

You can use probabilistic tracing on databases having at least ten rows, but this capability is intended for tracing through much more data. After configuring probabilistic tracing using the nodetool settraceprobability command, you query the system_traces keyspace.

 session_id                           | event_id                             | activity  | source     | source_elapsed | thread
 a20badc0-37d9-11ef-81ed-f92c3c7170c3 | a20ff380-37d9-11ef-81ed-f92c3c7170c3 | Parsing ; | |          20987 |  CoreThread-6
 0443ce20-373d-11ef-b699-4d3badfe036f | 044c59a0-373d-11ef-b699-4d3badfe036f | Parsing ; | |          32010 | CoreThread-10
 3e951740-3734-11ef-9db4-4d3badfe036f | 3e99ab20-3734-11ef-9db4-4d3badfe036f | Parsing ; | |          27999 |  CoreThread-0

(3 rows)

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,