-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-16368: Update default linger.ms to 5 for KIP-1030 #18080
Conversation
05d0dd1
to
8308b32
Compare
Similar comment as #18106 (comment). We need to be very explicit about the impact customers can expect on upgrade for this particular config. |
8308b32
to
641e0f9
Compare
@divijvaidya done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change look good. I am waiting for the tests to succeed before merging this in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change look good. I am waiting for the tests to succeed before merging this in.
641e0f9
to
a7b101e
Compare
These tests are passing locally so I'm not sure whats going on. Will try another rebase to trunk |
a7b101e
to
12f6bd8
Compare
+ "batch size is under this <code>batch.size</code> setting."; | ||
+ "This <code>linger.ms</code> setting defaults to 5, which means we'll wait 5ms for the accumulated " | ||
+ "<code>batch.size</code> to fill as much as it can in this timeframe. This value previously defaulted" | ||
+ "to 0, but over time we have observed that the IO overhead caused by smaller batches negates any latency gains."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wording here is a little odd. I would write something like:
"This defaults to 5, which means the producer will wait for 5ms or until the record batch is of batch.size
(whichever happens first) before sending the record batch. Note that broker backpressure can result in a higher effective linger time than this setting.
The default changed from 0
to 5
in Apache Kafka 4.0 as the efficiency gains from larger batches typically result in similar or lower producer latency despite the increased linger."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
+ "specified time waiting for more records to show up. This setting defaults to 0 (i.e. no delay). Setting <code>" + LINGER_MS_CONFIG + "=5</code>, " | ||
+ "for example, would have the effect of reducing the number of requests sent but would add up to 5ms of latency to records sent in the absence of load."; | ||
+ "specified time waiting for more records to show up. This setting defaults to 5 (i.e. 5ms delay). Increasing <code>" + LINGER_MS_CONFIG + "=50</code>, " | ||
+ "for example, would have the effect of reducing the number of requests sent but would add up to 50ms of latency to records sent in the absence of load." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't follow, we seem to be saying that increasing from 5ms to 50ms would add up to 50ms of latency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not changed the wording here. This is the same example with different values. I can change the wording also if you think it helps or isn't grokable?
docs/upgrade.html
Outdated
@@ -175,6 +175,9 @@ <h5><a id="upgrade_400_notable" href="#upgrade_400_notable">Notable changes in 4 | |||
</li> | |||
<li>The deprecated <code>sendOffsetsToTransaction(Map<TopicPartition, OffsetAndMetadata>, String)</code> method has been removed from the Producer API. | |||
</li> | |||
<li>The default value of <code>linger.ms</code> has been changed from 0ms to 5ms. The impact of this is larger request batches will be filled by default at the expense of | |||
time in the producer. It is generally observed that values lower than 5ms do not yield any latency benefits due to the IO overhead of smaller requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably use similar wording to the one I suggested in a different comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
12f6bd8
to
22f795c
Compare
22f795c
to
dd07204
Compare
dd07204
to
d17b036
Compare
Known flakey failure
|
d17b036
to
93019d4
Compare
Reviewers: Ismael Juma <[email protected]>, Divij Vaidya <[email protected]>
KAFKA-16368: As part of KIP-1030 we are increasing the default linger.ms to 5ms. System tests updated and behaviour validated manually.