conserve memory
authorSam <sam.saffron@gmail.com>
Thu, 20 Oct 2016 23:29:49 +0000 (10:29 +1100)
committerSam <sam.saffron@gmail.com>
Thu, 20 Oct 2016 23:29:49 +0000 (10:29 +1100)
templates/web.template.yml

index aec88394cb4c23d4a74325834e31837e2863d943..c4036b95a0c0d3072abb84a8c340860be1cc4376 100644 (file)
@@ -6,6 +6,10 @@ env:
   # this gives us very good cache coverage, 96 -> 99
   # in practice it is 1-2% perf improvement
   RUBY_GLOBAL_METHOD_CACHE_SIZE: 131072
+  # stop heap doubling in size so aggressively, this conserves memory
+  RUBY_GC_HEAP_GROWTH_MAX_SLOTS: 40000
+  RUBY_GC_HEAP_INIT_SLOTS: 400000
+  RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR: 1.5
 
   DISCOURSE_DB_SOCKET: /var/run/postgresql
   DISCOURSE_DB_HOST: