[erlang-questions] Strange optimization result

Kostis Sagonas kostis@REDACTED
Mon Oct 22 15:02:23 CEST 2007


Thomas Lindgren wrote:
> 
> That's a 35% speedup just from sizing the heap right.
> So it seems the internal VM heuristics for this could
> be tuned or improved.

Yes, of course. The question is exactly how to satisfy
all needs, especially since they are often contradictory.

The `process-local heap' architecture of the Erlang VM
has made certain choices: stating with a very small heap
(233 words) just so that many thousands (millions?) of
processes can be serviced without running the risk of
crashing the system due to lack of memory.

Of course, if only say 10 processes are ever going to run in
the VM (which I suspect is the case for most micro-benchmarks,
or for the average user out there) this number is ridiculously
low.

In most of today's machines, I strongly suspect that this
233 number can be increased to at least by a factor 10 -- and
perhaps it should -- but the OTP folks should first carefully
examine possible consequences before making this decision. (*)

Ideally, these consequences should be measured on real
applications, not on (toy) micro-benchmarks.  Having such a
repository of real applications that can be used as benchmarks
is something that is currently lacking in the Erlang community.
Contributions welcome.

Kostis

(*) The HiPE group can help in this -- this is a good MS Thesis.



More information about the erlang-questions mailing list