log.local.retention.bytes — Kafka Broker Configuration
The maximum size of local log segments that can grow for a partition before it gets eligible for deletion. Default value is -2, it represents log.retention.bytes value to be used
Description
The maximum size of local log segments that can grow for a partition before it gets eligible for deletion. Default value is -2, it represents log.retention.bytes value to be used. The effective value should always be less than or equal to log.retention.bytes value.
Default Values by Kafka Version
| Component | Kafka version line | Documented default |
|---|---|---|
| Broker | 3.6 | -2 |
| Broker | 3.7 | -2 |
| Broker | 3.8 | -2 |
| Broker | 3.9 | -2 |
| Broker | 4.0 | -2 |
| Broker | 4.1 | -2 |
| Broker | 4.2 | -2 |
| Broker | 4.3 | -2 |
| Broker | 4.4 | -2 |
Tuning Recommendation
Workload-dependent proposals, not benchmarked defaults. Review the versioned Config Advisor before applying.
| Profile | Proposal | Rationale and tradeoff |
|---|---|---|
| broker / cost | 1073741824 | Sets local size retention per partition for tiered topics. -2 inherits total byte retention; the effective local limit must be no greater than total retention. Tradeoff: Smaller local storage increases reliance on remote reads. Compare effective limits including topic overrides and unlimited sentinels. Manual decision; not an executable preset. Reference · 2026-10-27 |
Related Configs
remote.log.storage.system.enable · log.local.retention.ms