[GHC] #11134: Limit frequency of idle GCs

GHC ghc-devs at haskell.org
Wed Nov 25 13:45:53 UTC 2015


#11134: Limit frequency of idle GCs
-------------------------------------+-------------------------------------
           Reporter:  dcturner       |             Owner:
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:  Runtime        |           Version:  7.10.2
  System                             |
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Runtime
  Unknown/Multiple                   |  performance bug
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 In a server process with a relatively large heap (100s of MB) serving
 regular but relatively infrequent requests (~1 per sec) the idle GC runs
 after essentially every request which turns out to be extremely expensive:
 switching it off takes us from ~30% CPU to ~0.3% CPU.

 It is certainly useful have the GC run when idle but running it *every*
 time the process goes idle isn't necessary. It doesn't work to increase
 the delay (e.g. say -I2) as then the idle GC would never run, because the
 requests are rather regular.

 I'd quite like to be able to say something of the form "do a GC if idle
 for at least 0.3s as long as the idle GC has not run in the last 120s" -
 where 120s is another option passed to the RTS.

 Does this sound like a reasonable idea?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11134>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list