]> git.openstreetmap.org Git - chef.git/blob - cookbooks/passenger/templates/default/ruby.erb
Update ruby tuning for ruby 2.1
[chef.git] / cookbooks / passenger / templates / default / ruby.erb
1 #!/bin/sh
2
3 <% if node[:passenger][:ruby_version].to_f < 2.1 -%>
4 export RUBY_HEAP_MIN_SLOTS=500000
5 export RUBY_HEAP_FREE_MIN=100000
6 <% else -%>
7 export RUBY_GC_HEAP_INIT_SLOTS=500000
8 export RUBY_GC_HEAP_FREE_SLOTS=100000
9 <% end -%>
10 export RUBY_GC_MALLOC_LIMIT=50000000
11
12 exec /usr/bin/ruby<%= node[:passenger][:ruby_version] %> "$@"