Skip to content

Instantly share code, notes, and snippets.

@vova
Created April 7, 2015 12:47
Show Gist options
  • Save vova/8f4c13eb6ca3c95fe701 to your computer and use it in GitHub Desktop.
Save vova/8f4c13eb6ca3c95fe701 to your computer and use it in GitHub Desktop.
ruby with gc tuning parameters
#!/bin/sh
# wrap ruby with gc tuning parameters
export RUBY_HEAP_MIN_SLOTS=<%= @node[:ruby][:gc][:heap_min_slots] %>
export RUBY_HEAP_SLOTS_INCREMENT=<%= @node[:ruby][:gc][:heap_slots_increment] %>
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=<%= @node[:ruby][:gc][:heap_slots_growth_factor] %>
export RUBY_GC_MALLOC_LIMIT=<%= @node[:ruby][:gc][:malloc_limit] %>
export RUBY_HEAP_FREE_MIN=<%= @node[:ruby][:gc][:heap_free_min] %>
exec "<%= @node[:languages][:ruby][:ruby_bin] %>" "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment