unknowntpo opened a new pull request, #24314:
URL: https://github.com/apache/kafka/pull/24314

   Kafka sets fixed socket buffer sizes by default. On Linux, a fixed size 
turns off the buffer auto-tuning of the kernel for every Kafka connection. This 
PR changes the defaults to -1, so Kafka does not set SO_SNDBUF or SO_RCVBUF and 
the OS sizes the buffers.
   
   Changed defaults:
   - Broker: `socket.send.buffer.bytes`, `socket.receive.buffer.bytes` (102400) 
and `replica.socket.receive.buffer.bytes` (65536).
   - Clients: `send.buffer.bytes` (131072) and `receive.buffer.bytes` (65536 
for the consumer and the admin client, 32768 for the producer and the Connect 
worker).
   
   The example files in `config/` and `docker/server.properties` set the two 
broker values explicitly, so this PR removes those lines. It also adds a note 
to the upgrade docs and updates the advice in `docs/operations/datacenters.md`.
   
   The `StreamsConfig` defaults change only for consistency. Kafka Streams does 
not pass them to its embedded clients, which use the client defaults.
   
   The measurements and the memory cost are in KAFKA-21587. In short: with -1 
on both sides, one consumer reads about 2.3 times faster on a 0.3 ms link, and 
the gain is larger with added delay. Changing only one side gives much less.
   
   Not in this PR:
   - `tests/kafkatest/services/kafka/config.py` still sets 
`socket.receive.buffer.bytes=65536` for system test brokers.
   - The cluster mirror config `socket.receive.buffer.bytes` (65536) and the 
fixed sizes in some tools (`ConsoleProducer`, `ConsumerPerformance`, 
`ShareConsumerPerformance`, `BrokerApiVersionsCommand`).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to