Small update - disabling auto fuse, or pre-fusing (with & without auto 
fusing) has an effect (BTW I could not find a way to do this with the java).
Performance is improved by up to 50%.

However, it's still not in the same order of magnitude as other libraries.
It's still at least 1 second for the fastest requests.

On Tuesday, April 19, 2016 at 12:25:24 AM UTC+3, Adam wrote:
>
> Yeah, no code is rather silly really...
>
> I've created this repository:
>
> https://github.com/adamhonen/Akka-Http-performance-test
>
> I didn't get a chance to try the suggestions above yet, though.
>
>
> On Monday, April 18, 2016 at 10:25:00 PM UTC+3, Konrad Malawski wrote:
>>
>> I see some results, but no code that is being benchmarked – please always 
>> post benchmarked code together with benchmark, otherwise it's hard to tell 
>> what's actually going on.
>>
>> On Mon, Apr 18, 2016 at 9:19 PM, Johan Andrén <johan....@typesafe.com> 
>> wrote:
>>
>>> Yet another thing to test could be to pre-fuse your Request => Response 
>>> flow, first, and then run that with autoFusing turned on or off. Locally I 
>>> get the best improvement with pre-fusing and no autoFusing. Looks like this:
>>>
>>>   implicit val materializer = 
>>> ActorMaterializer(ActorMaterializerSettings(system))
>>>
>>>     val routes = 
>>>       path("benchmark") {
>>>         get {
>>>           complete("ok")
>>>         }
>>>       }
>>>
>>>     val flow: Flow[HttpRequest, HttpResponse, NotUsed] = routes
>>>
>>>     val prefused = Fusing.aggressive(flow)
>>>
>>>     Http().bindAndHandle(
>>>       handler = Flow.fromGraph(prefused),
>>>       interface = "localhost",
>>>       port = 9000)
>>>
>>> --
>>> John Andrén
>>> Akka Team, Lightbend Inc.
>>>
>>>
>>> On Monday, April 18, 2016 at 9:11:10 PM UTC+2, Johan Andrén wrote:
>>>>
>>>> One thing that could be interesting to try out if you want to achieve 
>>>> as high throughput as possible where each new request is a new connection 
>>>> with the current akka-http version is to disable autoFusing (which is 
>>>> pretty costly). That can be done when you create the materializer like 
>>>> this: 
>>>>
>>>>   
>>>> ActorMaterializer(ActorMaterializerSettings(system).withAutoFusing(false))
>>>>
>>>> This will of course come at the cost where persistent connections get a 
>>>> performance hit instead.
>>>>
>>>> --
>>>> John Andrén
>>>> Akka Team, Lightbend Inc.
>>>>  
>>>>
>>>> On Monday, April 18, 2016 at 1:06:58 PM UTC+2, Andrew Gaydenko wrote:
>>>>>
>>>>> Adam, thanks!
>>>>>
>>>>> Very informative. I also have found handy to use almost empty response 
>>>>> to estimate the whole request-response chain itself (starting from now 
>>>>> abandoned tiscaf [1] and rising rps up to almost 90K on humble 
>>>>> workstation 
>>>>> :) ).
>>>>>
>>>>> [1] http://gaydenko.com/scala/tiscaf/httpd/
>>>>>
>>>> -- 
>>> >>>>>>>>>> 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+...@googlegroups.com.
>>> To post to this group, send email to akka...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>> Cheers,
>> Konrad 'ktoso' Malawski
>> Akka <http://akka.io/> @ Lightbend <http://lightbend.com/>
>>
>

-- 
>>>>>>>>>>      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.

Reply via email to