From d3814708a93c57dfcd4afdb244f16996d7f4fac9 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Wed, 25 Nov 2015 11:59:56 +0800 Subject: [PATCH] gc tuning --- .example-env | 13 +++++++++++++ Gemfile | 1 + Gemfile.lock | 5 +++++ 3 files changed, 19 insertions(+) diff --git a/.example-env b/.example-env index 3e8752fb..c8fb94af 100644 --- a/.example-env +++ b/.example-env @@ -16,3 +16,16 @@ SSO_KEY # for a uniq ordered list of env vars: ## grep -rIsoh -P "(?<=ENV)(\.fetch\(|\[).[A-Z_]+.(\)|\])" | grep -oP "[A-Z_]+" | sort -u > temp +RUBY_GC_TUNE=0 #set to 1 to enable GC test +RUBY_GC_TOKEN=4f4380fc9a2857d1f008005a3eb86928 +RUBY_GC_HEAP_INIT_SLOTS=186426 +RUBY_GC_HEAP_FREE_SLOTS=559278 +RUBY_GC_HEAP_GROWTH_FACTOR=1.03 +RUBY_GC_HEAP_GROWTH_MAX_SLOTS=74570 +RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.4 +RUBY_GC_MALLOC_LIMIT=32883406 +RUBY_GC_MALLOC_LIMIT_MAX=69055153 +RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR=1.68 +RUBY_GC_OLDMALLOC_LIMIT=32509481 +RUBY_GC_OLDMALLOC_LIMIT_MAX=68269910 +RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR=1.4 diff --git a/Gemfile b/Gemfile index ed6a6863..d54d13d2 100644 --- a/Gemfile +++ b/Gemfile @@ -49,4 +49,5 @@ group :development, :test do gem 'better_errors' gem 'binding_of_caller' gem 'quiet_assets' + gem 'tunemygc' end diff --git a/Gemfile.lock b/Gemfile.lock index 385001fc..f1c8c7c9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -188,6 +188,7 @@ GEM thor (0.19.1) thread_safe (0.3.5) tilt (2.0.1) + tunemygc (1.0.61) tzinfo (1.2.2) thread_safe (~> 0.1) uglifier (2.7.2) @@ -229,5 +230,9 @@ DEPENDENCIES rails_12factor redis sass-rails + tunemygc uglifier uservoice-ruby + +BUNDLED WITH + 1.10.6