"+RTS -A" parameter and CPU cache size

Simon Marlow simonmar at microsoft.com
Fri Jun 16 08:50:15 EDT 2006


On 16 June 2006 13:27, Bulat Ziganshin wrote:

> Friday, June 16, 2006, 3:48:06 PM, you wrote:
> 
>>> char *ghc_rts_opts = "-A10m";
>> Do you have some evidence that -A10m is a good default?  Better than
>> -A6m, or -A16m, for example?  GHC currently runs with -H6m by
>> default. 
> 
> of course, "-a6m" is not worser than "-a10m". but "-h" is not a good
> alternative because after memory usage grows above 6 mb, ghc starts to
> do minor GCs after each 256 kb allocated. with "-A6m" number of minor
> GCs will be dramatically cut off
> 
> i just quickly tested non-optimized compilation of my program with
> "-A6m" and with "-H6m" (ghc 6.4.2.20060609) - wall clock time of
> compilation was 63 seconds against 76 seconds, while memory usage was
> 70 mb against 68 mb 

What I'm getting at is what you think the best value for -A might be.
I'm aware of the problem exposed by using -H on its own.  So -A6m is no
worse than -A10m?  In that case, -A6m is clearly to be preferred; but is
there a better point between 6m and 256k?

> btw, now i use "+RTS -c" in my compilations - it works fine. i'm
> happy :) 

Doesn't that increase GC time significantly?

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list