ruby/test
Peter Zhu a23ae56c4d Add REMEMBERED_WB_UNPROTECTED_OBJECTS_LIMIT_RATIO
[Feature #19571]

This commit adds the environment variable
`RUBY_GC_HEAP_REMEMBERED_WB_UNPROTECTED_OBJECTS_LIMIT_RATIO` which is
used to calculate the `remembered_wb_unprotected_objects_limit` using a
ratio of `old_objects`. This should improve performance by reducing
major GC because, in a major GC, we mark all of the old objects, so we
should have more uncollectible WB unprotected objects before starting a
major GC. The default has been set to 0.01 (1% of old objects).

On one of [Shopify's highest traffic Ruby apps, Storefront Renderer](https://shopify.engineering/how-shopify-reduced-storefront-response-times-rewrite),
we saw significant improvements after deploying this patch in
production. In the graphs below, we have the `tuned` group which uses
`RUBY_GC_HEAP_REMEMBERED_WB_UNPROTECTED_OBJECTS_LIMIT_RATIO=0.01` (the
default value), and an `untuned` group, which turns this feature off
with `RUBY_GC_HEAP_REMEMBERED_WB_UNPROTECTED_OBJECTS_LIMIT_RATIO=0`. We
see that the tuned group spends significantly less time in GC, on
average 0.67x of the time compared to the untuned group and 0.49x for
p99. We see this improvement in GC time translate to improvements in
response times. The average response time is now 0.96x of the time
compared to the untuned group and 0.86x for p99.

https://user-images.githubusercontent.com/15860699/229559078-e23e8ce4-5f1f-4a2f-b5ef-5769f92b8c70.png
2023-05-24 12:11:48 -04:00
..
-ext- [Feature #19579] Remove !USE_RVARGC code (#7655) 2023-04-04 17:30:06 -04:00
base64
benchmark
bigdecimal [ruby/bigdecimal] Handle correctly #remainder with infinity. Fixes 2023-02-17 17:46:27 +00:00
cgi [ruby/cgi] Loosen the domain regex to accept '.' 2022-11-28 04:34:11 +00:00
coverage More coverage tests & specs. (#7171) 2023-01-22 13:49:13 +13:00
csv s/MJIT/RJIT/ 2023-03-06 23:44:01 -08:00
date [ruby/date] Implement Date#deconstruct_keys and DateTime#deconstruct_keys 2022-12-13 19:52:06 +00:00
did_you_mean [ruby/did_you_mean] Support the new message format of NameError in 2023-02-19 07:10:47 +00:00
digest
drb s/MJIT/RJIT/ 2023-03-06 23:44:01 -08:00
dtrace
erb [ruby/erb] Fix line numbers after multi-line <%# 2022-11-29 04:56:03 +00:00
error_highlight [ruby/error_highlight] Support the new message format of NameError in Ruby 3.3 2023-02-19 10:29:56 +00:00
etc
excludes A file was missing in test/excludes for TestArraySubclass 2023-02-28 11:04:32 +09:00
fiber `rb_io_puts` should not write zero length strings. (#7806) 2023-05-15 11:13:51 +09:00
fiddle Merge fiddle-1.1.1 2022-12-09 16:36:22 +09:00
fileutils [ruby/fileutils] Add mkdir_p to FileUtils.install 2023-02-10 03:37:39 +00:00
fixtures/fake_sorted_set_gem
io Remove `require 'io/wait'` where it's no longer necessary. (#6932) 2022-12-15 11:37:01 +13:00
irb [ruby/irb] Allow `show_source` for private methods 2023-05-23 16:16:37 +00:00
json [flori/json] Call `super` in `included` hook 2023-05-24 09:37:30 +09:00
lib Revert "[ruby/rdoc] Update test libraries from ruby/ruby 2023-04-29" 2023-04-29 08:44:52 +09:00
logger [ruby/logger] Add Logger#with_level{...} for block-scoped log level. 2023-02-10 01:08:49 +00:00
mkmf mkconfig: Map `includedir` only for system ruby 2023-01-31 06:33:16 +09:00
monitor
net s/mjit/rjit/ 2023-03-06 23:44:01 -08:00
nkf
objspace Skip too-complex-shape test which is always flaky regardless JIT 2023-05-21 16:44:10 +09:00
open-uri
openssl [ruby/openssl] Revert "Skip OpenSSL::TestHMAC#test_dup when running with RHEL9" 2023-05-19 09:25:11 +09:00
optparse [ruby/optparse] Add symbolize_names to getopts 2022-12-26 15:09:21 +09:00
ostruct
pathname
psych [ruby/psych] Update for stricter 1.2 syntax 2023-01-31 13:14:05 +09:00
racc [ruby/racc] Add a newline at EOF [ci skip] 2023-05-24 15:02:49 +09:00
rdoc [ruby/rdoc] Fix references to nested label in table_of_contents 2023-05-02 04:19:46 +00:00
reline [ruby/reline] Fix dialog corrupts rendering by pushing up input line 2023-05-07 13:18:13 +00:00
resolv [ruby/resolv] Do not compress domain name in SRV RDATA 2023-04-08 14:16:59 +00:00
rinda s/MJIT/RJIT/ 2023-03-06 23:44:01 -08:00
ripper [Bug #19563] Yield words separators per lines 2023-04-07 23:13:56 +09:00
ruby Add REMEMBERED_WB_UNPROTECTED_OBJECTS_LIMIT_RATIO 2023-05-24 12:11:48 -04:00
rubygems [rubygems/rubygems] Remove forward slash in key regardless if it contains __ 2023-05-23 18:37:09 +00:00
socket Skip test_udp_server on s390x RHEL 7.1 2023-03-11 20:51:49 -08:00
stringio [ruby/stringio] [Bug #19389] Fix chomping with longer separator 2023-01-28 13:00:08 +00:00
strscan [ruby/strscan] Mask out this test on JRuby/Windows 2023-02-21 19:31:39 +09:00
syslog
uri [ruby/uri] Define test cases as qualified class names 2023-05-05 00:46:11 +00:00
win32ole [ruby/win32ole] Skip test failure with mswin platform 2023-03-29 04:00:22 +00:00
yaml Relax the timeout of a YAML test 2022-12-01 15:37:41 -08:00
zlib [ruby/zlib] Fix the test broken in older versions 2023-01-09 09:58:43 +00:00
runner.rb Use the built bundled gems in test-all as well as test-bundled-gems 2022-12-09 02:20:16 +09:00
test_abbrev.rb
test_delegate.rb [ruby/delegate] Revert "Fix `DelegateClass` block "method redefined" warning" 2022-12-01 08:08:02 +00:00
test_extlibs.rb ext/readline is retired 2023-05-10 09:52:33 +09:00
test_find.rb
test_forwardable.rb
test_getoptlong.rb
test_ipaddr.rb
test_mutex_m.rb [ruby/mutex_m] Avoid anonymous eval 2023-01-12 05:41:59 +00:00
test_observer.rb
test_open3.rb Removed to load jit_support.rb 2023-03-14 12:51:58 +09:00
test_pp.rb [ruby/pp] Remove patch added for Ruby 2.6/JRuby 9.3 2023-04-25 23:21:58 +00:00
test_prettyprint.rb
test_pstore.rb
test_pty.rb
test_rbconfig.rb mkconfig: Map `includedir` only for system ruby 2023-01-31 06:33:16 +09:00
test_securerandom.rb
test_set.rb [ruby/set] Set#merge does not take keyword arguments as a Hash 2023-02-24 11:48:08 +00:00
test_shellwords.rb
test_singleton.rb
test_sorted_set.rb
test_syslog.rb
test_tempfile.rb
test_time.rb [ruby/time] Test for quadratic backtracking on invalid time 2023-03-30 10:44:37 +00:00
test_timeout.rb [ruby/timeout] Simplify test 2023-02-15 19:25:05 +00:00
test_tmpdir.rb
test_trick.rb Add all-ruby-quine as a sample code 2023-02-27 11:20:42 +09:00
test_tsort.rb
test_unicode_normalize.rb Prefer to use File.readlines instead of IO.readlines 2023-02-27 18:49:18 +09:00
test_weakref.rb