Cassandra Long Running Query Test

This test tracks the currently executing queries on a Cassandra database node and determines the number of queries that have been running for a long time. Using this test, resource-intensive queries to a database can be quickly isolated.

Target of the test : A Cassandra Database

Agent deploying the test : An external/remote agent.

Outputs of the test : One set of results for the target Cassandra Database node being monitored.

Configurable parameters for the test
Parameters Description

Test Period

How often should the test be executed.

Host

The host for which the test is to be configured.

Port

The port on which the specified host listens. By default, this is 9042.

CQL User

Specify the name of the CQL User with the following privileges in this text box:

SELECT privilege on the system_traces.sessions table

SELECT privilege on the system.peer_events table

CQL Password

Specify the password corresponding to the CQL User.

Confirm Password

Confirm the CQL Password by retyping it in this text box.

Elapsed Time (seconds)

Specify the duration (in seconds) for which a query should have executed for it to be regarded as a long running query. The default value is 10.

Exclude Command

Specify the command you want to exclude from the list of long running queries. For example “backup” queries are included in the long-running queries list, they will be automatically excluded based on this parameter. As a result, only balance queries will be displayed in the UI. By default, this parameter set to “NONE”.

Measurements made by the test
Measurement Description Measurement Unit Interpretation

Number of queries

Indicates the number of queries that are currently executing on the database beyond the configured ELAPSED TIME.

Number

The detailed diagnosis for this measure indicates the exact queries and which user is executing the queries. This information can be very useful in identifying queries that may be candidates for optimization.

Maximum elapsed time

Indicates the maximum time taken by the queries to this database.

Secs

 

Average elapsed time

Indicates the average time taken by queries to execute on this database.

Secs

If the value of this measure is very high, it could either indicate that the database is unable to process the queries quickly or that one/more queries to the database are taking too long to execute. Improper indexing and fragmented tables in the database are common causes for slowdowns at the database-level. Besides the above, queries that are improperly structured can also take time to execute. The longer a query executes on the database, higher would be the resource consumption of that query. It is therefore imperative that such resource-intensive queries are quickly isolated and fine-tuned, so as to prevent degradations in the performance of the database server.