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

Drop 500MB cap for 9.1 on (and all launchers) #3739

Closed
headius opened this issue Mar 17, 2016 · 10 comments
Closed

Drop 500MB cap for 9.1 on (and all launchers) #3739

headius opened this issue Mar 17, 2016 · 10 comments
Milestone

Comments

@headius
Copy link
Member

headius commented Mar 17, 2016

I think it is time to drop the -Xmx default we have in the JRuby launchers.

History

Ten years ago, when JRuby supported Java 1.4, we were forced to modify our launcher to bump up the default max heap size because the JVM always defaulted to 64MB. Unfortunately we did not keep up with the times. As of Java 5, the default max heap size got bumped up to be 1/4 of physical memory.

Proposal

I propose the following:

  • For 9.1, we will remove -Xmx setting from jruby.bash. Most users that get JRuby will end up using the bash script.
  • When we release the new jruby-launcher based on mjruby, we should also remove the -Xmx there. Mostly just new users will get that launcher, and then only if they use Windows, rvm, or install it themselves.

Risks

Obviously if JRuby apps start using a lot more memory, people may notice that. But the JVM still limits it to avoid swamping the OS, and we get a lot of annoying reports from people due to the 500MB limit. I think it would be worth the risk to eliminate those reports, many of which start out as "why is this slow" and require manual investigation.

@kares
Copy link
Member

kares commented Mar 21, 2016

some drawbacks (mostly for the record) are memory constrained env-s esp. if JRuby shells out another jruby. we've started seeing some "Killed" failures on travis-ci that went away after -Xmx was set.

@headius
Copy link
Member Author

headius commented Apr 19, 2016

I believe it was either @kares or @enebo who also pointed out that there are some issues with JVMs determining maximum memory when running in containerized environments. Specifically, the container reports the whole machine's memory rather than any restricted memory just for the container. The JVM as a result will pick a too-large value for the container.

I note this while still supporting the change but I'm unsure what timeframe.

@headius
Copy link
Member Author

headius commented Apr 19, 2016

I would still like to do this for 9.1, which just needs a change in jruby-launcher...but we'd need to do a release of jruby-launcher.

@headius headius modified the milestones: JRuby 9.1.1.0, JRuby 9.1.0.0 Apr 22, 2016
@headius
Copy link
Member Author

headius commented Apr 22, 2016

We'll do this whenever we update the launchers. It has already been done for jruby.bash.

@abiacco
Copy link

abiacco commented May 4, 2016

I would suggest this be put under the "Notable updates since..." part of the release page for 9.1.0.0.
I just upgraded to 9.1 to start testing and my "bundle install" started hanging trying to install gems (java 7) and then OutOfMemoryError when i tried with java 8.
Only after some research did i realize the Xmx had been dropped. Setting it with JRUBY_OPTS then made bundle work again.

@headius headius modified the milestones: JRuby 9.1.1.0, JRuby 9.1.2.0 May 11, 2016
@enebo enebo modified the milestones: JRuby 9.1.2.0, JRuby 9.1.3.0 May 23, 2016
@headius headius modified the milestones: JRuby 9.2.0.0, JRuby 9.1.3.0 Aug 22, 2016
@headius
Copy link
Member Author

headius commented Aug 22, 2016

We'll reexamine this in the 9.2 timeframe. We're still behind on getting the new launcher integrated.

headius added a commit to jruby/jruby-launcher that referenced this issue May 15, 2018
Still needs a new Windows exe build.
@headius
Copy link
Member Author

headius commented May 15, 2018

Everything done for this except rebuilding .exe and releasing jruby-launcher gem.

@headius
Copy link
Member Author

headius commented May 15, 2018

FTR, bash script change has been in the wild since 9.1 and we've received no directly related bug reports.

@headius
Copy link
Member Author

headius commented Sep 19, 2018

Working on getting the gem release out, but the new Windows binaries are packed into JRuby now.

@headius
Copy link
Member Author

headius commented Sep 19, 2018

jruby-launcher 1.1.6 has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants