Opened 4 years ago

Last modified 4 years ago

#11134 new feature request

Limit frequency of idle GCs

Reported by: dcturner Owned by: dcturner
Priority: normal Milestone:
Component: Runtime System Version: 7.10.2
Keywords: Cc: simonmar
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Runtime performance bug Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D1930
Wiki Page:

Description

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?

Change History (3)

comment:1 Changed 4 years ago by simonmar

Yes, sounds like a good idea to me.

comment:2 Changed 4 years ago by raichoo

That sounds really useful. I'm having a similar issue with a couple of Haskell processes on a production system. They are not draining that much CPU but they are increasing in numbers and "idling" more and more of the CPUs.

comment:3 Changed 4 years ago by thomie

Differential Rev(s): Phab:D1930
Owner: set to dcturner
Note: See TracTickets for help on using tickets.