Project

General

Profile

Actions

Bug #21696

open

Performance degradation for long running processes in Ruby 4.0.0-preview2

Bug #21696: Performance degradation for long running processes in Ruby 4.0.0-preview2

Added by easydwh (Ivo Herweijer) 22 days ago. Updated 18 days ago.

Status:
Open
Assignee:
-
Target version:
-
ruby -v:
ruby 4.0.0preview2 (2025-11-17 master 4fa6e9938c) +PRISM [x86_64-linux]
[ruby-core:123845]

Description

When running my RubyMeasureResponsetime tool (https://github.com/easydatawarehousing/ruby_measure_responsetime) on Ruby 4.0.0-preview2, a slow but steady performance degradation is measurable.
Both the Rails and the Roda based test applications show this. And both with and without yjit.
The Rails application when using yjit also seems to have increasing memory usage over time.

Running the same tests on Ruby 3.4.7 shows stable performance and memory usage.

I have included some plots showing this behavior.


Files

rails_devise_2_ruby-4.0.0.jpg (965 KB) rails_devise_2_ruby-4.0.0.jpg easydwh (Ivo Herweijer), 11/18/2025 11:47 AM
rodauth_2_ruby-4.0.0 YJIT.jpg (973 KB) rodauth_2_ruby-4.0.0 YJIT.jpg easydwh (Ivo Herweijer), 11/18/2025 11:47 AM
rodauth_2_ruby-4.0.0.jpg (1.02 MB) rodauth_2_ruby-4.0.0.jpg easydwh (Ivo Herweijer), 11/18/2025 11:53 AM
rails_devise_2_ruby-4.0.0 YJIT.jpg (917 KB) rails_devise_2_ruby-4.0.0 YJIT.jpg easydwh (Ivo Herweijer), 11/18/2025 11:54 AM
rails_devise_0_memory.png (31.2 KB) rails_devise_0_memory.png easydwh (Ivo Herweijer), 11/18/2025 11:59 AM
rodauth_0_overview.png (43.8 KB) rodauth_0_overview.png luke-gru (Luke Gruber), 11/19/2025 10:26 PM
rodauth_0_memory.png (15.6 KB) rodauth_0_memory.png luke-gru (Luke Gruber), 11/19/2025 10:27 PM
rodauth_1_ruby-3.4.7.png (152 KB) rodauth_1_ruby-3.4.7.png luke-gru (Luke Gruber), 11/19/2025 10:30 PM
rodauth_1_ruby-3.4.7 YJIT.png (121 KB) rodauth_1_ruby-3.4.7 YJIT.png luke-gru (Luke Gruber), 11/19/2025 10:32 PM
rodauth_1_ruby-4.0.0.png (119 KB) rodauth_1_ruby-4.0.0.png luke-gru (Luke Gruber), 11/19/2025 10:33 PM
rodauth_1_ruby-4.0.0 YJIT.png (118 KB) rodauth_1_ruby-4.0.0 YJIT.png luke-gru (Luke Gruber), 11/19/2025 10:33 PM
Actions

Also available in: PDF Atom