Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
da407089
Commit
da407089
authored
26 years ago
by
Simon Marlow
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1999-02-02 15:30:45 by simonm]
Update new RTS options for the garbage collector.
parent
8a9a56e2
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ghc/docs/users_guide/4-02-notes.vsgml
+12
-0
12 additions, 0 deletions
ghc/docs/users_guide/4-02-notes.vsgml
ghc/docs/users_guide/runtime_control.vsgml
+53
-14
53 additions, 14 deletions
ghc/docs/users_guide/runtime_control.vsgml
with
65 additions
and
14 deletions
ghc/docs/users_guide/4-02-notes.vsgml
+
12
−
0
View file @
da407089
...
...
@@ -41,4 +41,16 @@ occur in the source code.
<item> Two new functions exported from <tt/ST/ (and <tt/LazyST/):
<tt/unsafeIOToST/ and <tt/stToIO/.
<item> The <tt/+RTS -H<size>/ option is reinstated. Now it
means "use about this much memory" (see Section <ref
id="rts-options-gc" name="RTS options to control the garbage
collector">). This option was added mainly so that 4.02 GC times look
good compared to 3.02 :-).
<item> <tt/finalise/ and <tt/mkWeakNoFinaliser/ operations added to
<tt/Weak/ library.
<item> Ticky-ticky profiling works again (cost-centre profiling is
still broken).
</itemize>
This diff is collapsed.
Click to expand it.
ghc/docs/users_guide/runtime_control.vsgml
+
53
−
14
View file @
da407089
...
...
@@ -63,6 +63,42 @@ operation, but there are several things that can be tweaked for
maximum performance.
<descrip>
<tag>@-A<size>@:</tag>
<nidx>-A<size> RTS option</nidx>
<nidx>allocation area, size</nidx>
[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 <tt/-H/, below).
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).
With only 1 generation (<tt/-G1/) the <tt/-A/ option specifies the
minimum allocation area, since the actual size of the allocation area
will be resized according to the amount of data in the heap (see
<tt/-F/, below).
<tag>@-F<factor>@:</tag>
<nidx>-F<factor> RTS option</nidx>
<nidx>heap size, factor</nidx>
[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 <tt/-H<size>/ than to increase
<tt/-F<factor>/.
The <tt/-F/ setting will be automatically reduced by the garbage
collector when the maximum heap size (the <tt/-M<size>/ setting)
is approaching.
<tag>@-G<generations>@:</tag>
<nidx>-G<generations> RTS option</nidx>
<nidx>generations, number of</nidx>
...
...
@@ -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 <em/minimum/ allocation area size,
option (see
above
) specifies the <em/minimum/ allocation area size,
since the allocation area will grow with the amount of live data in
the heap. In a multi-generational collector the allocation area is a
fixed size.
<tag>@-A<size>@:</tag>
<nidx>-A<size> RTS option</nidx>
<nidx>allocation area, size</nidx>
[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 <tt/-H/ option, see below).
<tag>@-H<size>@:</tag>
<nidx>-H<size> RTS option</nidx>
<nidx>heap size, suggested</nidx>
[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 <tt/-H<size>/. For
improving GC performance, using <tt/-H<size>/ is usually a better
bet than <tt/-A<size>/.
<tag>@-k<size>@:</tag>
<nidx>-k<size> RTS option</nidx>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment