-
Notifications
You must be signed in to change notification settings - Fork 10
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
Armeria server performance analaysis #4
Comments
@hamnis set up a server-example project, which we've used to run some crude benchmarks between the various backends. It doesn't show off much yet, but it gives us a baseline for pings. |
1st Benchmark:
|
…Publisher` Motivation: The conversion between `fs2.Stream` and Reactive Streams `Publihser` is one of the bottlecks in that benchmark of http4s#4 Modifications: - Write on demand instead of `Publisher` Result: - Before ``` Running 30s test @ http://127.0.0.1:8080/hello 12 threads and 400 connections Thread Stats Avg Stdev Max +/- Stdev Latency 11.76ms 2.97ms 86.66ms 89.53% Req/Sec 1.71k 0.94k 3.64k 52.50% 611170 requests in 30.02s, 107.62MB read Socket errors: connect 155, read 170, write 0, timeout 0 Requests/sec: 20358.15 Transfer/sec: 3.58MB ``` - After ``` Running 30s test @ http://127.0.0.1:8080/http4s/thread 12 threads and 400 connections Thread Stats Avg Stdev Max +/- Stdev Latency 3.77ms 2.41ms 145.85ms 96.60% Req/Sec 5.39k 2.88k 59.63k 60.04% 1932651 requests in 30.10s, 312.64MB read Socket errors: connect 155, read 168, write 0, timeout 0 Requests/sec: 64207.03 Transfer/sec: 10.39MB Running 30s test @ http://127.0.0.1:8080/http4s/thread 12 threads and 400 connections Thread Stats Avg Stdev Max +/- Stdev Latency 3.92ms 1.30ms 63.05ms 95.09% Req/Sec 5.11k 2.48k 10.36k 61.56% 1831547 requests in 30.03s, 296.28MB read Socket errors: connect 155, read 160, write 0, timeout 0 Requests/sec: 60989.03 Transfer/sec: 9.87MBow it will be ignored. ```
…Publisher` (#8) Motivation: The conversion between `fs2.Stream` and Reactive Streams `Publisher` is one of the bottlenecks in that benchmark of #4 Modifications: - Write on demand instead of `Publisher` Result: - Before ``` Running 30s test @ http://127.0.0.1:8080/hello 12 threads and 400 connections Thread Stats Avg Stdev Max +/- Stdev Latency 11.76ms 2.97ms 86.66ms 89.53% Req/Sec 1.71k 0.94k 3.64k 52.50% 611170 requests in 30.02s, 107.62MB read Socket errors: connect 155, read 170, write 0, timeout 0 Requests/sec: 20358.15 Transfer/sec: 3.58MB ``` - After ``` Running 30s test @ http://127.0.0.1:8080/http4s/thread 12 threads and 400 connections Thread Stats Avg Stdev Max +/- Stdev Latency 3.77ms 2.41ms 145.85ms 96.60% Req/Sec 5.39k 2.88k 59.63k 60.04% 1932651 requests in 30.10s, 312.64MB read Socket errors: connect 155, read 168, write 0, timeout 0 Requests/sec: 64207.03 Transfer/sec: 10.39MB Running 30s test @ http://127.0.0.1:8080/http4s/thread 12 threads and 400 connections Thread Stats Avg Stdev Max +/- Stdev Latency 3.92ms 1.30ms 63.05ms 95.09% Req/Sec 5.11k 2.48k 10.36k 61.56% 1831547 requests in 30.03s, 296.28MB read Socket errors: connect 155, read 160, write 0, timeout 0 Requests/sec: 60989.03 Transfer/sec: 9.87MBow it will be ignored. ```
Is it resolved? Congrats on the new release! |
I think there is a room we can optimize http4s-armeria performance. 💪 Loads of the benchmark were a simple "hello world" text message with HTTP/1.1. I only got rid of a conversion that converts from fs2 streams to Reactive Streams for |
Thanks for the explanation. Looking forward to it! |
@ikhoon was the optimization to fs2 done? |
It was partially done and is still in progress. But there were many performance optimizations on the Armeria side. |
@ikhoon It's been two years since you have done the benchmark. It'd be nice if you can run it with the new |
Agreed. Benchmark results might be changed somehow. I will run benchmarks soon. |
A benchmark and performance analysis would be good data to advocate Armeria server to http4s' users.
The text was updated successfully, but these errors were encountered: