iatsuk opened a new pull request, #24170: URL: https://github.com/apache/kafka/pull/24170
A send can have many small parts, for example a FetchResponse has a header and the records of each partition. MultiRecordsSend writes every part with its own system call, and because TCP_NODELAY is set, every part leaves as its own TCP segment. With many partitions this creates a lot of small packets. KafkaChannel.write() now turns TCP_NODELAY off while it writes the send and turns it on again after the write. Linux sends the queued data at once when TCP_NODELAY is turned on, so the parts are joined into full segments and nothing waits for an ACK. On other platforms the behaviour does not change. Generated-by: Claude Opus 5.5 -- 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]
