In Chapter 8 of Programming Erlang, there is a short example that performs a rough measurement of the time it takes to spawn a given number of processes. Check the book if you want to see the code that genereates the test, but I just wanted to share the results from two different architectures.
I first ran the test on an Intel Core2 Duo @ 2.40 GHz, 1.0 GB RAM with Windows XP SP2. I first spawned 5,000 processes, then 10,000 and finally 20,000. The results are not bad on this machine.
4> processes:max(5000).
Maximum allowed processes:32768
Process spawn time=3.0 (3.2) microseconds5> processes:max(10000).
Maximum allowed processes:32768
Process spawn time=4.7 (4.7) microseconds6> processes:max(20000).
Maximum allowed processes:32768
Process spawn time=4.7 (4.7) microseconds
I then ran the same test on my Sun Blade 100 system. The system runs Solaris 10 and the base architecture is a UltraSparc IIe processor with 512 MB of RAM. The results are below.
2> processes:max(5000).
Maximum allowed processes:32768
Process spawn time=18.0 (28.2) microseconds3> processes:max(10000).
Maximum allowed processes:32768
Process spawn time=18.0 (26.0) microseconds4> processes:max(20000).
Maximum allowed processes:32768
Process spawn time=17.5 (25.75) microseconds
I was really impressed with performance. Even though the Blade 100 is just a single CPU and it has half the memory, the performance was not bad at all compared with the Core 2 Duo.
[sigh] One day I’d love to write heavy duty server software running on one of these beasts:
