min.cleanable.dirty.ratio — Kafka topic Configuration
This configuration controls how frequently the log compactor will attempt to clean the log (assuming log compaction is enabled). By default we will avoid cleaning a log where more than 50% of the log has been compacted.
Description
This configuration controls how frequently the log compactor will attempt to clean the log (assuming log compaction is enabled). By default we will avoid cleaning a log where more than 50% of the log has been compacted. This ratio bounds the maximum space wasted in the log by duplicates (at 50% at most 50% of the log could be duplicates). A higher ratio will mean fewer, more efficient cleanings but will mean more wasted space in the log. If the max.compaction.lag.ms or the min.compaction.lag.ms configurations are also specified, then the log compactor considers the log to be 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 min.compaction.lag.ms duration, or (ii) if the log has had dirty (uncompacted) records for at most the max.compaction.lag.ms period.
Default Values by Kafka Version
| Kafka Version | Default Value |
|---|---|
| 0.11.0 | 0.5 |
| 1.0 | 0.5 |
| 1.1 | 0.5 |
| 2.0 | 0.5 |
| 2.1 | 0.5 |
| 2.2 | 0.5 |
| 2.3 | 0.5 |
| 2.4 | 0.5 |
| 2.5 | 0.5 |
| 2.6 | 0.5 |
| 2.7 | 0.5 |
| 2.8 | 0.5 |
| 3.0 | 0.5 |
| 3.1 | 0.5 |
| 3.2 | 0.5 |
| 3.3 | 0.5 |
| 3.4 | 0.5 |
| 3.5 | 0.5 |
| 3.6 | 0.5 |
| 3.7 | 0.5 |
| 3.8 | 0.5 |
| 3.9 | 0.5 |
| 4.0 | 0.5 |
| 4.1 | 0.5 |
| 4.2 | 0.5 |