How does Ling compare performance-wise?
---------------------------------------

The primary optimisation target for Erlang on Xen is the startup latency. At the same time the overall performance should be at least similar to to that of Erlang/OTP. The preliminary Ling vs. BEAM performance measurements are given in the table below. The measurements show that Ling is currently slightly slower than BEAM.

Ling BEAM
Area Millis Estone Millis Estone
list manipulation 428 3,789 295 5,151
small messages 6,206 508 3,768 822
medium messages 6,538 947 4,264 1,425
huge messages 734 675 413 1,202
pattern matching 119 6,525 115 6,761
traverse 201 2,471 296 1,677
Work with large dataset 161 1,737 176 1,591
Work with large local dataset 137 2,044 172 1,633
Alloc and dealloc 62 2,014 90 1,379
Bif dispatch 164 4,716 126 6,181
Binary handling 818 606 718 691
ets datadictionary 376 2,970 589 1,894
Generic server (with timeout) 2,662 943 2,582 972
Small Integer arithmetics 187 1,493 131 2,131
Float arithmetics 72 433 48 646
Function calls 99 7,828 87 8,975
Timers 102 1,214 349 355
Links 136 230 271 115
ESTONES 41,144 43,601

Testing procedure

The peformance data were obtained by running repeatedly estone_SUITE test suite and averaging the results. The suite was run 10 times for Ling and 5 times for BEAM.

Both virtual machines were running on the same platform:

  • CPU: Intel Pentium 4 1.4GHz, 32-bit
  • RAM: 1G
  • Hypervisor: Xen 4.1.1
  • OS: OpenSUSE 11.4 (2.6.37.6-0.11-xen)

BEAM tests were using Erlang/OTP R15B01 (Erlang (SMP, ASYNC_THREADS, HIPE) (BEAM) emulator version 5.9.1). The tested version of Ling was 0.1.8.

In both cases estone_SUITE was run using a Common Test framework. Raw test logs are available (Ling, BEAM).

Discussion

The tests demonstrate that the performance of Ling is sufficiently similar to that of BEAM. It should be emphasized that no performance optimisations were conducted for Ling yet. Such optimisations are of a relatively low priority for the project.

Many factors may have affected performance of virtual machines either positively or negatively:

  • BEAM was running in Dom0, while Ling booted as a guest domain. This limited the maximum amount of RAM available to Ling to 480M. A fairer comparison may require booting a Linux as a guest OS and then running BEAM on top of it.
  • Ling was accessing the filesystem using a relatively slow 9P server running in Dom0.
  • No tweaking of Xen or OS parameters was done to improve the performance of either virtual machine. In particular, no command-line options were set when invoking BEAM.

This page will be updated regularly, when new performance data become available. You are welcome to build a Xen image for your application and check how fast it runs.