[GHC] #14702: Runtime is keeping hold to too much memory
#14702: Runtime is keeping hold to too much memory -------------------------------------+------------------------------------- Reporter: blaze | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime | Version: 8.2.2 System | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Other Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Currently runtime only releases memory to OS when it has more than 4x of the amount used. This leads to heavy memory overuse when process is run using many processes and large nurseries. For example, if process is run on 16 CPUs with each having 32MB nursery, it will use total 512MB allocation area. This will push "release boundary" to the 2GB. If process is ever to allocate that much memory for a short term use, it will never be given back to OS and effectively wasted. Nursery and other non-growing data areas should be excluded from this multiplier. Runtime should only keep an extra memory proportional to heap allocation. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14702> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14702: Runtime is keeping hold to too much memory -------------------------------------+------------------------------------- Reporter: blaze | Owner: blaze Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by blaze): * owner: (none) => blaze -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14702#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14702: Runtime is keeping hold to too much memory -------------------------------------+------------------------------------- Reporter: blaze | Owner: blaze Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): D4338 Wiki Page: | -------------------------------------+------------------------------------- Changes (by blaze): * differential: => D4338 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14702#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14702: Runtime is keeping hold to too much memory -------------------------------------+------------------------------------- Reporter: blaze | Owner: blaze Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4338 Wiki Page: | -------------------------------------+------------------------------------- Changes (by blaze): * differential: D4338 => Phab:D4338 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14702#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14702: Runtime is keeping hold to too much memory -------------------------------------+------------------------------------- Reporter: blaze | Owner: blaze Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4338 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"0171e09e4d073d8466953ebbf01292e55829fb20/ghc" 0171e09e/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="0171e09e4d073d8466953ebbf01292e55829fb20" Make RTS keep less memory (fixes #14702) Currently runtime keeps hold to 4*used_memory. This includes, in particular, nursery, which can be quite large on multiprocessor machines: 16 CPUs x 64Mb each is 1GB. Multiplying it by 4 means whatever actual memory usage is, runtime will never release memory under 4GB, and this is quite excessive for processes which only need a lot of memory shortly (think building data structures from large files). This diff makes multiplier to apply only to GC-managed memory, leaving all "static" allocations alone. Test Plan: make test TEST="T14702" Reviewers: bgamari, erikd, simonmar Reviewed By: simonmar Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14702 Differential Revision: https://phabricator.haskell.org/D4338 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14702#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14702: Runtime is keeping hold to too much memory -------------------------------------+------------------------------------- Reporter: blaze | Owner: blaze Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Runtime System | Version: 8.2.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4338 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed * milestone: => 8.6.1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14702#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC