Runbook

Cassandra Performance Issues Due to Uneven Partitions

Back to Runbooks

Overview

This incident type pertains to identifying uneven partitions in a Cassandra database, which can cause performance issues related to read/write operations and query execution. Cassandra is a distributed database that stores data across multiple nodes, and partitions are used to distribute the data evenly among the nodes. However, if the partition sizes are uneven, some nodes may become overloaded while others remain underutilized, leading to performance bottlenecks. Identifying these uneven partitions is crucial in ensuring optimal performance of the Cassandra database.

Parameters

Debug

Connect to Cassandra cluster

Check if nodetool is installed

Check the token ranges for each node

Identify the highest and lowest token values

Check the size of each partition

Identify the largest and smallest partitions

Repair

Rebalance the partitions: One way to remediate this incident is to rebalance the partitions in the Cassandra database. This involves redistributing the data across the nodes in a way that ensures even partition sizes. This can be done by running the nodetool repair command or by using a third-party tool such as Cassandra Reaper.