apache/cassandra · warning

memtable_cleanup_threshold is set very low [{}], which may c

Error message

memtable_cleanup_threshold is set very low [{}], which may cause performance degradation

What it means

A warning logged when memtable_cleanup_threshold is set below 0.1 (but still valid, i.e. >= 0.01). A very low threshold means memtable cleanup work is triggered more aggressively relative to available memory, which can degrade write performance. It is advisory; startup proceeds.

Source

Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:960

        if (conf.memtable_flush_writers < 1)
            throw new ConfigurationException("memtable_flush_writers must be at least 1, but was " + conf.memtable_flush_writers, false);

        if (conf.memtable_cleanup_threshold == null)
        {
            conf.memtable_cleanup_threshold = (float) (1.0 / (1 + conf.memtable_flush_writers));
        }
        else
        {
            logger.warn("memtable_cleanup_threshold has been deprecated and should be removed from cassandra.yaml");
        }

        if (conf.memtable_cleanup_threshold < 0.01f)
            throw new ConfigurationException("memtable_cleanup_threshold must be >= 0.01, but was " + conf.memtable_cleanup_threshold, false);
        if (conf.memtable_cleanup_threshold > 0.99f)
            throw new ConfigurationException("memtable_cleanup_threshold must be <= 0.99, but was " + conf.memtable_cleanup_threshold, false);
        if (conf.memtable_cleanup_threshold < 0.1f)
            logger.warn("memtable_cleanup_threshold is set very low [{}], which may cause performance degradation", conf.memtable_cleanup_threshold);

        if (conf.concurrent_compactors == null)
            conf.concurrent_compactors = Math.min(8, Math.max(2, Math.min(FBUtilities.getAvailableProcessors(), conf.data_file_directories.length)));

        if (conf.concurrent_compactors <= 0)
            throw new ConfigurationException("concurrent_compactors should be strictly greater than 0, but was " + conf.concurrent_compactors, false);

        applyConcurrentValidations(conf);
        applyRepairCommandPoolSize(conf);
        applyThresholdsValidations(conf);

        if (conf.concurrent_materialized_view_builders <= 0)
            throw new ConfigurationException("concurrent_materialized_view_builders should be strictly greater than 0, but was " + conf.concurrent_materialized_view_builders, false);

        if (conf.num_tokens != null && conf.num_tokens > MAX_NUM_TOKENS)
            throw new ConfigurationException(String.format("A maximum number of %d tokens per node is supported", MAX_NUM_TOKENS), false);

        try

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Remove memtable_cleanup_threshold from cassandra.yaml (the setting is deprecated anyway).
  2. If tuning flush behavior, use memtable_space/memtable_offheap_space and concurrent_compactors instead.

Example fix

// cassandra.yaml before
memtable_cleanup_threshold: 0.05
// after
# removed - deprecated; tune via memtable_space instead
Defensive patterns

Strategy: validation

Validate before calling

Object v = yamlConfig.get("memtable_cleanup_threshold");
if (v instanceof Number && ((Number) v).floatValue() < 0.1f) {
    throw new IllegalStateException("memtable_cleanup_threshold below 0.1 degrades performance; remove it (deprecated)");
}

Prevention

When it happens

Trigger: Starting a node with an explicit memtable_cleanup_threshold value in [0.01, 0.1) in cassandra.yaml; the check runs in applySimpleConfig after the range validation.

Common situations: Hand-tuned configs from old clusters attempting to delay flushes; copy-pasted tuning advice; configs written when the setting was still meaningful and kept after upgrades.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/05ef70c5ee9897dc. Report an issue: GitHub.