Implement a new heap-tuning option: -H
authorSimon Marlow <marlowsd@gmail.com>
Mon, 30 Nov 2009 15:18:36 +0000 (15:18 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Mon, 30 Nov 2009 15:18:36 +0000 (15:18 +0000)
commit323950933d3260503186b93e7a5a7bdaa4822c1b
treef0446993e413adc70f619975bc8f5dc44a70ae30
parentf9d15f9fccae4706fbdf8ee4ecaef7da9953cb74
Implement a new heap-tuning option: -H

-H alone causes the RTS to use a larger nursery, but without exceeding
the amount of memory that the application is already using.  It trades
off GC time against locality: the default setting is to use a
fixed-size 512k nursery, but this is sometimes worse than using a very
large nursery despite the worse locality.

Not all programs get faster, but some programs that use large heaps do
much better with -H.  e.g. this helps a lot with #3061 (binary-trees),
though not as much as specifying -H<large>.  Typically using -H<large>
is better than plain -H, because the runtime doesn't know ahead of
time how much memory you want to use.

Should -H be on by default?  I'm not sure, it makes some programs go
slower, but others go faster.
includes/rts/Flags.h
rts/RtsFlags.c
rts/sm/GC.c