]> git.openstreetmap.org Git - chef.git/commitdiff
Update ruby tuning for ruby 2.1
authorTom Hughes <tom@compton.nu>
Fri, 20 Feb 2015 16:44:52 +0000 (16:44 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 20 Feb 2015 16:44:52 +0000 (16:44 +0000)
cookbooks/passenger/templates/default/ruby.erb

index 4d962204ec4c8235657cae4d34e8cae6613628db..fb7575ab0ad9e424609b8c034e7131cf6f5fc24e 100644 (file)
@@ -1,7 +1,12 @@
 #!/bin/sh
 
+<% if node[:passenger][:ruby_version].to_f < 2.1 -%>
 export RUBY_HEAP_MIN_SLOTS=500000
 export RUBY_HEAP_FREE_MIN=100000
+<% else -%>
+export RUBY_GC_HEAP_INIT_SLOTS=500000
+export RUBY_GC_HEAP_FREE_SLOTS=100000
+<% end -%>
 export RUBY_GC_MALLOC_LIMIT=50000000
 
 exec /usr/bin/ruby<%= node[:passenger][:ruby_version] %> "$@"