X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdocs%2Fusers_guide%2Fruntime_control.vsgml;h=50d2745920e81121fc9e499c073722964c861d6b;hb=71d4a9479be0cdc80efe66e7ef47b98d78558ab2;hp=82876bffdfa372cb50fb9396569236c6d88d5e84;hpb=4391e44f910ce579f269986faef9e5db8907a6c0;p=ghc-hetmet.git diff --git a/ghc/docs/users_guide/runtime_control.vsgml b/ghc/docs/users_guide/runtime_control.vsgml index 82876bf..50d2745 100644 --- a/ghc/docs/users_guide/runtime_control.vsgml +++ b/ghc/docs/users_guide/runtime_control.vsgml @@ -63,27 +63,75 @@ operation, but there are several things that can be tweaked for maximum performance. -@-G@: --G<generations> RTS option -generations, number of - -[Default: 2] Set the number of generations used by the garbage -collector. The default of 2 seems to be good, but the garbage -collector can support any number of generations. NOTE: -G1 (i.e. a -two-space copying collector) is currently not supported. - @-A@: -A<size> RTS option allocation area, size [Default: 256k] Set the allocation area size used by the garbage collector. The allocation area (actually generation 0 step 0) is -fixed and is never resized. +fixed and is never resized (unless you use @-F@: +-F<factor> RTS option +heap size, factor + +[Default: 2] This option controls the amount of memory reserved for +the older generations (and in the case of a two space collector the +size of the allocation area) as a factor of the amount of live data. +For example, if there was 2M of live data in the oldest generation +when we last collected it, then by default we'll wait until it grows +to 4M before collecting it again. + +The default seems to work well here. If you have plenty of memory, it +is usually better to use @-G@: +-G<generations> RTS option +generations, number of + +[Default: 2] Set the number of generations used by the garbage +collector. The default of 2 seems to be good, but the garbage +collector can support any number of generations. Anything larger than +about 4 is probably not a good idea unless your program runs for a +@-H@: +-H<size> RTS option +heap size, suggested + +[Default: 0] This option provides a "suggested heap size" for the +garbage collector. The garbage collector will use about this much +memory until the program residency grows and the heap size needs to be +expanded to retain reasonable performance. + +By default, the heap will start small, and grow and shrink as +necessary. This can be bad for performance, so if you have plenty of +memory it's worthwhile supplying a big @-k@: -k<size> RTS option stack, minimum size @@ -140,21 +188,6 @@ heap size based on the current amount of live data. %PostScript), using the @stat2resid@stat2resid utility in %the GHC distribution (@ghc/utils/stat2resid@). -% @-F2s@: -% -F2s RTS option -% -% Forces a program compiled for generational GC to use two-space copying -% collection. The two-space collector may outperform the generational -% collector for programs which have a very low heap residency. It can -% also be used to generate a statistics file from which a basic heap -% residency profile can be produced (see Section ). -% -% There will still be a small execution overhead imposed by the -% generational compilation as the test for old generation updates will -% still be executed (of course none will actually happen). This -% overhead is typically less than 1\%. -% % @-j@: % -j<size> RTS option % Force a major garbage collection every @@ bytes. (Normally @@ -209,11 +242,10 @@ The @@ business works just like on the @-S@ RTS option (above). ``Ticky-ticky'' statistics are counts of various program actions (updates, enters, etc.) The program must have been compiled using -@-fstg-reduction-counts@-fstg-reduction-counts option -(a.k.a. ``ticky-ticky profiling''), and, for it to be really useful, -linked with suitable system libraries. Not a trivial undertaking: -consult the installation guide on how to set things up for easy -``ticky-ticky'' profiling. +@-ticky@-ticky option (a.k.a. ``ticky-ticky profiling''), +and, for it to be really useful, linked with suitable system +libraries. Not a trivial undertaking: consult the installation guide +on how to set things up for easy ``ticky-ticky'' profiling. @-D@: -D RTS option @@ -221,17 +253,19 @@ An RTS debugging flag; varying quantities of output depending on which bits are set in @@. Only works if the RTS was compiled with the @DEBUG@ option. -@-N@: --N RTS option - -Normally, the garbage collector black-holes closures which are being -evaluated, as a space-saving measure. This option turns off -blackholing. You shouldn't ever need to use it. - -Historical note: this option used to be used to work around a problem -with signal handling, where a signal handler might need to evaluate -blackholed closures. Signal handlers are now run in a separate -thread, and don't suffer from this problem. +% Blackholing can't be turned off in new RTS --SDM +% +% @-N@: +% -N RTS option +% +% Normally, the garbage collector black-holes closures which are being +% evaluated, as a space-saving measure. This option turns off +% blackholing. You shouldn't ever need to use it. +% +% Historical note: this option used to be used to work around a problem +% with signal handling, where a signal handler might need to evaluate +% blackholed closures. Signal handlers are now run in a separate +% thread, and don't suffer from this problem. @-Z@: -Z RTS option