Opened 11 years ago

Last modified 3 years ago

#750 new feature request

Set -M, -H, -c and other memory-related values based on available virtual/physical memory

Reported by: simonmar Owned by:
Priority: normal Milestone:
Component: Runtime System Version: 6.4.1
Keywords: Cc: pho@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: N/A
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by igloo)

From John Meacham:

perhaps if -M is not otherwise set, getrlimit(RLIMIT_AS,..) could be called and the maximum heap size set to just under that, since it is the point that the OS will forcefully kill the program anyway.

Ravi Nanavati would like to be able to set the value to a percentage of physical RAM, e.g. `prog +RTS -H256m -M95% -RTS'.

Bulat Ziganshin would like to be able to do the same with -c.

Change History (10)

comment:1 Changed 10 years ago by simonmar

Milestone: 6.66.6.1

comment:2 Changed 10 years ago by igloo

Test Case: N/A

comment:3 Changed 10 years ago by simonmar

Milestone: 6.6.1_|_
Type: taskfeature request

comment:4 Changed 10 years ago by igloo

Description: modified (diff)
Summary: Set -M value based on available virtual memorySet -M and -c values based on available virtual memory

comment:5 Changed 10 years ago by Bulat

Summary: Set -M and -c values based on available virtual memorySet -M, -H, -c and other memory-related values based on available virtual/physical memory

-H and other memory-related settings, too. Also please note that original suggestion was about *virtual* memory which is hard lmit for any program, while Ravi and me wants to easily set values based on *physical* RAM installed on computer, which is just sort of optimization

comment:6 Changed 8 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:7 Changed 8 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:8 Changed 8 years ago by PHO

Cc: pho@… added

comment:9 Changed 7 years ago by simonmar

difficulty: Easy (1 hr)Easy (less than 1 hour)

comment:10 Changed 3 years ago by simonmar

Type of failure: None/Unknown

See also #8189, which does this for +RTS -K.

Note: See TracTickets for help on using tickets.