Re: -DPARALLEL_MARK and GC_enable_incremental()

Paolo Molaro <[email protected]> Thu, 20 Mar 2008 11:48:50 +0100
Newsgroups gmane.comp.gnome.mono.garbage-collection
Message-ID <[email protected]>
On 03/19/08 Jonathan Gagnon wrote:
> I wanted to know how the mono GC behaves on multiprocessor machines.  After
> reading some documentation on the Boehm GC, I'm wondering if mono compiles
> the GC with -DPARALLEL_MARK.  This allows the collector to run the mark
> phase in parallel, and thus use all the available processors on a
> multi-processor machine (instead of using just one).  More details can be
> found here :
>  
> http://www.hpl.hp.com/personal/Hans_Boehm/gc/scale.html

Some time ago I tested a mono version enabled with -DPARALLEL_MARK
on a workload that should have benefited from it and I saw basiccally no
performance improvement on my core 2 duo (there was a slight regression).
For kicks I just tested another case and with parallel marking
enabled performance is orrible (twice as slow).
You can easily test your workload configuring mono with the
--enable-parallel-mark option.
I didn't investigate the cause of the slowdown.

> It seems like they also have generational collection, that can be enable by
> calling GC_enable_incremental.  It doesn't seem to be called anywhere in the
> mono sources, so I assume it is not used.  Is there a reason why?

GC_enable_incremental has a number of issues that are detailed in the
documentation (mainly unexpected interrupted syscalls: we could deal
with them in the runtime, but the p/invoke code of many programs would
break unless we copy potentially lots of data around: not practical).

lupus

-- 
-----------------------------------------------------------------
[email protected]                                     debian/rules
[email protected]                             Monkeys do it better
_______________________________________________
Mono-gc-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-gc-list