You can try and compare Balance, Partition and PartitionHub.
/Patrik

> On Sep 19, 2017, at 00:16, Jakub Liska <liska.ja...@gmail.com> wrote:
> 
> Hey,
> 
> having an operation that heavily utilizes CPU and RAM, nothing else (no IO), 
> but it is a main bottleneck, then it never pays off using `stream.mapAsync` 
> for it unless you batch operations by something like 10 000, so I started 
> using stuff like :
> 
> .map(operation).withAttributes(
>     Attributes.asyncBoundary 
>       .and(Attributes.inputBuffer(16,32))
>       .and(ActorAttributes.dispatcher("pinned-dispatcher"))
>     )
> 
> that is usually at least 3x more effective than `mapAsyncUnordered(4)`, but 
> it still utilizes only one CPU core.
> 
> Can you think of anything better than this or how to improve the above ^^ ? 
> 
> One way would be probably to split the flow into 4 substreams which would 
> lead to utilizing 4 cores, right ? So is akka.stream.scaladsl.Balance the way 
> to tackle this challange? 
> -- 
> >>>>>>>>>> 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.

Reply via email to