** Description changed: [Impact] Upstream merged some changes to improve performance on arm64 which could benefit Ubuntu users: https://github.com/ruby/ruby/commit/511b55bcefc81c03 + + FWIW the landing of this patch was driven by AWS to improve performance + on their arm64 instances. Actually, those are performance optimizations + improvements which arm64 is missing that other architectures have. Those changes considerably increase the number of instructions executed per second (ips) and also reduce the time to execute different tasks. On the other hand, it increases a bit the memory consumption. Here you can find the results of an experiment where some benchmarks defined by upstream were executed with the proposed patch on top of the Focal source package, a simple rebuild of the Focal version, and the binary from the archive in a Raspberry Pi 4 and a Canonistack VM (check the summary tab): https://docs.google.com/spreadsheets/d/1_-H78uBDrlKHcmH1IPCbnxhLsNnD6Nj- Ya31_QSnW54/edit?usp=sharing It is quite impressive how under some circumstances the ips was increased in more than 50% and the time taken to execute some tasks reduced more than 25%. IMHO those numbers are really good, and the small increase of at most 4% in the memory consumption worth in this case. [Test Case] Run the upstream benchmarks in a Ubuntu Focal arm64 machine: 1 - Install the ruby2.7 binary form the archive. 2 - Rebuild the ruby2.7 source package from Focal and install it. 3 - Build the ruby2.7 source package from Focal with the optimization patch on top of it and install it. 4 - Install the benchmark_driver gem. It is not in the archive, so install it from rubygems (sudo gem install benchmark_driver). 5 - Download the benchmarks definition from upstream master branch (https://github.com/ruby/ruby/raw/master/benchmark/). They are: - * vm_array.yml - * vm_attr_ivar_set.yml - * vm_bigarray.yml - * vm_block.yml - * vm_attr_ivar.yml - * vm_backtrace.rb - * vm_bighash.yml - * vm_block_handler.yml + * vm_array.yml + * vm_attr_ivar_set.yml + * vm_bigarray.yml + * vm_block.yml + * vm_attr_ivar.yml + * vm_backtrace.rb + * vm_bighash.yml + * vm_block_handler.yml 6 - Run the benchmarks (in the presented experiment 6 rounds were executed): $ benchmark-driver $BENCHMARK_INPUT_DIR/*.yml \ - -r $runner -e $RUBY_SYSTEM -e $RUBY_PATCHED -e $RUBY_REBUILT + -r $runner -e $RUBY_SYSTEM -e $RUBY_PATCHED -e $RUBY_REBUILT where $BENCHMARK_INPUT_DIR is the directory with the benchmarks definition and $RUBY* is the path to the respective ruby versions under analysis. [Regression Potential] The code changes impact only aarch64 so no regression is expected in other architectures. No breakage during runtime is expected. Based on the experiment presented above we might expect some extra memory consumption hitting users. However, the increase of at most 4% of memory consumption faced during the experiment seems a fair price to pay for the boost in performance this patch will provide.
** Summary changed: - [SRU] Enable some arm64 optimizations + [SRU] Enable some arm64 performance optimizations already available for other architectures ** Description changed: [Impact] Upstream merged some changes to improve performance on arm64 which could benefit Ubuntu users: https://github.com/ruby/ruby/commit/511b55bcefc81c03 FWIW the landing of this patch was driven by AWS to improve performance on their arm64 instances. Actually, those are performance optimizations improvements which arm64 is missing that other architectures have. Those changes considerably increase the number of instructions executed per second (ips) and also reduce the time to execute different tasks. On the other hand, it increases a bit the memory consumption. Here you can find the results of an experiment where some benchmarks defined by upstream were executed with the proposed patch on top of the Focal source package, a simple rebuild of the Focal version, and the binary from the archive in a Raspberry Pi 4 and a Canonistack VM (check the summary tab): https://docs.google.com/spreadsheets/d/1_-H78uBDrlKHcmH1IPCbnxhLsNnD6Nj- Ya31_QSnW54/edit?usp=sharing It is quite impressive how under some circumstances the ips was increased in more than 50% and the time taken to execute some tasks reduced more than 25%. IMHO those numbers are really good, and the small increase of at most 4% in the memory consumption worth in this case. [Test Case] Run the upstream benchmarks in a Ubuntu Focal arm64 machine: 1 - Install the ruby2.7 binary form the archive. 2 - Rebuild the ruby2.7 source package from Focal and install it. 3 - Build the ruby2.7 source package from Focal with the optimization patch on top of it and install it. 4 - Install the benchmark_driver gem. It is not in the archive, so install it from rubygems (sudo gem install benchmark_driver). 5 - Download the benchmarks definition from upstream master branch (https://github.com/ruby/ruby/raw/master/benchmark/). They are: * vm_array.yml * vm_attr_ivar_set.yml * vm_bigarray.yml * vm_block.yml * vm_attr_ivar.yml * vm_backtrace.rb * vm_bighash.yml * vm_block_handler.yml 6 - Run the benchmarks (in the presented experiment 6 rounds were executed): $ benchmark-driver $BENCHMARK_INPUT_DIR/*.yml \ -r $runner -e $RUBY_SYSTEM -e $RUBY_PATCHED -e $RUBY_REBUILT where $BENCHMARK_INPUT_DIR is the directory with the benchmarks definition and $RUBY* is the path to the respective ruby versions under analysis. [Regression Potential] The code changes impact only aarch64 so no regression is expected in other architectures. No breakage during runtime is expected. Based on the experiment presented above we might expect some extra memory consumption hitting users. However, the increase of at most 4% of memory consumption faced during the experiment seems a fair price to pay for the boost in performance this patch will provide. + + With performance improvements, particularly in C code, common things to + watch for would be segfaults, unexpected behavioral changes, and + performance regressions that are seen only on arm64. Mitigating the risk + here is that the code paths are already in use for many other + architectures. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1901074 Title: [SRU] Enable some arm64 performance optimizations already available for other architectures To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ruby2.5/+bug/1901074/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs