question

anjay.prasad avatar image
anjay.prasad asked smadhavan edited

How can we monitor query performance?

Hi Team
I wanted to know how can we monitor the query performance in cassandra.

If there is any tool apart from Trace.

Thanks,

monitoring
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

Slow query logging was added as a feature in Apache Cassandra 3.10 (CASSANDRA-12403). It is enabled by default in cassandra.yaml and queries which take longer than 500ms are logged at DEBUG level:

slow_query_log_timeout_in_ms: 500

However, I'm not aware of any tools that monitors the output of this feature. You can find out more about slow query logging in my answer to question #4969.

If you're just looking for a general monitoring software for Cassandra clusters, have a look at the Metrics Collector for Apache Cassandra (MCAC). It is open-source so is free to use. You can use it to monitor dozens of metrics including read/write latencies. Cheers!

Share
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 smadhavan edited

@anjay.prasad, since you haven't mentioned which version of Cassandra you're using, I am going to assume it is DataStax Enterprise (DSE) and you could leverage OpsCenter to view slow queries as mentioned here in the documentation. If you're not using using DSE, you could leverage what Erick had posted in his answer as OpsCenter doesn't support managing & monitoring OSS Apache Cassandra clusters. Cheers!

Share
10 |1000

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