[GHC] #13164: idle time full GCs (idle cpu usage)

GHC ghc-devs at haskell.org
Tue Jan 31 01:40:50 UTC 2017


#13164: idle time full GCs (idle cpu usage)
-------------------------------------+-------------------------------------
        Reporter:  lspitzner         |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Runtime System    |              Version:  8.0.1
      Resolution:                    |             Keywords:  idle GC
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 > How about we give the idle GC a time budget expressed as a % of wall
 clock time?

 This sounds sensible, e.g., if the idle GC last ran for m milliseconds,
 wait (at least) 100*m milliseconds before running it again.

 > Another thought: If there was an upper bound on the interval between
 full GCs (idle or not) you'd get reliable deadlock detection even with
 "forever threaddelay" cases.

 This makes sense, too. So the 100*m timer should be reset whenever we do a
 full GC. Then we probably no longer need the "idle" condition.

 (But when the RTS is ''truly'' idle then we should not do another GC, of
 course. For example, currently when you leave ghci idle in a terminal it
 does one idle GC after (GHC's custom idle GC time of) 5 seconds, but then
 doesn't do another GC after 5 more seconds if you haven't interacted with
 it at all.)

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


More information about the ghc-tickets mailing list