Was this page helpful?
Caution
You're viewing documentation for an unstable version of ScyllaDB Monitoring. Switch to the latest stable version.
Compaction takes lots of memory and CPUΒΆ
ScyllaDB runs compaction periodically as a background process. While running compaction is important, there are situations when compaction takes too much CPU. As a result, compaction impacts the overall system performance.
If this is the case, you can do one of the following:
Statically limit the compaction shares with the
compaction_static_shares
option by setting a value between 50 and 1000:In the
scylla.yml
configuration file:compaction_static_shares: 100
In the command line when starting ScyllaDB:
--compaction-static-shares 100
You may start by setting the value
100
. If read latency is impacted, which indicates that compaction is overly slowed down, you can increase the value to reach the balance between the system performance and read latency.Enforce
min_threshold
by settingcompaction_enforce_min_threshold: true
in thescylla.yml
configuration file (default is False). As a result, ScyllaDB will compact only the buckets that contain the number of SSTables specified withmin_threshold
or more. See STCS options for details.