4. A better strategy
• Stabilize on 1-2 heaps
RUBY_HEAP_MIN_SLOTS (480 000)
• Linear increment to keep it tight
RUBY_HEAP_SLOTS_GROWTH_FACTOR 1
RUBY_HEAP_SLOTS_INCREMENT (20 000)
5. Some tools
memprof, gdb, scrap
[68.63 MB] GET /stats/scrap
Number of objects : 815266 (627150 AST nodes, 76.93%)
Heap slot size : 20
GC cycles so far : 352
Number of heaps : 7
Total size of objects: 15923.16 KB
Total size of heaps : 18036.55 KB (2113.39 KB = 11.72%
unused)
Leading free slots : 18545 (362.21 KB = 2.01%)
Trailing free slots : 0 (0.00 KB = 0.00%)
Number of contiguous groups of 16 slots: 2685 (4.65%)
Number of terminal objects: 4697 (0.51%)