The parent doesn't wait for the child to get started. It goes about its own business doing other stuff, maybe creating other children, until it gets the Supervise message byt the child. This is fully asynchronous, but you can still starve the parent by creating a huge number of children that registers and deregisters with it.
The system messages are treated specially, and are processed before other messages. As I said, doing some benchmarking is the only real answer to your questions about how many actors are ok. B/ On 27 January 2015 at 13:49:06, Paul Cleary ([email protected]) wrote: This is very useful information. So, in essence, does the parent "block" until the system message is received by the newly created child? Or, does the system message get put at the top of the mailbox, and the parent essentially receives it "immediately"? Thanks again for everyone's help, this is great. On Tuesday, January 27, 2015 at 5:27:08 AM UTC-5, Björn Antonsson wrote: Paul, The child will tell the Parent to supervise it by sending the Parent a system message. B/ On 26 January 2015 at 19:10:50, Paul Cleary ([email protected]) wrote: Thanks Victor? Is the handshake through messages sent back and forth? On Monday, January 26, 2015 at 12:29:42 PM UTC-5, √ wrote: Hi Paul, you may want to put the parent on a different dispatcher than the children, since the creation process is a handshake. (so both parent and child needs CPU time) On Mon, Jan 26, 2015 at 5:49 PM, Paul Cleary <[email protected]> wrote: Victor, Yes, they are spawned under the same parent (same actual actor ref). The parent is "long-lived", i.e. intended to hang around for the lifetime of the process. On Monday, January 26, 2015 at 11:14:40 AM UTC-5, √ wrote: Hi Paul, There's also the question if they are spawned under the same parent or not. On Mon, Jan 26, 2015 at 5:07 PM, Paul Cleary <[email protected]> wrote: Thank your for the reply, These machines are typically 4 core / 8 GB machines with only our app running. The only JVM settings are CMS and Parallel Young Generation. Also Java 1.7, Scala 2.11, Play 2.3. We have not benchmarked the actors themselves, as there are several actors in the system. The other actors are more permanent, with the FSM actor being the short lived one. My question was more of, is there guidance (JVM or Akka tuning, vm specs) in this scenario w.r.t. to VM sizing / JVM args based on a "50,000 or 100,000 actor per second" kind of model? The benchmark is an interesting idea. I could write an alternative implementation that did not use FSMs are actors at all, and then run our perf tests to see what the impact would be. On Monday, January 26, 2015 at 8:24:54 AM UTC-5, Björn Antonsson wrote: Hi Paul, There are a lot of moving parts in creating an actor, and the associated costs. What is a lot of garbage? It's a completely subjective question. Also, depending on the size of your machine, 50000 actors per second might be easy, or not possible. Have you tried to benchmark the creation of your actors? B/ On 21 January 2015 at 14:35:53, Paul Cleary ([email protected]) wrote: I have an application where we are creating and destroying "a lot" of actors. The amount of actors that are created is tied to the volume of requests on the application. I am using FSM for the Actor in question here. I do not fully understand what is involved with the setup / teardown of an individual actor, so that is part of the motivation for the question. Is it "reasonable" to be creating 10s of thousands of these FSM instances per second (say 50,000 actors create and destroyed every second)? Is there an upper limit that I should look at? Will this result in a lot of garbage? Thanks for the help! -- >>>>>>>>>> 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Björn Antonsson Typesafe – Reactive Apps on the JVM twitter: @bantonsson -- >>>>>>>>>> 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Cheers, √ -- >>>>>>>>>> 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Cheers, √ -- >>>>>>>>>> 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Björn Antonsson Typesafe – Reactive Apps on the JVM twitter: @bantonsson -- >>>>>>>>>> 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Björn Antonsson Typesafe – Reactive Apps on the JVM twitter: @bantonsson -- >>>>>>>>>> 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
