log.cleaner.min.cleanable.ratio — Kafka Broker Configuration
The minimum ratio of dirty log to total log for a log to eligible for cleaning. If the log.cleaner.max.compaction.lag.ms or the log.cleaner.min.compaction.lag.ms configurations are also specified, then the log compactor considers the log eligible for compaction as soon as either: (i) the dirty ratio threshold has been met and the log has had dirty (uncompacted) records for at least the log.cleaner.min.compaction.lag.ms duration, or (ii) if the log has had dirty (uncompacted) records for at most the log.cleaner.max.compaction.lag.ms period.
Description
The minimum ratio of dirty log to total log for a log to eligible for cleaning. If the log.cleaner.max.compaction.lag.ms or the log.cleaner.min.compaction.lag.ms configurations are also specified, then the log compactor considers the log eligible for compaction as soon as either: (i) the dirty ratio threshold has been met and the log has had dirty (uncompacted) records for at least the log.cleaner.min.compaction.lag.ms duration, or (ii) if the log has had dirty (uncompacted) records for at most the log.cleaner.max.compaction.lag.ms period.
Default Values by Kafka Version
| Component | Kafka version line | Documented default |
|---|---|---|
| Broker | 0.8.1 | 0.5 |
| Broker | 0.8.2 | 0.5 |
| Broker | 0.9.0 | 0.5 |
| Broker | 0.10.0 | 0.5 |
| Broker | 0.10.1 | 0.5 |
| Broker | 0.10.2 | 0.5 |
| Broker | 0.11.0 | 0.5 |
| Broker | 1.0 | 0.5 |
| Broker | 1.1 | 0.5 |
| Broker | 2.0 | 0.5 |
| Broker | 2.1 | 0.5 |
| Broker | 2.2 | 0.5 |
| Broker | 2.3 | 0.5 |
| Broker | 2.4 | 0.5 |
| Broker | 2.5 | 0.5 |
| Broker | 2.6 | 0.5 |
| Broker | 2.7 | 0.5 |
| Broker | 2.8 | 0.5 |
| Broker | 3.0 | 0.5 |
| Broker | 3.1 | 0.5 |
| Broker | 3.2 | 0.5 |
| Broker | 3.3 | 0.5 |
| Broker | 3.4 | 0.5 |
| Broker | 3.5 | 0.5 |
| Broker | 3.6 | 0.5 |
| Broker | 3.7 | 0.5 |
| Broker | 3.8 | 0.5 |
| Broker | 3.9 | 0.5 |
| Broker | 4.0 | 0.5 |
| Broker | 4.1 | 0.5 |
| Broker | 4.2 | 0.5 |
| Broker | 4.3 | 0.5 |
| Broker | 4.4 | 0.5 |
Tuning Recommendation
Workload-dependent proposals, not benchmarked defaults. Review the versioned Config Advisor before applying.
| Profile | Proposal | Rationale and tradeoff |
|---|---|---|
| broker / cost | 0.3 | Sets the dirty-data ratio at which a log becomes eligible for compaction, subject to other compaction constraints. Tradeoff: A lower ratio can rewrite data more often and increase I/O. It does not immediately compact every segment. Reference · 2026-10-27 |
Related Configs
log.cleaner.threads · log.cleanup.policy · log.cleaner.dedupe.buffer.size