-
-
Notifications
You must be signed in to change notification settings - Fork 942
Description
Environment Information
Provide at least:
JRuby 9.4.10.0-jdk21
-J-Djava.security.egd=file:/dev/./urandom -J-XX:+UseG1GC -J-XX:+UseStringDeduplication -J-Xms2560m -J-Xmx4608m -J-server -Xcext.enabled=true --disable:did_you_mean
Docker image:jruby:9.4.10.0-jdk21
Other relevant info you may wish to add:
Rails 6.1, Rails 7.0
Expected Behavior
Under JRuby 9.4.9.0 the JVM heap would be very consistent (see graph). But under 9.4.10.0 we saw a massive increase in heap usage as well as garbage collection (GC) issues causing cpu spikes and leading to dropped requests.
Looking at a grabbed heap dump I noticed that 250mb of heap was used for a very large subclassNode -> next -> next -> next ... data structure.
Thanks to @headius for this simple reproducible script.
loop { class << Object.new; end }Actual Behavior
Below is the heap usage on an application and the only change is the JRuby version from 9.4.9.0 to 9.4.10.0
