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 if you'd like us to work with you to come up with custom-tailored parameter settings.


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.



Initial number of slots allocated on Ruby's heap.


After a GC execution, the minimum number of free slots that should be available.


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.


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