conduktor.io ↗

buffer.memory — Kafka Producer Configuration

The total bytes of memory the producer can use to buffer records waiting to be sent to the server. If records are sent faster than they can be delivered to the server the producer will block for max.

Description

The total bytes of memory the producer can use to buffer records waiting to be sent to the server. If records are sent faster than they can be delivered to the server the producer will block for max.block.ms after which it will throw an exception.

Default Values by Kafka Version

Kafka VersionDefault Value
0.8.133554432
0.8.233554432
0.9.033554432
0.10.033554432
0.10.133554432
0.10.233554432
0.11.033554432
1.033554432
1.133554432
2.033554432
2.133554432
2.233554432
2.333554432
2.433554432
2.533554432
2.633554432
2.733554432
2.833554432
3.033554432
3.133554432
3.233554432
3.333554432
3.433554432
3.533554432
3.633554432
3.733554432
3.833554432
3.933554432
4.033554432
4.133554432
4.233554432

Tuning Recommendation

ProfileRecommendedWhy
producer / throughput134217728Expanding the accumulator buffer from 32MB to 128MB prevents send() from blocking during traffic bursts, sustaining throughput without back-pressure stalls when brokers are temporarily slower.
producer / durability67108864Doubling the accumulator buffer to 64MB provides headroom for records queued during a retry window (broker unavailability lasting 10-30s at typical rates); without this, buffer.memory exhausts and max.block.ms triggers, causing send() to throw before the retry window expires.

Related Configs

batch.size · linger.ms · max.block.ms · delivery.timeout.ms

Manage Kafka configs across all your clusters with Conduktor Console — view, compare, and update configurations in one place.