ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Server
  • Cloud
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Download
ScyllaDB Docs ScyllaDB Monitoring Using Scylla Monitoring Stack Scylla Monitoring Stack Advisor Compaction takes lots of memory and CPU

Caution

You're viewing documentation for a previous 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 setting compaction_enforce_min_threshold: true in the scylla.yml configuration file. As a result, ScyllaDB will compact only the buckets that contain the number of SSTables specified with min_threshold or more. See STCS options for details.

Was this page helpful?

PREVIOUS
Some queries use reverse order
NEXT
Some operation failed due to unsatisfied consistency level
  • Create an issue
  • Edit this page
ScyllaDB Monitoring
  • 4.0
    • 4.9
    • 4.8
    • 4.7
    • 4.6
    • 4.5
    • 4.4
    • 4.3
    • 4.2
    • 4.1
    • 4.0
    • 3.10
    • 3.9
    • 3.8
    • 3.7
    • 3.6
    • 3.5
  • Introduction
  • Download and Install
    • Install
    • The start-all.sh script
    • Deploy without Docker
    • Docker Compose
    • System Recommendations
    • Using Thanos
  • User Guide
    • CQL Optimization Dashboard
    • Advisor
      • Some queries use ALLOW FILTERING
      • Some queries use Consistency Level: ALL
      • Some queries use Consistency Level: ANY
      • Some queries are not token-aware
      • Some SELECT queries are non-paged
      • Some queries are non-prepared
      • Some queries use reverse order
      • Compaction takes lots of memory and CPU
      • Some operation failed due to unsatisfied consistency level
      • I/O Errors can indicate a node with a faulty disk
      • Some operations failed on the replica side
      • CQL queries are not balanced among shards
      • Prepared statements cache eviction
      • System Overload
  • Procedures
    • Alert Manager
      • Alerting
    • Adding and Modifying Dashboards
    • Upgrade Guide
  • Upgrade
    • Monitoring 3.x to 4.y
    • Monitoring 3.x to 3.y
    • Monitoring 2.x to 3.y
    • Monitoring 2.x to 2.y
    • Monitoring 1.x to 2.x
  • Troubleshooting
    • Troubleshooting
    • Troubleshooting Guide for Scylla Manager and Scylla Monitor Integration
  • Reference
    • Support Matrix
    • Interfaces
  • GitHub Project
Docs Tutorials University Contact Us About Us
© 2025, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 04 May 2025.
Powered by Sphinx 7.4.7 & ScyllaDB Theme 1.8.6