Skip to content

idle GC causes large CPU usage if run more frequently than 1 second

I have a web server which exhibits unusual CPU usage. When it first starts it loads a bunch of state from disk -- around 800MB. It then sits idle consuming no CPU. If I make any request to the server, it starts using 30-60% of the CPU and never goes back down -- even if the request does not interact with the state system at all.

If I disable idle GC, then the problem goes away. If I set idle GC time using, +RTS -I1, the problem goes away. If I set it to, +RTS -I0.9999999, then I see the CPU usage issue.

Setting the +RTS -I1 option is sufficient for now, but the documentation says I should report any weirdness.

I do not have a simple test case for this.

Trac metadata
Trac field Value
Version 6.10.4
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Runtime System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information