[MLton-devel] Stop-and-copy / mark-compact switch criterion

Stephen Weeks MLton@mlton.org
Fri, 16 Aug 2002 13:39:03 -0700


> Perhaps you could make some of the constants externally adjustable
> so as to provide for command-line tuning (such as this 1.5 factor)
> ?

Yes, that's a good idea.  I already planned to do that with the
desired live ratio (currently 8).  I will also do it with the
mark-compact/cheney crossover (currently 3) and the minimum live ratio
(currently 1.5).

> Another point I wanted to share: in the GC there are several
> decisions made by estimating the live set of the next GC as
> plainly the current live set. I think that the CAML gc uses some
> form of linear estimator that is based not only on the current
> live set but also on the previous ones. I do not know what is the
> precision of such improved estimations or the level of benefits
> they provide.

I could do that, but my guess is that it doesn't add any precision,
especially with generational GC, which makes major GCs very infrequent
(only 20 or so in a self compile, IIRC).

> Do you allocate large enough objects directly outside the nursery?

Right now all allocation is in the nursery.  I plan to change
GC_arrayAllocate so that it allocates very large (>1M?) arrays in the
old generation.

> How do you choose the nursery size ? Is the L2 cache size a good
> size ?

The nursery size is chosen to be half of the available space, i.e. as
large as possible while still allowing a minor GC to be performed.  I
think the savings from making minor GCs less frequent (and hence fewer
objects promoted and hence fewer major GCs) vastly outweighs any
performance gains to be had by keeping the nursery in the cache.
Also, the cardmap scanning costs would become noticeable with say,
100M of live data and a 512K nursery.


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel