Skip to content
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

Change linger.ms default from 0.5 to 5ms to improve efficiency #2974

Merged
merged 2 commits into from
Jul 8, 2020

Conversation

edenhill
Copy link
Contributor

@edenhill edenhill commented Jul 8, 2020

Increased batching leads to less protocol overhead, less CPU usage
on client and brokers, increased throughput and in some cases also
improved latency.

@edenhill edenhill added this to the v1.5.0 milestone Jul 8, 2020
@edenhill edenhill requested a review from mhowlett July 8, 2020 08:45
Increased batching leads to less protocol overhead, less CPU usage
on client and brokers, increased throughput and in some cases also
improved latency.
* The default producer batch accumulation time, `linger.ms`, has been changed
from 0.5ms to 5ms to improve batch sizes and throughput while reducing
the per-message protocol overhead.
Applications that require lower produce latency than 5ms will need to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pedantically, this is of course more complicated, at higher throughputs they'll get better latency with 5ms linger.ms than 0.5ms. but doesn't matter...

@@ -3645,15 +3645,20 @@ const char *rd_kafka_topic_conf_finalize (rd_kafka_type_t cltype,


if (cltype == RD_KAFKA_PRODUCER) {
if (tconf->message_timeout_ms != 0 &&
(double)tconf->message_timeout_ms <=
conf->buffering_max_ms_dbl) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if buffering_max_ms_dbl was named linger_ms_dbl i would have read this quite a bit more quickly. thought the thought, so thought i'd mention it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants