简体   繁体   English

AKKA 中的哪个调度程序配置对于更多没有并行处理的参与者是有效的?

[英]Which dispatcher configuration in AKKA is efficient for more no of actor processing in parallel?

When we us pinned dispatcher we have to assign a single thread for an actor.当我们固定调度程序时,我们必须为演员分配一个线程。
In Default dispatcher we have a thread pool with a allocated threads used by many actors.在默认调度程序中,我们有一个线程池,其中分配了许多参与者使用的线程。

If we use a dispatcher with 1000 threads and for a 5000 actors sharing that.如果我们使用一个有 1000 个线程的调度程序,并且有 5000 个参与者共享它。
How to efficiently configure it when more than 1000 actors receiving messages in mailbox.当超过 1000 个参与者在邮箱中接收消息时如何有效地配置它。

What are the things to configured in dispatcher end to use threads efficient way.在调度程序端配置什么以使用线程有效的方式。

The PinnedDispatcher uses a different threadpool (of size 1) for every actor, so if you have 5000 actors using a pinned dispatcher, there will be up to 5000 threads (because idle threadpools will be shutdown and restarted as needed). PinnedDispatcher为每个参与者使用不同的线程池(大小为 1),因此如果您有 5000 个参与者使用固定调度程序,那么将有多达 5000 个线程(因为空闲的线程池将根据需要关闭并重新启动)。

The pinned dispatcher is intended to be used with a fairly small number of very busy actors;固定调度程序旨在与相当少数非常忙碌的演员一起使用; what exactly a small number is depends on the application and the infrastructure it's running on, but in general any number greater than 100 is almost certainly not fairly small for this purpose.究竟是多少取决于应用程序和它所运行的基础设施,但一般来说,任何大于 100 的数字对于这个目的几乎肯定不是相当小。 You can have multiple dispatchers in an application: the vast majority of your actors will be best off running in other dispatchers.您可以在一个应用程序中拥有多个调度程序:绝大多数演员最好在其他调度程序中运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM