akka中每个主机的最大演员数 [英] max number of actors per host in akka

查看:131
本文介绍了akka中每个主机的最大演员数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

akka中的一个方框可以有多少个最大角色?

How many max actors can we have on one box in akka?

public void MyActor extends AkkaActor{

  receive(Objet obj){
    // so something
  } 

}

1)Is there some limit on max number of actors instances?I am planning to created around 10K actors on one box. I will have 50 such boxes so that i can scale horizontally
2)IS there some performance problems with this?


推荐答案

只需拥有足够的内存:一个actor的开销大约是400字节(加上你保留在其中的任何状态)。这意味着在典型系统中,您可以拥有数百万个演员。性能不依赖于您创建的actor的数量,这取决于您在它们之间发送的消息数量。你不应该担心这个数字是否达到每秒几百万,除此之外,你必须根据你选择的硬件对程序进行基准测试,看看它是否有用。

It is just a matter of having enough memory: the overhead of one actor is roughly 400 bytes (plus whatever state you keep within it). This means that on typical systems you can have millions of actors. The performance does not depend on the number of actors you create, it depends on how many messages you send between them. You should not worry if that number is up to a few million per second, beyond that you will have to benchmark your program against your chosen hardware to see if it works out.

这篇关于akka中每个主机的最大演员数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆