I have just tried an experiment whereby I have created large numbers of actors (~120k) in very quick succession. Each actor should stop itself roughly ten minutes after being created upon receiving a system-wide "ping" from its parent. The ping happens once-per-minute whereas actors are being created at the rate of 50-200/s, so I would expect any given ping to result in around 3,500 actors being stopped.
The system was running very smoothly until the actors started to stop themselves; at this point my PC ground to a halt with the CPU maxed out on the process. At this point, a JConsole told me that all of the dispatchers were doing this:
Name: eucleia-akka.actor.default-dispatcher-25
Total blocked: 6,000 Total waited: 44,098
scala.collection.immutable.VectorIterator.initFrom(Vector.scala:621)
scala.collection.immutable.VectorPointer$class.initFrom(Vector.scala:727)
scala.collection.immutable.VectorIterator.initFrom(Vector.scala:621)
scala.collection.immutable.Vector.initIterator(Vector.scala:61)
scala.collection.immutable.Vector.iterator(Vector.scala:68)
scala.collection.immutable.Vector.iterator(Vector.scala:36)
scala.collection.IterableLike$class.exists(IterableLike.scala:78)
scala.collection.immutable.Vector.exists(Vector.scala:36)
scala.collection.SeqLike$class.contains(SeqLike.scala:401)
scala.collection.immutable.Vector.contains(Vector.scala:36)
akka.event.ActorClassification$class.dissociateAsMonitor$1(EventBus.scala:285)
akka.event.ActorClassification$class.dissociate(EventBus.scala:292)
akka.actor.LocalDeathWatch.dissociate(ActorRefProvider.scala:558)
akka.actor.LocalDeathWatch.publish(ActorRefProvider.scala:561)
akka.actor.LocalDeathWatch.publish(ActorRefProvider.scala:558)
akka.actor.ActorCell.doTerminate(ActorCell.scala:692)
akka.actor.ActorCell.terminate$1(ActorCell.scala:580)
akka.actor.ActorCell.systemInvoke(ActorCell.scala:597)
akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:191)
akka.dispatch.Mailbox.processMailbox(Mailbox.scala:180)
akka.dispatch.Mailbox.run(Mailbox.scala:161)
akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:505)
akka.jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:259)
akka.jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:997)
akka.jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1495)
akka.jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
Name: eucleia-akka.actor.default-dispatcher-27
Total blocked: 6,607 Total waited: 53,355
akka.event.ActorClassification$class.dissociateAsMonitor$1(EventBus.scala:280)
akka.event.ActorClassification$class.dissociate(EventBus.scala:292)
akka.actor.LocalDeathWatch.dissociate(ActorRefProvider.scala:558)
akka.actor.LocalDeathWatch.publish(ActorRefProvider.scala:561)
akka.actor.LocalDeathWatch.publish(ActorRefProvider.scala:558)
akka.actor.ActorCell.doTerminate(ActorCell.scala:692)
akka.actor.ActorCell.terminate$1(ActorCell.scala:580)
akka.actor.ActorCell.systemInvoke(ActorCell.scala:597)
akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:191)
akka.dispatch.Mailbox.processMailbox(Mailbox.scala:180)
akka.dispatch.Mailbox.run(Mailbox.scala:161)
akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:505)
akka.jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:259)
akka.jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:997)
akka.jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1495)
akka.jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
After approximately 15 minutes, the system went from 90% CPU usage down to 25% usage (at this point, there were still roughly ~110k actors running). Over the following 5 minutes, the actors gradually stopped at a rate of ~3.5k/minute and then, very quickly (in a matter of seconds) the remaining 90k actors shut down.
I'm not entirely clear what the system was doing during the period it was maxed out (originally I thought it was the stopping of actors was doing some O(N) traversal for each actor stopping - but now I'm not so sure because of how it sped up).