<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 29, 2015 at 2:03 AM, Will Sewell <span dir="ltr"><<a href="mailto:me@willsewell.com" target="_blank">me@willsewell.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">* I then tried a value of -A2048k because he also said "using a very<br>
large young generation size might outweigh the cache benefits". I<br>
don't exactly know what he meant by "a very large young generation<br>
size", so I guessed at this value. Is it in the right ballpark?<br></div></blockquote><div><br></div><div>I usually use 2-8M for this value, depending on the chip. Most values in the young generation are going to be garbage, and collection is O(num_live_objects), so as long as you can keep this buffer and your working set (i.e. the long-lived stuff that doesn't get GC'ed) in L3 cache, higher values are better. I expect there is another such phase transition as you set -A around the L2 cache size, but everything depends on what your program is actually doing. Keeping a smaller young generation will mean that those cache lines are hotter than they would be if you set it larger, and that means increasing L2 cache pressure and potentially evicting working set, so maybe you make average GC pause time faster (helping with tail latency) at the expense of doing GC more often and maybe reducing the amount of L2 cache available.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
* With -H, I tried values of -H8m, -H32m, -H128m, -H512m, -H1024m<br>
<br>
But all lead to worse performance over the defaults (and -H didn't<br>
really have much affect at all).</div></blockquote></div><br>What you should expect to see as you increase -H is that major GC pauses become more infrequent, but average GC times go up. Dumping +RTS -S for us will also help us understand your GC behaviour, since I wouldn't expect to see 1s pauses on any but the largest heaps. Are you using large MutableArrays?<br clear="all"><div><br></div>-- <br><div class="gmail_signature">Gregory Collins <<a href="mailto:greg@gregorycollins.net" target="_blank">greg@gregorycollins.net</a>></div>
</div></div>