Fast Conservative GC

Zaz Brown

Exact vs Conservative

recognizes   vs   guesses pointers                 

Exact GC Disadvantages

difficult to implement

prevents code motion

Conservative GC Disadvantages

guesses pointers

  • int could be ptr: excess retention   0.01%
  • ptr could be int: pin referent   0.03%

was slow

performance vs Gen Immix without RC Immix.svg

was slow

performance vs Gen Immix without RC Immix_cons.svg

now fast

performance vs Gen Immix.svg

Immix Advantage

MCC pins 4 KiB pages, BDW uses free-list

Immix pins 256B lines, uses bump pointer

improves fragmentation & mutator locality

RC Immix

header bits.svg

Immix + live object count

combines tracing & counting

RC Immixcons filtering

bitmap to determine valid objects

  • collector clears bit for dead object
  • ambiguous references are checked against bitmap

 

10× reduction in pinned objects vs MCC

Performance Robustness

performance vs Gen Immix.svg

Java

Jikes RVM & MMTk

simulated:

  • poor code quality by disabling optimizations
  • immature VM by deoptimising runtime code

Time vs Heap Size

total time vs heap size.svg

Increased Pinning

increased pinning.svg

Why not use conservative GC?

Questions?

zazbrown.com/research/talk

References

Fast Conservative Garbage Collection, 2014

High Performance Reference Counting and Conservative Garbage Collection, 2015 - PhD thesis