-
Notifications
You must be signed in to change notification settings - Fork 133
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
2.3.x increases latency for consumed messages #903
Comments
Thanks @myazinn! We made a change (here, not yet released. Will be released in Would it be possible for you to test if it does fix your issue maybe, please? To do that, you'll have to:
ThisBuild / resolvers ++= Resolver.sonatypeOssRepos("snapshots")
val settings =
ConsumerSettings(
...
enableOptimisticResume = false
) I'm interested in seeing what are the latencies registered in your graphs when this optimisation is disabled. |
Hi @guizmaii |
Thank you so much for this @myazinn! Super helpful! ❤️
When you say "does solve a problem", does that mean you have more problems with zio-kafka? @erikvanoosten Did you expect such an issue with the optimistic resume optimisation? |
No, it's just my bad English. It does solve THE problem 😄 |
I already knew that the Java client can stick to a partition for a very long time. However, I had never realized that very efficient consumers could be affected by it once we do optimistic resume. |
@myazinn What are the consumer properties? It could be that tweaking the consumer properties can help as well. |
See also discussion here #844 (comment). |
@erikvanoosten
|
Same for Especially I really recommend you stay a lot closer to the default values as documented on https://kafka.apache.org/documentation/#consumerconfigs. |
I close the issue as, I think, we fixed the issue. @myazinn Feel free to ask for us to reopen it if you feel we didn't address your issue. |
Hi @erikvanoosten. Thank you for reply :) Just to clarify a few things
But it's not 1 GiB 🤔 1048576 bytes = 1_048_576 bytes = 1 MiB.
I believe you meant |
You are right @myazinn, it must have been too late when I wrote that. My apologies. 50Mb is still a lot for |
No problem, thanks for the advice :) Tomorrow I'll try reducing this parameter and will check how it goes. |
This issue is basically a copy of this comment as was discussed in Discord.
We monitor topic lags (diff between message timestamp and when our service starts processing it), and here's what we've got with several ZIO and zio-kafka versions (different colours - different topic-partitions)
Left part (small lags) -
ZIO 2.0.11
+zio-kafka 2.1.3
. Middle part (huge lags for some topic partitions) -ZIO 2.0.14
+zio-kafka 2.3.1
. Right side (after red tooltip, small lags again) -ZIO 2.0.14
+zio-kafka 2.2
.2.3.1 seems to also consume more CPU (different colours - different pods)
Memory consumption is roughly the same, but 2.3.1 puts much more pressure on GC (ZGC) for some reason
The text was updated successfully, but these errors were encountered: