Cassandra Thread Pools Test

Cassandra is based on a Staged Event Driven Architecture (SEDA). Cassandra separates different tasks into stages connected by a messaging service. Cassandra maintains distinct thread pools for different stages of execution. Each like task is grouped into a stage having a queue and thread pool . Some stages skip the messaging service and queue tasks immediately on a different stage if it exists on the same node. Each of these queues can be backed up if execution at a stage is being over run. This is a common indication of an issue or performance bottleneck. If too many tasks are pending in a thread pool, then administrators should be alerted about those tasks so that they can either further investigate the problem or add additional threads in that thread pool. The Cassandra Thread Pools helps administrators in this process!

This test auto-discovers the thread pools of each stage on the target Cassandra Database node and for each thread pool, reports the number of active tasks and the tasks that were completed per second. In addition, this test reveals the tasks that were pending and the rate at which the tasks were blocked per second. Using this test, administrators can determine the thread pool containing the maximum number of active threads.

Target of the test : A Cassandra Database

Agent deploying the test : An external/remote agent

Outputs of the test : One set of results for each Stage:Thread pool on the target Cassandra Database node that is 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.

JMX Remote Port

Here, specify the port at which the JMX listens for requests from remote hosts. Ensure that you specify the same port that you configured in the cassandra-env.sh file (if the target Cassandra Database node is installed on a Unix host) or the cassandra-env.ps1 file (if the target Cassandra Database node is installed on a Windows host) in the <CASSANDRA_HOME> directory used by the target Cassandra Database node. To know how to specify the remote port, refer to Enabling JMX Support for JRE.

JMX User and JMX Password

If JMX requires authentication only (but no security), then ensure that the user and password parameters are configured with the credentials of a user with read-write access to JMX. To know how to create this user, refer to Configuring the eG Agent to Support JMX Authentication.

Confirm Password

Confirm the Password by retyping it in this text box.

Measurements made by the test
Measurement Description Measurement Unit Interpretation

Active tasks

Indicates the number of active tasks in this thread pool.

Number

Compare the value of this measure across the thread pools to figure out the thread pool that contains the maximum number of threads that are active.

Completed tasks

Indicates the rate at which tasks were completed in this thread pool.

Tasks/sec

Compare the value of this measure across the thread pools to figure out the thread pool that has completed the maximum number of tasks per second.

Current blocked tasks

Indicates the number of tasks that are currently blocked in this thread pool.

Number

A high value for this measure indicates that there are no more threads in the thread pool to service the tasks. To avoid the tasks from being blocked, administrators can calibrate the thread pool to accommodate enough threads to service the tasks.

Pending tasks

Indicates the number of tasks that are pending in this thread pool.

Number

Compare the value across the thread pools to identify the thread pool on which the maximum number of tasks are pending.

A sudden/gradual increase in the measure is an indication for the administrators to add additional threads to the thread pool.

Total blocked tasks

Indicates the rate at which tasks were blocked in this thread pool during the last measurement period.

Tasks/sec

A low value is desired for this measure.