How can I track / reduce GC time in GHC?

I recently posted a question about improving memory / GC usage and since then I have been able to reduce memory consumption to what I think is a suitable / proportional level using ShortByteString(and in the process of moving from "never ending" to "very, very slow "for current tests), but still it seems that I consider GC excessive time.

Profiling test results at the following output:

49,463,229,848 bytes allocated in the heap
68,551,129,400 bytes copied during GC
   212,535,336 bytes maximum residency (500 sample (s))
     3,739,704 bytes maximum slop
           602 MB total memory in use (0 MB lost due to fragmentation)

                                   Tot time (elapsed) Avg pause Max pause
Gen 0 14503 colls, 0 par 1.529s 1.681s 0.0001s 0.0164s
Gen 1 500 colls, 0 par 79.202s 79.839s 0.1597s 0.3113s

TASKS: 3 (1 bound, 2 peak workers (2 total), using -N1)

SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)

INIT time 0.000s (0.001s elapsed)
MUT time 29.500s (82.361s elapsed)
GC time 47.253s (47.983s elapsed)
RP time 0.000s (0.000s elapsed)
PROF time 33.478s (33.537s elapsed)
EXIT time 0.000s (0.025s elapsed)
Total time 110.324s (130.372s elapsed)

Alloc rate 1,676,731,643 bytes per MUT second

Productivity 26.8% of total user, 22.7% of total elapsed

gc_alloc_block_sync: 0
whitehole_spin: 0
gen [0] .sync: 0
gen [1] .sync: 0

:

Heap visualization

-H, , , , , , (-N -G -F -c), . , ( -G, 1 , 0), , GC " " ". , , , GC , , //, , .

- , , GC? - , , , ? , , - ST. , [?] GC , ST .

+4
1

, , . , , , , :

( !) , . HashMap, , , -, . Unboxed GC, , . , .

- , . , ( ) ByteString , , .

+3

Source: https://habr.com/ru/post/1622372/


All Articles