From jonathan.gagnon at croesus.com Wed Mar 19 12:39:15 2008 From: jonathan.gagnon at croesus.com (Jonathan Gagnon) Date: Wed, 19 Mar 2008 12:39:15 -0400 Subject: [Mono-gc-list] -DPARALLEL_MARK and GC_enable_incremental() Message-ID: <00c001c889df$c7c72a90$1b36a8c0@PROG159> Hi, 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 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? Thanks, Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/pipermail/mono-gc-list/attachments/20080319/8485bfbe/attachment.html From lupus at ximian.com Thu Mar 20 06:48:50 2008 From: lupus at ximian.com (Paolo Molaro) Date: Thu, 20 Mar 2008 11:48:50 +0100 Subject: [Mono-gc-list] -DPARALLEL_MARK and GC_enable_incremental() In-Reply-To: <00c001c889df$c7c72a90$1b36a8c0@PROG159> References: <00c001c889df$c7c72a90$1b36a8c0@PROG159> Message-ID: <20080320104850.GC22705@debian.org> 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 -- ----------------------------------------------------------------- lupus at debian.org debian/rules lupus at ximian.com Monkeys do it better