Skip to content

rts stats show negative productivity

The following program and options show the issue. I have reproduced this on head.

{-
ghc -O2 -package async Main.hs -rtsopts -threaded

./Main +RTS -N8 -s  -qn1

Productivity -195.4% of total user, 25.3% of total elapsed
-}

import Control.Concurrent.Async
import Control.Monad (replicateM, forM)
import Data.List (transpose)

main = do
  as <- replicateM 10 $ async $ do
    let w = 5000
        m = replicate w $ replicate w ()
    return $! m == transpose m 
  print =<< forM as wait
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information