summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2014-11-21 17:05:58 +0000
committerSimon Marlow <marlowsd@gmail.com>2014-11-25 14:37:26 +0000
commit452eb80f15fce8665df52bc9facebfafb5b6267b (patch)
treea34e76ab765b6d1db49b1c05372f8924e52cacf9 /docs
parente22bc0dedb9e9da0176ad7ce4a74acbefedc7207 (diff)
downloadhaskell-452eb80f15fce8665df52bc9facebfafb5b6267b.tar.gz
Add +RTS -n<size>: divide the nursery into chunks
See the documentation for details.
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/runtime_control.xml36
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/users_guide/runtime_control.xml b/docs/users_guide/runtime_control.xml
index cdd9fd4997..612a44122a 100644
--- a/docs/users_guide/runtime_control.xml
+++ b/docs/users_guide/runtime_control.xml
@@ -365,6 +365,42 @@ $ ./prog -f +RTS -H32m -S -RTS -h foo bar
</varlistentry>
<varlistentry>
+ <term>
+ <option>-n</option><replaceable>size</replaceable>
+ <indexterm><primary><option>-n</option></primary><secondary>RTS option</secondary></indexterm>
+ <indexterm><primary>allocation area, chunk size</primary></indexterm>
+ </term>
+ <listitem>
+ <para>&lsqb;Default: 0, Example:
+ <literal>-n4m</literal>&rsqb; When set to a non-zero value,
+ this option divides the allocation area (<option>-A</option>
+ value) into chunks of the specified size. During execution,
+ when a processor exhausts its current chunk, it is given
+ another chunk from the pool until the pool is exhausted, at
+ which point a collection is triggered.</para>
+
+ <para>This option is only useful when running in parallel
+ (<option>-N2</option> or greater). It allows the processor
+ cores to make better use of the available allocation area,
+ even when cores are allocating at different rates. Without
+ <option>-n</option>, each core gets a fixed-size allocation
+ area specified by the <option>-A</option>, and the first
+ core to exhaust its allocation area triggers a GC across all
+ the cores. This can result in a collection happening when
+ the allocation areas of some cores are only partially full,
+ so the purpose of the <option>-n</option> is to allow cores
+ that are allocating faster to get more of the allocation
+ area. This means less frequent GC, leading a lower GC
+ overhead for the same heap size.</para>
+
+ <para>This is particularly useful in conjunction with larger
+ <option>-A</option> values, for example <option>-A64m
+ -n4m</option> is a useful combination on larger core counts
+ (8+).</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term>
<option>-c</option>
<indexterm><primary><option>-c</option></primary><secondary>RTS option</secondary></indexterm>