Ship 2.1.2 with GC_HEAP_OLDOBJECT_LIMIT_FACTOR of 1.3
|ruby -v:||2.1.1||Backport:||2.0.0: UNKNOWN, 2.1: UNKNOWN|
Many users are complaining about memory bloat in 2.1 series of Ruby
As denoted in https://bugs.ruby-lang.org/issues/9607 there is an excellent plan by ko1 to address this.
In the mean time I suggest we reduce GC_HEAP_OLDOBJECT_LIMIT_FACTOR to 1.3 which effectively means that instead of memory doubling it only increases by 1.5x or so over 2.0 series.
It is great we have the setting, but the reality is that most users will not want to play with this.
#5 Updated by Alexandre Riveira 8 months ago
- File 1-committed_as-ruby-2.0.jpg added
- File 2-committed_as-ruby-2.1jpg added
- File 3-committed_as-ruby-2.1-factor-1.3.jpg added
The following charts 32bit linux server with 64gb 100 puma aplications and rails 2.3.11. The first chart contains ruby 2.0, the second ruby 2.1 and the third ruby 2.1 with GC_HEAP_OLDOBJECT_LIMIT_FACTOR = 1.3.
I dispose doing tests with ruby with other values for GC_HEAP_OLDOBJECT_LIMIT_FACTOR as 1.2, 1.3, 1.5, etc.
Performance for me was not affected. My test is to do something like:
1.upto (100_000) do | i |
In parallel check if the system crashes or is slow. With ruby 2.0 is slow, even with ruby 2.1 not the 1.3 FACTOR. To perform the above test have to make the change suggested by Eric Wong at #10009.