nodetool getcompactionthreshold
Displays the compaction thresholds for a table.
Synopsis
Section titled “Synopsis”nodetool [connection_options] getcompactionthreshold <keyspace> <table>See connection options for connection options.
Description
Section titled “Description”nodetool getcompactionthreshold displays the minimum and maximum SSTable count thresholds that trigger compaction for a specific table. These thresholds control when automatic compaction occurs.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
keyspace | Target keyspace name |
table | Target table name |
Examples
Section titled “Examples”Basic Usage
Section titled “Basic Usage”nodetool getcompactionthreshold my_keyspace my_tableSample Output
Section titled “Sample Output”Current compaction thresholds for my_keyspace/my_table: min = 4, max = 32Understanding Thresholds
Section titled “Understanding Thresholds”Minimum Threshold
Section titled “Minimum Threshold”- Minimum SSTables needed to trigger compaction
- Default: 4
Maximum Threshold
Section titled “Maximum Threshold”- Maximum SSTables to include in single compaction
- Default: 32
Use Cases
Section titled “Use Cases”Verify Table Configuration
Section titled “Verify Table Configuration”# Check thresholds for a tablenodetool getcompactionthreshold my_keyspace my_tableCompare with Table Stats
Section titled “Compare with Table Stats”# Get current SSTable countnodetool tablestats my_keyspace.my_table | grep "SSTable count"
# Compare with thresholdsnodetool getcompactionthreshold my_keyspace my_tableRelated Commands
Section titled “Related Commands”| Command | Relationship |
|---|---|
| setcompactionthreshold | Modify thresholds |
| compactionstats | View compaction status |
| tablestats | Table statistics |