GC is never triggered
agis opened this issue · comments
Agis Anastasopoulos commented
Using https://github.com/github/ruby/tree/2.1 w/ 4 unicorn workers on a rails app:
$ ab -n300 -c4 http://0.0.0.0:8080/
Workers are GC.disable
ed after forked. The GC settings are the default ones.
GC is never triggered even though GC::OOB.run
is called. Yet memory peeks at 12gb after ~60reqs:
# after the 60th request
GC.stat
# => {:count=>32,
:heap_used=>59478,
:heap_length=>59682,
:heap_increment=>204,
:heap_live_slot=>24231036,
:heap_free_slot=>12174,
:heap_final_slot=>0,
:heap_swept_slot=>180347,
:heap_eden_page_length=>59478,
:heap_tomb_page_length=>0,
:total_allocated_object=>28445740,
:total_freed_object=>4214704,
:malloc_increase=>698054064,
:malloc_limit=>14000000,
:minor_gc_count=>25,
:major_gc_count=>7,
:remembered_shady_object=>5569,
:remembered_shady_object_limit=>9834,
:old_object=>357190,
:old_object_limit=>589654,
:oldmalloc_increase=>589477296,
:oldmalloc_limit=>22319355}
After the 300th req:
GC.stat
# => {:count=>32,
:heap_used=>277812,
:heap_length=>277977,
:heap_increment=>165,
:heap_live_slot=>113224475,
:heap_free_slot=>11710,
:heap_final_slot=>0,
:heap_swept_slot=>180355,
:heap_eden_page_length=>277812,
:heap_tomb_page_length=>0,
:total_allocated_object=>117439030,
:total_freed_object=>4214555,
:malloc_increase=>3116922544,
:malloc_limit=>14000000,
:minor_gc_count=>25,
:major_gc_count=>7,
:remembered_shady_object=>5571,
:remembered_shady_object_limit=>9834,
:old_object=>357202,
:old_object_limit=>589622,
:oldmalloc_increase=>2613982896,
:oldmalloc_limit=>22319355}
Also tried with a smaller MALLOC_LIMIT
, no luck.
Aman Karmani commented
Why are you calling GC.disable? I don't think OOB handles the disabled GC case.
Agis Anastasopoulos commented
Ah my bad, ignore this.