+RTS -N1 -RTS
2.31s, 36% CPU, 108128 bytes of memory
+RTS -N8 -RTS
8.42s, 423% CPU, 131308 bytes of memory
Why does increasing the core count from 1 to 8 cause such drastic rise in CPU usage?
It seems to be due to GC, but why?
+RTS -N1 -s -RTS
Tot time (elapsed) Avg pause Max pause
Gen 0 1668 colls, 0 par 0.120s 0.147s 0.0001s 0.0009s
Gen 1 20 colls, 0 par 0.056s 0.061s 0.0031s 0.0065s
+RTS -N8 -s -RTS
Tot time (elapsed) Avg pause Max pause
Gen 0 1048 colls, 1048 par 7.828s 1.869s 0.0018s 0.0347s
Gen 1 21 colls, 20 par 0.364s 0.085s 0.0041s 0.0265s
The default allocation area size of -A512K was too small - setting it to -A2G brought GC close to the single-threaded version.