problem with shared heap?

Erik Stenman <>
Thu Mar 6 13:47:20 CET 2003

Vlad Dumitrescu wrote:

> Hi,
> > You misinterpreted me, (or I didn't make myself clear). I
> > don't expect
> > it to be faster in all cases, but I wouldn't expect to see any cases
> > where a shared heap performed worse than without it. Maybe on
> > par, but
> > not worse. Hence my question, will there be cases where using
> > a shared
> > heap will degrade performance?
> The answer is yes. For example in cases where many processes are spawned
which create a lot of garbage and then die.
> In the normal heap case, the cleanup is almost instantaneous. With a
shared heap, garbage collections need to be done.

No this is not the problem.
The scenarrio you describe does not cost anything extra in the shared heap,
since the garbage collector is a copying one, none of the dead data needs to
be visited.

The problem in the current system is that if you have a process with a huge
(live) data set, all this data hast to be traversed (and copied) at a major
GC, even if that major GC is triggered by another process.
This problem might be reduced with a new GC and GC policies that are better
adapted to the shared heap.


More information about the erlang-questions mailing list