Garbage Collection
These settings should be changed carefully since they may adversely affect performance. The defaults should be fine for the majority of users. Please contact enterprise@packagecloud.io if you'd like us to work with you to come up with custom-tailored parameter settings.
Overview
These settings allow you to tune the Garbage Collection settings for the Ruby runtime used throughout packagecloud:enterprise. You can edit the global settings shared by Unicorn, Rainbows, and Resque, or you can edit their individual settings using the examples below.
Definitions
heap_init_slots
Initial number of slots allocated on Ruby's heap.
heap_free_slots
After a GC execution, the minimum number of free slots that should be available.
malloc_limit
Internally the VM keeps track of malloc_increase
, which is the number of bytes that have been allocated but not yet freed. This is effectively the memory growth of the process.
oldmalloc_limit
The old generation memory growth is tracked separately by the VM in oldmalloc_increase
.
Global Ruby Settings (changes default for Unicorn, Rainbows and Resque workers)
ruby['heap_init_slots'] = 80000 ruby['heap_free_slots'] = 25000 ruby['malloc_limit'] = 64000000 ruby['oldmalloc_limit'] = 64000000
Unicorn Settings
unicorn['heap_init_slots'] = 80000 unicorn['heap_free_slots'] = 25000 unicorn['malloc_limit'] = 64000000 unicorn['oldmalloc_limit'] = 64000000
Rainbows Settings
rainbows['heap_init_slots'] = 80000 rainbows['heap_free_slots'] = 25000 rainbows['malloc_limit'] = 64000000 rainbows['oldmalloc_limit'] = 64000000
Resque Settings
resque['heap_init_slots'] = 80000 resque['heap_free_slots'] = 25000 resque['malloc_limit'] = 64000000 resque['oldmalloc_limit'] = 64000000