% of memory "unit" to heap-controlling RTS flags
Ravi Nanavati
ravi at bluespec.com
Sun Dec 3 20:19:45 EST 2006
If you're trying to produce ghc executables that will work well without
tweaking on machines with different configurations, it would handy to be
able to control the heap requested based on the size of physical RAM.
For instance, you might want to set -M to 100% or 80% of physical RAM
and -H to (say) 25% of physical RAM.
I was wondering what people would think if we had a new sort of "unit"
for the various memory options that actually specified that the memory
amount requested was as a percentage of physical RAM.
So you could do something like:
prog +RTS -M80% -H25% -RTS to start your heap at 25% of physical RAM and
cap it at 80% of of physical RAM.
You'd also be able to intermix % with the other memory units so you
could do something like:
prog +RTS -H256m -M95% -RTS to start your heap at 256m and cap it at 95%
of physical RAM.
How does that sound?
- Ravi
More information about the Glasgow-haskell-users
mailing list