nodetool setcompactionthreshold

Sets minimum and maximum compaction thresholds for a table.

Sets minimum and maximum compaction thresholds for a table.

Synopsis

install_location/bin/nodetool options setcompactionthreshold 
[--] [keyspace_name [table_name]] minthreshold maxthreshold
Table 1. Options
Short Long Description
-h --host Hostname or IP address.
-p --port Port number.
-pwf --password-file Password file path.
-pw --password Password.
-u --username Remote JMX agent username.
keyspace Targets either an entire keyspacewhen used without specifying a table or qualifies the keyspace in the that follow the keyspace name.
table Targets specified table for compaction.
minthreshold Sets the minimum number of SSTables to trigger a minor compaction when using SizeTieredCompactionStrategy.
maxthreshold Sets the maximum number of SSTables to allow in a minor compaction when using SizeTieredCompactionStrategy.
-- Separates an option from an argument that could be mistaken for a option.

Description

This command controls how many SSTables of a similar size must be present before a minor compaction is scheduled. The max_threshold table property sets an upper bound on the number of SSTables that may be compacted in a single minor compaction, as described in How is data updated?.

When using LeveledCompactionStrategy, maxthreshold resets or overrides the internal setting of 32. SSTables are compacted concurrently to avoid wasting memory or running out of memory when compacting highly overlapping SSTables.