conduktor.io ↗

Kafka Broker Storage Cost Configuration

Review retention and compaction against replay requirements; tiered storage needs explicit deployment configuration.

broker

Config / referenceDefault → proposalRationale and conditions
Segments, compaction and flush
log.cleaner.io.max.bytes.per.second
Broker 4.4
Evaluate
unlimited (1.7976931348623157E308) → 50 MiB/sCaps combined log-cleaner I/O to limit background bandwidth usage.
Tradeoff: A lower cap can let dirty data accumulate and delay compaction. It does not reduce retained data by itself.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: A compaction backlog already growing faster than cleaners can process.

Measure: cleaner I/O, dirty ratio, compaction delay and foreground disk latency

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal

log.segment.bytes
Broker 4.4
Evaluate
1 GiB → 256 MiBSets the segment roll size. Smaller segments can make more segments eligible for retention or compaction sooner.
Tradeoff: More segments increase file, index and housekeeping overhead. Active segments and other conditions still affect cleanup.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: Many small partitions or file-handle pressure without a cleanup benefit.

Measure: segment count, retention delay, cleaner load and file descriptors

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal

log.cleaner.threads
Broker 4.4
Evaluate
1 → 2Sizes the compaction cleaner thread pool.
Tradeoff: More cleaner concurrency consumes CPU and I/O and shares the configured cleaner buffer budget.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: An I/O-saturated broker or insufficient deduplication buffer per cleaner.

Measure: cleaner utilization, compaction backlog and disk latency

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal

log.cleaner.min.cleanable.ratio
Broker 4.4
Evaluate
0.5 → 0.3Sets 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.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: Foreground latency sensitive to added cleaner I/O.

Measure: dirty ratio, compaction delay and cleaner read/write bytes

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal

log.segment.delete.delay.ms
Broker 4.4
Evaluate
1 min → 10 sDelays physical removal after a segment has been scheduled for deletion.
Tradeoff: Reducing this delay offers limited disk savings and changes the cleanup grace period; it is not a replication-lag tuning control.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: Changing it without a measured cleanup requirement.

Measure: scheduled versus completed segment deletion and disk space

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal

log.cleaner.dedupe.buffer.size
Broker 4.4
Evaluate
128 MiB → 256 MiBBudgets deduplication memory shared by log cleaner threads.
Tradeoff: Larger buffers consume broker memory. Benefits depend on key cardinality and cleaner concurrency.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: Insufficient process memory or no evidence of deduplication-buffer pressure.

Measure: cleaner buffer utilization, cleaning passes and broker memory

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal

Retention
log.retention.hours
Broker 4.4
Evaluate
168 h → 24 hSets time-based delete retention when more specific retention settings do not override it.
Tradeoff: Shorter retention reduces the replay window. Deletion operates on eligible segments and is not an exact per-record deletion deadline.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: A recovery, replay or compliance requirement longer than the retention window.

Measure: consumer lag age, retained bytes and effective topic retention

Time and byte retention limits apply independently to eligible segments. Byte retention is per partition; compaction preserves key state rather than full event history. Topic overrides matter.

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal

log.retention.bytes
Broker 4.4
Evaluate
unlimited (-1) → 10 GiBSets the size-based delete retention target per partition. It applies independently of the time-based limit.
Tradeoff: The topic footprint also depends on partition count and replication. Segment boundaries mean it is not a hard instantaneous disk cap.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: Sizing the whole topic or cluster as though the value applied once globally.

Measure: per-partition retained bytes, replica count and disk capacity

Time and byte retention limits apply independently to eligible segments. Byte retention is per partition; compaction preserves key state rather than full event history. Topic overrides matter.

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal

log.retention.check.interval.ms
Broker 4.4
Evaluate
5 min → 1 minSets how frequently the broker checks for logs eligible for deletion.
Tradeoff: More frequent checks add work and do not make active segments immediately deletable.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: Expecting exact per-record retention deadlines.

Measure: retention-check overhead, segment deletion delay and disk use

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal

Other controls
num.partitions
Broker 4.4
Keep
1 (unchanged)Sets the default partition count for automatic topic creation where applicable. Existing topics are not repartitioned by this setting.
Tradeoff: More partitions add broker metadata, replication and consumer overhead. The right count depends on workload and ordering requirements.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: Using a cluster-wide default to resize existing topics or optimize every workload.

Measure: per-partition load, consumer parallelism and controller/broker resource use

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal

Tiered storage
remote.log.storage.system.enable
Broker 4.4
Manual decision
false → true
Commented out in export; prerequisites require review.
Enables broker tiered-storage services, which require compatible remote-storage and metadata-manager implementations.
Tradeoff: Enabling the broker feature alone does not enable remote storage on every topic. Plugin configuration, credentials and topic remote.storage.enable must be reviewed.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: A managed service that does not expose the setting or an unconfigured remote storage implementation.

Measure: remote copy/fetch errors, upload lag and remote storage cost

Tiering requires broker services, configured remote storage/metadata plugins and per-topic remote.storage.enable. Effective local retention must be <= total retention; -2 inherits total retention.

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal

log.local.retention.ms
Broker 4.4
Manual decision
inherit total time retention (-2) → 1 d
Commented out in export; prerequisites require review.
Sets local time retention for tiered topics. -2 inherits total time retention; the effective local value must be no greater than total retention.
Tradeoff: Local eviction increases the chance of a remote fetch. It does not replace total retention or automatically enable tiering.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: Tiering is disabled, or local retention exceeds the effective total retention.

Measure: remote fetch latency, local disk use and upload lag

Tiering requires broker services, configured remote storage/metadata plugins and per-topic remote.storage.enable. Effective local retention must be <= total retention; -2 inherits total retention.

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal

log.local.retention.bytes
Broker 4.4
Manual decision
inherit total byte retention (-2) → 1 GiB
Commented out in export; prerequisites require review.
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.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: Tiering is disabled or the effective limits have not been checked together.

Measure: local bytes per partition, remote fetches and remote-read costs

Tiering requires broker services, configured remote storage/metadata plugins and per-topic remote.storage.enable. Effective local retention must be <= total retention; -2 inherits total retention.

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal

remote.log.manager.copier.thread.pool.size
Broker 4.4
Manual decision
10 (unchanged)
Commented out in export; prerequisites require review.
Sizes the thread pool used for remote log copying.
Tradeoff: Additional parallelism consumes bandwidth and can increase object-store request costs.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: Increasing copy concurrency without measuring upload lag and storage capacity.

Measure: remote copy queueing, copy throughput and storage throttling

Copy throttling or insufficient copy capacity can grow remote-upload lag and local disk usage. Local retention changes do not guarantee lower total storage cost.

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal

remote.log.manager.copy.max.bytes.per.second
Broker 4.4
Manual decision
unlimited (9223372036854775807) → 50 MiB/s
Commented out in export; prerequisites require review.
Caps broker-wide remote-copy throughput across partitions.
Tradeoff: A lower cap can build upload backlog and delay local segment eviction; it does not guarantee lower total cost.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: A sustained upload rate above the proposed cap.

Measure: remote-copy lag, copied bytes and local disk growth

Copy throttling or insufficient copy capacity can grow remote-upload lag and local disk usage. Local retention changes do not guarantee lower total storage cost.

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal

remote.log.reader.max.pending.tasks
Broker 4.4
Manual decision
100 → 200
Commented out in export; prerequisites require review.
Bounds queued remote reader tasks.
Tradeoff: A larger queue uses more resources and can increase wait time; a full queue causes fetch errors.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: Using queue growth to conceal persistent remote-read saturation.

Measure: remote read queue size, wait time and fetch errors

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal

remote.log.reader.threads
Broker 4.4
Manual decision
10 → 20
Commented out in export; prerequisites require review.
Sizes remote read concurrency.
Tradeoff: More parallel reads can increase bandwidth, object-store requests and CPU; this is not automatically a cost reduction.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: Remote storage throttling or a cost budget that cannot support more concurrent reads.

Measure: remote read latency, throughput and storage request cost

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal

remote.log.manager.task.interval.ms
Broker 4.4
Manual decision
30 s → 10 s
Commented out in export; prerequisites require review.
Controls how often remote log manager tasks are scheduled.
Tradeoff: More frequent work can add overhead; faster scheduling alone does not improve storage throughput.
Workload, validation and sources

Workload: A storage workload with explicit replay requirements and measured local/remote cost.

Avoid when: No evidence that scheduling delay is the remote copy bottleneck.

Measure: task scheduling delay, copy lag and request rate

Versioned reference · 2026-10-27 · unbenchmarked tuning proposal