Search code examples
cassandrabenchmarkingcassandra-3.0

Is Tracing On in cassandra the right choice to track the timetaken in Cassandra


When I try to execute the query on 500000 entries in a table, I could see that it is completed in 1200ms, But when I try to execute the query using TRACING ON enabled, I can see it is showing a long time in the Tracing log say 1850 ms.

So I would like to confirm whether the TRACING ON feature in Cassandra is a right choice for tracking time taken for executing queries?


Solution

  • There are metrics that will give you the amount of time spent on queries, you can most easily view it with nodetool proxyhistograms (doc) or grabbing directly from JMX. TRACING ON is for debugging why a request is slow. Its important to note that this is very expensive (and possibly adds time to query, although most tracing is async) and should be avoided outside of debugging issues.

    You can also use nodetool settraceprobability to globally record some % of the queries, which you can then look at and maybe process with some tooling the events and sessions table in the system_traces keyspace.