Was this page helpful?
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_sharesoption by setting a value between 50 and 1000:- In the - scylla.ymlconfiguration 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_thresholdby setting- compaction_enforce_min_threshold: truein the- scylla.ymlconfiguration file (default is False). As a result, ScyllaDB will compact only the buckets that contain the number of SSTables specified with- min_thresholdor more. See STCS options for details.