liveBook · Manning

Nodetool compact

As explained in ScyllaDB in Action

nodetool compact is a Cassandra-compatible administration command that triggers a major compaction for selected database data.

nodetool compact manually triggers a major compaction for selected ScyllaDB data. Unlike normal minor compactions, it can target a table or token range and pushes the selected data to the highest tier or level of its compaction strategy. section 9.3.3 section 8.4.1

Use the command carefully because it has immediate operational consequences:

  • Expect significant resource consumption while the major compaction runs. section 9.3.3
  • Consider it when obsolete data or many tombstones may be hurting partition-read latency. section 8.4.1
  • Avoid treating it as routine maintenance: placing old data at the highest tier can make later minor compactions less effective. section 9.3.3 section 8.4.1

Checking before intervening

An operator first uses nodetool compactionstats to see which keyspaces and tables are being compacted and whether a backlog exists. If compaction activity correlates with slow reads, the operator can investigate a specific table or token range before deciding whether nodetool compact is justified. section 9.3.3 section 8.4.1

How ScyllaDB in Action covers it

How deep it goes
Explains scope, resource cost, strategy levels, and future compaction effects without giving detailed command syntax.
Examples
Uses compactionstats, tables, token ranges, and tombstone-heavy partitions as concrete operational examples.
What it assumes
Assumes familiarity with automatic minor compactions and introduces major-compaction trade-offs across strategy tiers.
What you can do after
Operate/configure ScyllaDB by inspecting compaction activity and judging when a targeted major compaction may help.
How it connects
Connects major compaction with minor compaction, compaction strategies, tombstones, obsolete data, and read latency.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ScyllaDB in Action. The section links point to the parts of the book it draws on.