You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "sanghyeok An (Jira)" <ji...@apache.org> on 2026/03/19 23:25:00 UTC

[jira] [Commented] (KAFKA-20342) Kafka Clients performance degradation

    [ https://issues.apache.org/jira/browse/KAFKA-20342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18066903#comment-18066903 ] 

sanghyeok An commented on KAFKA-20342:
--------------------------------------

[~foryst] Hi!

Could you please set linger.ms=0 explicitly in the test harness and run the test again?

In 3.9.2, the default value of linger.ms is 0, while in 4.x it seems to be 5.

Does the RTT include the two send actions from the producer? If so, I wonder whether this could also be explained by an increase of roughly linger.ms × 2.

What do you think?

> Kafka Clients performance degradation
> -------------------------------------
>
>                 Key: KAFKA-20342
>                 URL: https://issues.apache.org/jira/browse/KAFKA-20342
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>    Affects Versions: 4.0.0, 4.2.0, 4.1.1
>         Environment: Apache Kafka 4.2.0 (on docker)
> Java 25
>            Reporter: Tomasz
>            Priority: Critical
>
> We've observed significant performance degradation on using kafka with kafka-clients 3.9.2 and 4.X.X. I've created project which is using kafka-clients to send/receive messages from kafka (link below) with 10000 messages. There is no difference on using different serializers (tested on string and json).
> +Kafka-clients: 3.9.2+
> Kafka perf run completed for mode DIRECT: PerfRunResult[requestedCount=10000, repliedCount=10000, timeoutCount=0, totalDurationMs=31669, averageRoundTripMs=3.0808, maxRoundTripMs=99]
> +Kafka-clients: 4.1.1+
> Kafka perf run completed for mode DIRECT: PerfRunResult[requestedCount=10000, repliedCount=10000, timeoutCount=0, totalDurationMs=167634, averageRoundTripMs=16.6516, maxRoundTripMs=140]
> +Kafka-clients: 4.2.0+
> Kafka perf run completed for mode DIRECT: PerfRunResult[requestedCount=10000, repliedCount=10000, timeoutCount=0, totalDurationMs=129510, averageRoundTripMs=12.8591, maxRoundTripMs=68]
> I though it was related with spring-kafka but after additional tests (without spring usage), we've confirmed this is related to the kafka-clients and we got the same confirmation from Spring developers.
> Spring-kafka issue for the information:
> [https://github.com/spring-projects/spring-kafka/issues/4358]
> Project used for tests:
> [https://github.com/infoShare/spring-kafka-perf]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)