On Tue, Aug 9, 2016 at 5:14 PM, Endre Varga <endre.va...@lightbend.com>
wrote:

>
>
> On Tue, Aug 9, 2016 at 5:07 PM, Rob Crawford <rob5...@gmail.com> wrote:
>
>> The project home page says "~2.5 million actors per GB of heap" --
>>
>
> That is sadly outdated, actors now take up more memory. Still, not a
> drastic difference, the million in magnitude likely holds.
>

I actually checked that not too long ago and "~2.2 million actors per GB of
heap" is the current number.


>
>
>> that works out to just about 430 bytes per actor. I'm assuming these
>> actors have little or no state of their own, and the figure includes the
>> Akka kernel itself.
>>
>
> Akka "kernel" is a constant in this picture. What is measured here is the
> size of a minimal actor, which is yes, a few hundred bytes. Of course as
> soon as an actor has a message in its mailbox, then that will consume
> memory.
>
>
>>
>> A system I built previously has about 750,000 components it monitors; at
>> any time about 10,000 of those are loaded in memory. This application uses
>> JMS and runs under WebSphere -- and averages about 1.3GB heap usage.
>>
>> So, even assuming the actors use 1k each, this entire system would
>> consume just around 750MB -- and even adding 250MB for "other" consumption,
>> an Akka-based system would use less memory and keep the *entire* problem
>> domain in memory.
>>
>
> This might very well be the case. I recommend to try it out though and
> look at it with VisualVM or something like that.
>
>
>> Currently, we deserialize/re-serialize batches of components when we
>> receive a batch of messages for them; it looks like with Akka we could
>> limit deserialization only to restarts, and serialization could happen
>> asynchronously with Akka persistence -- which would undoubtedly give us a
>> performance gain.
>>
>> Am I off base? Is the Akka/actor model that much more efficient?
>>
>
> More efficient than what? There is nothing surprising that an actor itself
> is a few hundred bytes (and the additional state you put in there of
> course). It just keeps a queue, some fields for various internal state
> (like references to child actors, list of watchers, etc). These are all
> small, albeit they can grow depending on the pattern the actors are used.
>
>
>> Has anyone seen gains like this?
>>
>> --
>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/c
>> urrent/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.
>



-- 

Patrik Nordwall
Akka Tech Lead
Lightbend <http://www.lightbend.com/> -  Reactive apps on the JVM
Twitter: @patriknw

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