Re: [akka-user] Re: Akka HTTP Performance (2.4.2-RC1)
+1 here as well. I've been waiting in anger for akka-http to catch up to spray in terms of performance and have verified some great leaps in recent builds. Thanks guys! If there really is a 6-7x speedup waiting to fall into place (after bug fixing), that would be amazing (and worth the wait). On Friday, February 5, 2016 at 3:18:17 PM UTC-8, Gavin Baumanis wrote: > > Please let me add my +1 to this thread. > it has been great to get an understanding of the current state of play for > akka HTTP and the how and whys of current performance limits and the soon > to be implemented updates! > > Great work everyone - as a consumer of all your hard work, I must say > Thank-you! > > Gavin. > > On Friday, 5 February 2016 09:46:08 UTC+11, tigerfoot wrote: >> >> Endre, >>> >> >> Thanks for this great explanation--makes complete sense. It's really >> exciting to see this generation of Akka functionality come together! >> >> Greg >> > -- >> 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 akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Re: Akka HTTP Performance (2.4.2-RC1)
Please let me add my +1 to this thread. it has been great to get an understanding of the current state of play for akka HTTP and the how and whys of current performance limits and the soon to be implemented updates! Great work everyone - as a consumer of all your hard work, I must say Thank-you! Gavin. On Friday, 5 February 2016 09:46:08 UTC+11, tigerfoot wrote: > > Endre, >> > > Thanks for this great explanation--makes complete sense. It's really > exciting to see this generation of Akka functionality come together! > > Greg > -- >> 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 akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Re: Akka HTTP Performance (2.4.2-RC1)
> > Endre, > Thanks for this great explanation--makes complete sense. It's really exciting to see this generation of Akka functionality come together! Greg -- >> 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 akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Re: Akka HTTP Performance (2.4.2-RC1)
Hi, I ask for a bit more patience :) I give you a bit of overview so you don't feel that I just handwave this away: - The case of persistent KeepAlive connections This is already quite fast, we have measured 75% of Spray, and other user in the linked discussion 50%. I don't yet know where the difference comes, but it looks like we somehow underutilize the available cores. I have a suspicion of what causes this: https://github.com/akka/akka/issues/19682 The reason why this is fast because the cost of assembling the Http processing graph, fusing it and then materializing it happens only once for the connection. After the first request everything is set up and fast and processing of a request happens in only one actor (this is the power of fusing). - The case of new connections per request First cost is that we assemble the Http graph for every connection. We went through great pains to make this unnecessary, so the graph is now fully reusable, we just don't reuse it yet. This already gives significant improvements since we would now assemble the bluepring only at the startup and reuse it, and not creating a new one per connection. Second cost is that we need to fuse the graph again and again. After we reuse the graph, we can already perform the fusing upfront, at the startup of the server. This has *huge* impact for performance and it is very easy to do once the previous step is done. Third cost is the fusing of the whole Http+userHandler with the actual incoming connection Flow, and then materializing it. Our approach here would be probably to perform the whole fusing with a placeholder stage that represents the connection, then just copy this blueprint for incoming connections and fill in the actual connection - avoiding the cost of fusing per connection. Materialization will be fast, too, since there will be in most of the cases one or two actors to be created. This probably needs a bit of work, but definitely doable (for the simplest cases I already know how to do it). In genereal, we are just a few footsteps away of some crazy optimizations which are not hard to implement. We did already the hard work to make these possible, but we have not put in there the "final bricks". The reason why we have not done any of these is because we have quite a bit of bugs to fix, which are of higher priority right now than these optimizations. -Endre On Wed, Feb 3, 2016 at 11:03 PM, tigerfoot wrote: > RC2 is indeed a little better. I tried a couple of other lightweight > frameworks with a 'ping' message and got results for 500 about 500ms faster > than Akka--but that is expected since these frameworks don't do half of > what Akka does, and its still within what I feel is a comparable range. I > guess HTTP itself is just a heavy thing. > > -- > >> 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 akka-user+unsubscr...@googlegroups.com. > To post to this group, send email to akka-user@googlegroups.com. > Visit this group at https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- >> 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 akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Re: Akka HTTP Performance (2.4.2-RC1)
RC2 is indeed a little better. I tried a couple of other lightweight frameworks with a 'ping' message and got results for 500 about 500ms faster than Akka--but that is expected since these frameworks don't do half of what Akka does, and its still within what I feel is a comparable range. I guess HTTP itself is just a heavy thing. -- >> 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 akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Re: Akka HTTP Performance (2.4.2-RC1)
Sorry I meant try 2.4.2-RC2 On Wednesday, February 3, 2016 at 8:18:22 PM UTC, Guido Medina wrote: > > That has been reported and resolved, tried 2.4.2-CR2 which was released > yesterday I think. > > On Wednesday, February 3, 2016 at 8:05:18 PM UTC, tigerfoot wrote: >> >> Hello, >> >> I'm running some simple HTTP performance measurements. I've created a >> trivial "ping" endpoint (blindly returns "pong") in Akka HTTP and hit it >> like this: >> >> val now = System.currentTimeMillis() >> (1 to 500).foreach(i => { >> HttpUtil.send(HttpRequest(uri = >> s"http://$IP:8082/ping";).withHeaders(ApiVerHeader("v1.0"))).status should >> be(StatusCodes.OK) >> }) >> val later = System.currentTimeMillis() >> println("TIME: " + (later - now)) >> >> >> Ok, so I'm timing the send of 500 ping requests running on the same >> machine as the server. My time for this was 3114ms. Granted these are >> fully serialized in my test, and I will try a non-blocking client run, but >> I'm still surprised by the low throughput. I thought the serialized test >> would best show the overhead of the HTTP processing, vs total possible >> throughput. >> >> I also see on my screen a few hundred of these messages: >> >> 13:47:51.953 [foo-akka.actor.default-dispatcher-17] ERROR >> akka.actor.ActorSystemImpl - Outgoing request stream error >> akka.stream.AbruptTerminationException: Processor actor >> [Actor[akka://foo/user/StreamSupervisor-0/flow-1046-0-unknown-operation#291433690]] >> >> terminated abruptly >> >> Not sure what these are, or if they're just harmless noise generated when >> I shut down my ActorSystem after the test. >> >> Does this performance seem about right/expected? I was hopeful to see a >> stronger showing since 2.4.2 was supposed to be getting closer to Spray's >> performance. >> >> Greg >> > -- >> 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 akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Re: Akka HTTP Performance (2.4.2-RC1)
That has been reported and resolved, tried 2.4.2-CR2 which was released yesterday I think. On Wednesday, February 3, 2016 at 8:05:18 PM UTC, tigerfoot wrote: > > Hello, > > I'm running some simple HTTP performance measurements. I've created a > trivial "ping" endpoint (blindly returns "pong") in Akka HTTP and hit it > like this: > > val now = System.currentTimeMillis() > (1 to 500).foreach(i => { > HttpUtil.send(HttpRequest(uri = > s"http://$IP:8082/ping";).withHeaders(ApiVerHeader("v1.0"))).status should > be(StatusCodes.OK) > }) > val later = System.currentTimeMillis() > println("TIME: " + (later - now)) > > > Ok, so I'm timing the send of 500 ping requests running on the same > machine as the server. My time for this was 3114ms. Granted these are > fully serialized in my test, and I will try a non-blocking client run, but > I'm still surprised by the low throughput. I thought the serialized test > would best show the overhead of the HTTP processing, vs total possible > throughput. > > I also see on my screen a few hundred of these messages: > > 13:47:51.953 [foo-akka.actor.default-dispatcher-17] ERROR > akka.actor.ActorSystemImpl - Outgoing request stream error > akka.stream.AbruptTerminationException: Processor actor > [Actor[akka://foo/user/StreamSupervisor-0/flow-1046-0-unknown-operation#291433690]] > > terminated abruptly > > Not sure what these are, or if they're just harmless noise generated when > I shut down my ActorSystem after the test. > > Does this performance seem about right/expected? I was hopeful to see a > stronger showing since 2.4.2 was supposed to be getting closer to Spray's > performance. > > Greg > -- >> 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 akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.