-
Notifications
You must be signed in to change notification settings - Fork 58
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
Performance in benchmarks #386
Comments
https://discuss.lightbend.com/t/akka-grpc-performance-in-benchmarks/8236/14 |
I was doing some more profiling after having fixed the heap settings, and even though the results are much better I noticed the usage of I am not very experienced with cats-effect, but my understanding is that we could use Async FFI without having to call "unsafe" code |
You could try to see if it makes things faster by using runtime's compute pool as |
I tried that and even |
I did try it and memory did not go up and it was around 2k faster than otherwise. However, I suppose there is unnecessary context shifting, but not sure what is the best way to avoid that. |
Maybe I was doing something wrong, but I will try again later today and will let you know. What were the benchmark settings you were using? Meanwhile did you had a look at that |
I cannot remember what I did, but tried again by allocating more CPU to see what happened:
and grpc-java
Most likely context switching that is killing the performance for fs2-grpc. |
Can you have a look at #394 and see if it helps? (should slightly reduce the number of unsafeRun operations per request) |
No, never mind. There wasn't actually much to improve there. But there is another issue: #39 -- flow control. I mentioned subtleties before, but I've completely lost context. I'll start having another look at this. But flow control is important -- right now, the "window size" for data from the client is always 1 or 0, and this could have a major impact on throughput. |
And that's not an issue in non-streaming scenarios, which is the case in the benchmark 😞 |
If it is of any usefulness, Lightbend blogged about how they increased Akka gRPC performance |
Hi
I am opening this issue to document some findings about the fs2-grpc performance in this benchmark. I started this journey investigating why the akka-grpc results were so bad (https://discuss.lightbend.com/t/akka-grpc-performance-in-benchmarks/8236/) but then got curious what would be the numbers for other implementations...
The fs2-grpc implementation of the benchmark was done in this PR and the results I got were
I did some profiling with JFR and wanted to share the results
The biggest problem is GC:
Threads look fine:
Memory:
And the culprits are
scalapb.GeneratedMessageCompanion.parseFrom
,fs2.grpc.server.Fs2ServerCall#sendMessage
. There is also a lot ofcats.effect.*
stuff...The text was updated successfully, but these errors were encountered: