Silica Language Updates (1 million actors in 0.78 seconds!)

I will be posting the updates for language progress to this topic. If you were interested in the rust beam implementation I was working on, this is its replacement. See the gitHub repo for the latest builds of the compiler and the latest source code. See the silica website for general information.

Here is the latest info regarding the size and speed of actors when they are spawned. This is run on an M4 MacMini with 16 Gig of RAM. I’ll post the results of a run on linux x86-64 and linux AArch64 later when I run those (the compilers exist for those also). For a 512K RAM ESP32-S3 board (w/o an OS) 1,000 actors spawned leaves about 32K of RAM unused.

FYI, yes you can move actors from core to core on non-os hosted environments and from thread to thread in hosted environments. The first run is without sending a message to the mailboxes, the second sends a message to the mailboxes. Now for the data!!

% ./run_million_actors.sh

== compiling with /Volumes/2T/silica/binaries/silica-compiler

== assembling and linking

== running (target 1000000 idle actors)

1000000 idle actors after 0.78 s

RSS when the target line printed : 661 MB

RSS peak while running : 661 MB

RSS 4 s after the target (rest) : 661 MB

exit status 0

% ./run_million_actors.sh --send

== compiling with /Volumes/2T/silica/binaries/silica-compiler

== assembling and linking

== running (target 1000000 idle actors, send message: yes)

1000000 idle actors after 5.59 s

RSS when the target line printed : 1230 MB

RSS peak while running : 1230 MB

RSS 4 s after the target (rest) : 654 MB

exit status 0

Here are the results for an analogous run of an Erlang app spawning 1 million processes. Silica is slower but uses less RAM (1230 MB vs 2.7 GiB), but then again I have done zero speed enhancements for Silica actors at this point…so work can be done to improve! Exciting times!

Time

  • Spawn: 0.454 s
  • Send plus all replies: 0.673 s
  • Spawn and send together: about 1.13 s
  • Teardown: 1.000 s, so about 2.1 s for the whole run

Peak RAM: about 2.76 GiB (2,958,262,272 bytes). macOS reported that as the maximum resident set size for the whole run.