Provide a way to set the nursery size independently from the number of capabilities
Motivation
The -A
flag allows to change the nursery size. Each capability gets its own nursery, so the total amount of memory devoted to nurseries is numCapabilities * nurserySize (which is constant unless other flags like -H
are used).
However, with -n
, which is the default for nurseries larger than 16M, the nursery is basically shared across all capabilities.
In HLS we want to run with a nursery of at least 128M, so we set --with-rtsopts=-A128M
. We also want to use all cores, so we call setNumCapabilities
internally. All this is very reasonable, unfortunately it backfires quite spectacularly when running HLS in machines with >50 cores, where we end up several GB of RAM wasted due to the multiplicative effect of -A
and -N
.
Proposal
Change the semantics of -A
to define the total space allocated to nurseries, or introduce a new flag with that effect.