From da407089c1b488c9cd2804494b99a416747b2a59 Mon Sep 17 00:00:00 2001 From: simonm Date: Tue, 2 Feb 1999 15:30:46 +0000 Subject: [PATCH] [project @ 1999-02-02 15:30:45 by simonm] Update new RTS options for the garbage collector. --- ghc/docs/users_guide/4-02-notes.vsgml | 12 +++++ ghc/docs/users_guide/runtime_control.vsgml | 67 ++++++++++++++++++++++------ 2 files changed, 65 insertions(+), 14 deletions(-) diff --git a/ghc/docs/users_guide/4-02-notes.vsgml b/ghc/docs/users_guide/4-02-notes.vsgml index 9180795..b162e49 100644 --- a/ghc/docs/users_guide/4-02-notes.vsgml +++ b/ghc/docs/users_guide/4-02-notes.vsgml @@ -41,4 +41,16 @@ occur in the source code. Two new functions exported from The ). This option was added mainly so that 4.02 GC times look +good compared to 3.02 :-). + + Ticky-ticky profiling works again (cost-centre profiling is +still broken). + diff --git a/ghc/docs/users_guide/runtime_control.vsgml b/ghc/docs/users_guide/runtime_control.vsgml index eb1da49..19d03c6 100644 --- a/ghc/docs/users_guide/runtime_control.vsgml +++ b/ghc/docs/users_guide/runtime_control.vsgml @@ -63,6 +63,42 @@ operation, but there are several things that can be tweaked for maximum performance. +@-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 (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 @@ -76,22 +112,25 @@ collected. Specifying 1 generation with @+RTS -G1@ gives you a simple 2-space collector, as you would expect. In a 2-space collector, the @-A@ -option (see below) specifies the @-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. - -Increasing the allocation area size may or may not give better -performance (a bigger allocation area means worse cache behaviour but -fewer garbage collections and less promotion). +fixed size (unless you use the @-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 -- 1.7.10.4