[GHC] #10728: Add e.g. "-N<=4" in addition to the fixed "-N4" and variable "-N" RTS options
GHC
ghc-devs at haskell.org
Sun Dec 20 12:01:30 UTC 2015
#10728: Add e.g. "-N<=4" in addition to the fixed "-N4" and variable "-N" RTS
options
-------------------------------------+-------------------------------------
Reporter: rrnewton | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Runtime System | Version: 7.10.2
Resolution: | Keywords: newcomer
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #9221, #8224 | Differential Rev(s): Phab:D1650
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by hvr):
Here's two less controversial variants to `-Nmax` I wouldn't object to:
- `-maxN` (this follows common conventions for `max` used for upper-
bounding, c.f. `find . -mindepth <n> -maxdepth <n>`
- Use a single letter option, e.g. `-n <n>`; this follows current `+RTS
--help` convention, c.f.
{{{
-M<size> Sets the maximum heap size (default unlimited) Egs: -M256k -M1G
-H<size> Sets the minimum heap size (default 0M) Egs: -H24m -H1G
}}}
For reference, here's the current output of `ghc +RTS --help` for GHC
HEAD, where `-Nmax` clearly deviates from the existing naming conventions:
{{{
ghc: unknown RTS option: --help
ghc:
ghc: Usage: <prog> <args> [+RTS <rtsopts> | -RTS <args>] ... --RTS <args>
ghc:
ghc: +RTS Indicates run time system options follow
ghc: -RTS Indicates program arguments follow
ghc: --RTS Indicates that ALL subsequent arguments will be given to
the
ghc: program (including any of these RTS flags)
ghc:
ghc: The following run time system options are available:
ghc:
ghc: -? Prints this message and exits; the program is not executed
ghc: --info Print information about the RTS used by this program
ghc:
ghc: -K<size> Sets the maximum stack size (default: 80% of the heap)
ghc: Egs: -K32k -K512k -K8M
ghc: -ki<size> Sets the initial thread stack size (default 1k) Egs:
-ki4k -ki2m
ghc: -kc<size> Sets the stack chunk size (default 32k)
ghc: -kb<size> Sets the stack chunk buffer size (default 1k)
ghc:
ghc: -A<size> Sets the minimum allocation area size (default 512k) Egs:
-A1m -A10k
ghc: -n<size> Allocation area chunk size (0 = disabled, default: 0)
ghc: -O<size> Sets the minimum size of the old generation (default 1M)
ghc: -M<size> Sets the maximum heap size (default unlimited) Egs:
-M256k -M1G
ghc: -H<size> Sets the minimum heap size (default 0M) Egs: -H24m -H1G
ghc: -m<n> Minimum % of heap which must be available (default 3%)
ghc: -G<n> Number of generations (default: 2)
ghc: -c<n> Use in-place compaction instead of copying in the oldest
generation
ghc: when live data is at least <n>% of the maximum heap size
set with
ghc: -M (default: 30%)
ghc: -c Use in-place compaction for all oldest generation
collections
ghc: (the default is to use copying)
ghc: -w Use mark-region for the oldest generation (experimental)
ghc: -I<sec> Perform full GC after <sec> idle time (default: 0.3, 0 ==
off)
ghc:
ghc: -T Collect GC statistics (useful for in-program statistics
access)
ghc: -t[<file>] One-line GC statistics (if <file> omitted, uses stderr)
ghc: -s[<file>] Summary GC statistics (if <file> omitted, uses stderr)
ghc: -S[<file>] Detailed GC statistics (if <file> omitted, uses stderr)
ghc:
ghc:
ghc: -Z Don't squeeze out update frames on stack overflow
ghc: -B Sound the bell at the start of each garbage collection
ghc:
ghc: -h Heap residency profile (output file <program>.hp)
ghc: -i<sec> Time between heap profile samples (seconds, default: 0.1)
ghc:
ghc: -C<secs> Context-switch interval in seconds.
ghc: 0 or no argument means switch as often as possible.
ghc: Default: 0.02 sec.
ghc: -V<secs> Master tick interval in seconds (0 == disable timer).
ghc: This sets the resolution for -C and the heap profile
timer -i,
ghc: and is the frequence of time profile samples.
ghc: Default: 0.01 sec.
ghc:
ghc: -N[<n>] Use <n> processors (default: 1, -N alone determines
ghc: the number of processors to use automatically)
ghc: -qg[<n>] Use parallel GC only for generations >= <n>
ghc: (default: 0, -qg alone turns off parallel GC)
ghc: -qb[<n>] Use load-balancing in the parallel GC only for
generations >= <n>
ghc: (default: 1, -qb alone turns off load-balancing)
ghc: -qa Use the OS to set thread affinity (experimental)
ghc: -qm Don't automatically migrate threads between CPUs
ghc: -qi<n> If a processor has been idle for the last <n> GCs, do not
ghc: wake it up for a non-load-balancing parallel GC.
ghc: (0 disables, default: 0)
ghc: --install-signal-handlers=<yes|no>
ghc: Install signal handlers (default: yes)
ghc: -e<n> Maximum number of outstanding local sparks (default:
4096)
ghc: -xm Base address to mmap memory in the GHCi linker
ghc: (hex; must be <80000000)
ghc: -xq The allocation limit given to a thread after it receives
ghc: an AllocationLimitExceeded exception. (default: 100k)
ghc:
ghc: RTS options may also be specified using the GHCRTS environment
variable.
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10728#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list