-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
ZIO2 performance issue while performing streaming calls on version 0.6.x
#513
Comments
Have you tried increasing the back pressure queue size? The default is very small and that may explain this behaviour. We use a queue of 512k iirc in our service. |
No, I did not, will give it a try! Thanks! 🙌🏻 |
Unfortunately, it did not help. At first I was not sure if the config was reaching that back pressure queue, but debugging the service I was able to see the new config I set, and sadly, no change in CPU usage. |
We are running into a very similar performance problem. We are not using streaming but we notice that when we receive grpc requests over time, the number of
Is the new fiber correctly being released? |
@cipriansofronia hello - could you give this one a try: #514 It maybe was a mistake to use @Gregory-Berkman-Imprivata that looks like a separate issue but you are right that we should rather fork in a scope that is closed when the call terminates. |
@regiskuckaertz, I published locally your changes from #514, tested it with the |
Yiihaaa! That is great to hear, thanks for trying it out. It's also weird to come back to something you wrote months ago and think "wow was I on the crack pipe back then? this is way too complex" 😄 |
@Gregory-Berkman-Imprivata I think this will help #515 |
@thesamet, @regiskuckaertz, could you release another RC with these changes, please? |
Sure, will cut a release this week. |
@regiskuckaertz and @thesamet, I really appreciate your help and fast replies. The issue is solved now, so I'm closing it. Cheers! |
We did a round of load testing using RC5 (which reproduced this issue, perf was bad) and then using the latest snapshot, and the latest shapshot gave us a great performance (better than our zio 1 code!). How about a first official release for ZIO 2 finally? 😄 |
@regiskuckaertz Not sure if this has been fixed actually. I can open a new issue for this but I am still seeing the number of This is from running load tests locally on my machine. the number of instance of the FiberId only increases
|
I think you can close this issue since this is unrelated to streaming. Let's discuss in #537 |
We recently migrated to ZIO2, so zio-grpc got bumped to
0.6.0-rc5
. We've noticed some performance issues after the upgrade while performing streaming calls. Going to attach some screenshots of the IntelliJ Profiler.On the upper hand of the screenshot there is the timeline of the previous version of zio-grpc (
0.5.1
) running with ZIO1 and below we have the zio-grpc version0.6.0-rc5
with ZIO2.The streaming request is kept alive for a few seconds for both versions but we can notice some differences between these two. On
0.5
there is a small spike when the request is triggered but then the CPU goes down and it stays like that, on0.6
the CPU load is bigger and it says like that for the duration of the streaming request (not shown here in the screenshots but if we trigger more requests then the CPU goes even higher).There are no other changes in our service, only the migration to ZIO2 and bumping zio-grpc, so not doing anything extra on the new version for the same streaming call. The only thing different I noticed is that
0.6
is allocating more resources while performingserverStreamingWithBackpressure
and underneath is calling ZIO2 internals. Using ZIO2 streaming so far in other parts of the app did not present performance issues.We isolated even more the streaming call, we created a separate project with zio-grpc
0.6
where we only do:So, nothing CPU consuming and we got the same behaviour.
Please advise if more informations are needed.
The text was updated successfully, but these errors were encountered: