Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Drop 500MB cap for 9.1 on (and all launchers) #3739
I think it is time to drop the -Xmx default we have in the JRuby launchers.
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.
I propose the following:
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.
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.
I would suggest this be put under the "Notable updates since..." part of the release page for 18.104.22.168.