receive.buffer.bytes — Kafka Consumer Configuration
The size of the TCP receive buffer (SO_RCVBUF) to use when reading data. If the value is -1, the OS default will be used.
Description
The size of the TCP receive buffer (SO_RCVBUF) to use when reading data. If the value is -1, the OS default will be used.
Default Values by Kafka Version
| Kafka Version | Default Value |
|---|---|
| 0.9.0 | 32768 |
| 0.10.0 | 65536 |
| 0.10.1 | 65536 |
| 0.10.2 | 65536 |
| 0.11.0 | 65536 |
| 1.0 | 65536 |
| 1.1 | 65536 |
| 2.0 | 65536 |
| 2.1 | 65536 |
| 2.2 | 65536 |
| 2.3 | 65536 |
| 2.4 | 65536 |
| 2.5 | 65536 |
| 2.6 | 65536 (64 kibibytes) |
| 2.7 | 65536 (64 kibibytes) |
| 2.8 | 65536 (64 kibibytes) |
| 3.0 | 65536 (64 kibibytes) |
| 3.1 | 65536 (64 kibibytes) |
| 3.2 | 65536 (64 kibibytes) |
| 3.3 | 65536 (64 kibibytes) |
| 3.4 | 65536 (64 kibibytes) |
| 3.5 | 65536 (64 kibibytes) |
| 3.6 | 65536 (64 kibibytes) |
| 3.7 | 65536 (64 kibibytes) |
| 3.8 | 65536 (64 kibibytes) |
| 3.9 | 65536 (64 kibibytes) |
| 4.0 | 65536 (64 kibibytes) |
| 4.1 | 65536 (64 kibibytes) |
| 4.2 | 65536 (64 kibibytes) |
Tuning Recommendation
| Profile | Recommended | Why |
|---|---|---|
| producer / throughput | 262144 | A larger receive buffer (256KB) ensures ProduceResponse and metadata responses from brokers are read in fewer syscalls, reducing latency of the acknowledgment path and freeing the sender thread faster. |
| consumer / throughput | 1048576 | Raising the TCP receive buffer from 64KB to 1MB allows the OS to buffer large FetchResponses (fetching up to 100MB) without forcing the consumer to drain the socket mid-response. Reduces the number of recv() syscalls by up to 16x for large fetches, directly improving throughput. |
Related Configs
send.buffer.bytes · connections.max.idle.ms · fetch.max.bytes · max.partition.fetch.bytes
Manage Kafka configs across all your clusters with Conduktor Console — view, compare, and update configurations in one place.