Skip to content
  • Duncan Coutts's avatar
    Change the presentation of parallel GC work balance in +RTS -s · cd930da1
    Duncan Coutts authored
    Also rename internal variables to make the names match what they hold.
    The parallel GC work balance is calculated using the total amount of
    memory copied by all GC threads, and the maximum copied by any
    individual thread. You have serial GC when the max is the same as
    copied, and perfectly balanced GC when total/max == n_caps.
    
    Previously we presented this as the ratio total/max and told users
    that the serial value was 1 and the ideal value N, for N caps, e.g.
    
      Parallel GC work balance: 1.05 (4045071 / 3846774, ideal 2)
    
    The downside of this is that the user always has to keep in mind the
    number of cores being used. Our new presentation uses a normalised
    scale 0--1 as a percentage. The 0% means completely serial and 100%
    is perfect balance, e.g.
    
      Parallel GC work balance: 4.56% (serial 0%, perfect 100%)
    cd930da1