First of all, I think your benchmarking methodology is flawed. Start by watching a presentation by Gil Tane about coordinated omission, such as https://www.youtube.com/watch?v=lJ8ydIuPFeU
You should use wrk2 <https://github.com/giltene/wrk2> instead of wrk. If you are interested in latencies you must first decide on a throughput rate that the system can handle and that must be lower than the maximum throughput. E.g. ./wrk -t2 -c100 -d60s --rate 20000 --latency http://localhost:8080/benchmark If you are interested in finding the maximum throughput you can increase the rate until it can't reach the target, and then you will also see that the latencies become very high, which is expected since the system is fully saturated. Secondly, your configuration doesn't look good. Start out with defaults, possibly reducing the number of threads in the default dispatcher: akka { actor { default-dispatcher { fork-join-executor { parallelism-min = 6 parallelism-max = 6 } throughput=20 } } } Thirdly, the benchmark is not representing a real world application. Regards, Patrik On Sat, Nov 11, 2017 at 5:01 PM, lutzh <[email protected]> wrote: > Hi Michael, > > Don't throw out Akka HTTP just yet, do your own measurements first. With > maybe the exception of high frequency trading, I think you'll be ok... > > > > Am Freitag, 10. November 2017 13:32:14 UTC+1 schrieb Michael Zhong: >> >> That's awful, I've recently start using akka-http to write some >> performance critical server, maybe I should go use some other library. >> >> 在 2017年8月11日星期五 UTC+8下午10:43:53,Jakub Kahovec写道: >>> >>> It was ran on the 1 Gb network, but I don't think it's actually relevant >>> here as the other servers ran on the same network and performed better. I >>> understand that raw netty should perform better, but other server performed >>> pretty good as well. As I said before we were mainly surprised by the >>> utilisation of the CPU's which was pretty low, comparing to the others. >>> >>> I'm attaching the code used for benchmarking. >>> >>> On Friday, August 11, 2017 at 3:58:19 PM UTC+2, Konrad Malawski wrote: >>>> >>>> When wanting to discuss any benchmarks, please share actual code as >>>> otherwise it's impossible to comment on what you're actually benchmarking. >>>> Same goes for benchmark setup, you did not explain how the benchmark was >>>> run and what network it was on etc. >>>> >>>> We have continuously confirmed same performance as the netty 4 backend >>>> in play apps, as well as beating spray in performance. Also, you're not >>>> comparing apples to apples it fbyou comprare raw netty without any DSLs to >>>> a high level routing API that Akka provides - thus, please share code. >>>> >>>> On August 11, 2017 at 22:53:21, Jakub Kahovec ([email protected]) >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> we've done recently a little research regarding the performance of >>>>> current JVM based HTTP servers (and Nginx for comparison) and as regards >>>>> the results of Akka-Http we were rather unpleasantly surprised. >>>>> >>>>> Here are the presumptions for the benchmark: >>>>> >>>>> - Single handler handling GET /benchmark returns HTTP 200 OK with >>>>> payload benchmark and HTTP headers Date, Server, Content-Type and >>>>> Content-Length. >>>>> - Using mostly default settings, change them only when it's >>>>> obvious that the default settings do not work well in the benchmark. >>>>> - We are interested in the maximum number of requests per second >>>>> and latencies. >>>>> - Three rounds, first is warmup and the rest try to test the >>>>> frameworks under different loads (each test 60 seconds) >>>>> - >>>>> - Warmup - ./wrk -t38 -c50 -d60s --latency >>>>> http://benchmark-server/benchmark >>>>> <http://benchmark-server/benchmark> >>>>> - Round 1 - ./wrk -t38 -c500 -d60s --latency >>>>> http://benchmark-server/benchmark >>>>> <http://benchmark-server/benchmark> >>>>> - Round 2 - ./wrk -t38 -c1000 -d60s --latency >>>>> http://benchmark-server/benchmark >>>>> <http://benchmark-server/benchmark> >>>>> >>>>> Hardware : client and benchmark machines: 40 CPUs (Intel(R) Xeon(R) >>>>> CPU E5-2630L v4 @ 1.80GHz), 64GB of RAM >>>>> >>>>> Results: >>>>> >>>>> Warmup >>>>> >>>>> | metric | nginx | akka-http | colossus | finagle >>>>> | http4s | netty | spring | vertx | >>>>> |--- |--- |--- |--- |--- >>>>> |--- |--- |--- |--- | >>>>> | req/s** | 377627.54 | 161957.96 | 341140.06 | 271592.28 >>>>> | 147829.99 | 337583.43 | 149290.22 | 356968.36 | >>>>> | latency avg | 99.18μs | 656.77μs | 386.72μs | 579.93μs >>>>> | 8.28ms | 336.11μs | 21.98ms | 345.04μs | >>>>> | latency 75th | 98.00μs | 255.00μs | 115.00μs | 149.00μs >>>>> | 248.00μs | 131.00μs | 250.00μs | 101.00μs | >>>>> | latency 99th | 149.00μs | 815.00μs | 271.00μs | 820.00μs >>>>> | 156.60ms | 198.00μs | 846.85ms | 188.00μs | >>>>> | cpu idle % | 90 | 36 | 76 | 61 >>>>> | 13 | 75 | 57 | 76 | >>>>> >>>>> >>>>> Round 1 >>>>> >>>>> | metric | nginx | akka-http | colossus | finagle >>>>> | http4s | netty | spring | vertx | >>>>> |--- |--- |--- |--- |--- >>>>> |--- |--- |--- |--- | >>>>> | req/s | 988019.69 | 245979.16 | 1007300.12 | 460936.09 >>>>> | 149288.46 | 1021265.73 | 258088.17 | 990153.39 | >>>>> | latency avg | 642.29μs | 3.31ms | 831.16μs | 4.49ms >>>>> | 122.44ms | 2.12ms | 9.57ms | 1.96ms | >>>>> | latency 75th | 537.00μs | 2.79ms | 572.00μ >>>>> >>>> -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/ > current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Patrik Nordwall Akka Tech Lead Lightbend <http://www.lightbend.com/> - Reactive apps on the JVM Twitter: @patriknw -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
