title: Akka.net actor size
body: <p>We are seeing Akka.net actors at around 2900 bytes each.  (Akka.net v0.6.1.0)</p>
  
  <p>Is this the approximate size for each actor in Akka.net ?</p>
  
  <p><strong>Program</strong> snippet</p>
  
  <pre><code>ActorSystem actor_system = ActorSystem.Create("myActor");//create an actor
  
       var greeter = actor_system.ActorOf&lt;GreetingActor&gt;("greeter");
       InternalActorRef[] greeterArray = new InternalActorRef[100000];
  
        for (int i = 0; i &lt; greeterArray.Length; i++)
          {
            greeterArray[i] = actor_system.ActorOf&lt;GreetingActor&gt;("greeter" + i);
            Console.WriteLine("Creating Actor number " + i);
          }
  </code></pre>
  
  <p><strong>Greeter</strong></p>
  
  <pre><code>using Akka;
  using Akka.Remote;
  using Akka.slf4net;
  using Akka.Actor;
  
  namespace Akka_NET_test
  {
      //Create the actor class
      public class GreetingActor : UntypedActor
      {       
  
          protected override void OnReceive(object message)
          {
  
           message
             .Match()
           //this can be done with "if (message is Greet)" if you prefer
             .With&lt;Greet&gt;(m =&gt; Console.WriteLine("Hello {0} from GreetingActor " +  this.Self.ToString(), m.myMsg));
          }
      }
  }
  </code></pre>
  
  <p><strong>Greet</strong></p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  using Akka;
  using Akka.Remote;
  using Akka.slf4net;
  
  namespace Akka_NET_test
  {
      //Create a message type that your actor will respond to
      public class Greet
      {
          public string myMsg { get; set; }
      }
  }
  </code></pre>
  
  <p>Sizes are reported as around 400 bytes/actor for Akka jvm and around 300 bytes/process for Erlang.</p>
  
  <p>Spinning up 100,000 actors on the CLR in Akka.net seems to come in around 2900 bytes each.</p>
  
  <p>Is that approximately correct?</p>
  
  <p>Thanks in advance!</p>