Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase Xmx used by JRuby during Rake execution to 4Gb #16911

Merged
merged 1 commit into from
Jan 19, 2025

Conversation

andsel
Copy link
Contributor

@andsel andsel commented Jan 19, 2025

Release notes

[rn:skip]

What does this PR do?

Increase to 4Gb the max heap memory used by JVM to run JRuby's Rake during DRA.

@andsel andsel self-assigned this Jan 19, 2025
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @andsel

@andsel andsel marked this pull request as ready for review January 19, 2025 15:35
Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

dliappis added a commit to dliappis/logstash that referenced this pull request Jan 19, 2025
@dliappis
Copy link
Contributor

@andsel mostly curious, any idea what changed that suddenly makes us require more heap for builds from main? Kind related, how far back should it be backported?

@andsel andsel merged commit 58e6dac into elastic:main Jan 19, 2025
6 checks passed
@andsel
Copy link
Contributor Author

andsel commented Jan 19, 2025

@dliappis looking at last part of the execption:

rake aborted!
--
  | Java::JavaLang::OutOfMemoryError: Java heap space
  | org.jruby.dist/org.jruby.ext.zlib.JZlibDeflate.run(JZlibDeflate.java:323)
  | org.jruby.dist/org.jruby.ext.zlib.JZlibDeflate.append(JZlibDeflate.java:280)
  | org.jruby.dist/org.jruby.ext.zlib.JZlibDeflate.deflate(JZlibDeflate.java:297)
  | org.jruby.dist/org.jruby.ext.zlib.JZlibDeflate.deflate(JZlibDeflate.java:232)

the problems comes from JRuby JZip deflater that tries to allocate triple the space it allocate before https://github.com/jruby/jruby/blob/97d04a057681b893705f2d08c5c9cf8ccca729c5/core/src/main/java/org/jruby/ext/zlib/JZlibDeflate.java#L323, but that code is untouched for years. So I don't think that's the source.

I don't know which changes could have generated this, maybe some other Ruby Gems or jars that increased in size, but my is just speculation.

@jsvd do you have better guess on this?

@andsel
Copy link
Contributor Author

andsel commented Jan 20, 2025

@logstashmachine backport 8.x

github-actions bot pushed a commit that referenced this pull request Jan 20, 2025
andsel added a commit that referenced this pull request Jan 20, 2025
@andsel
Copy link
Contributor Author

andsel commented Jan 24, 2025

@logstashmachine backport 8.17

@andsel
Copy link
Contributor Author

andsel commented Jan 24, 2025

@logstashmachine backport 8.16

@andsel
Copy link
Contributor Author

andsel commented Jan 24, 2025

@logstashmachine backport 7.17

github-actions bot pushed a commit that referenced this pull request Jan 24, 2025
andsel added a commit that referenced this pull request Jan 24, 2025
andsel added a commit that referenced this pull request Jan 24, 2025
andsel added a commit that referenced this pull request Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants