Adjusting compaction throughput due to available resources

As mentioned at the beginning of this section, compaction can consume a large amount of resources if left unchecked. A symptom of this would be an application experiencing query timeouts or consistency failures. When investigating the offending node, you may find that the CPU usage is maxed out, and several compactions (nodetool compactionstats) may be pending. A common way to remedy this problem is to lower the compaction throughput, as follows:

nodetool getcompactionthroughputCurrent compaction throughput: 256 MB/s

Woah! Allowing compaction to consume 256 Mbps (megabits per second) is a sure way to saturate your instance's resources. Let's lower that, and monitor our node's progress: ...

Get Mastering Apache Cassandra 3.x - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.