RFR: 8350596: [Linux] Increase default MaxRAMPercentage for containerized workloads

Erik Österlund eosterlund at openjdk.org
Thu Sep 18 19:25:57 UTC 2025


On Thu, 18 Sep 2025 17:23:22 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

> > When these sort of proposals started popping up, I started working on automatic heap sizing instead so that we would be able to recognize that there is actually no static limit if the user hasn't said so, but we can deal with that without exhausting memory with some clever policies. Now there is a JEP for both ZGC (cf. https://openjdk.org/jeps/8329758) and G1 (cf. https://openjdk.org/jeps/8359211) to do automatic heap sizing. Given their arrival, do we still need to mess around with these guesses?
> 
> 
> 
> I think so. While those JEP drafts are really heading in the right direction, it doesn't solve the problem for the rest of the GCs. Keep in mind that for many small deployments, say 1 core, you'd get Serial GC, not solving the problem there.

This default quirk is fixed with https://openjdk.org/jeps/523 which makes G1 default where Serial is today.

> 
> 
> > If not, then I think changing from one bad guess to another bad guess might just introduce risk. I'd prefer to let automatic heap sizing solve this better instead.
> 
> 
> 
> I agree that automatic heap sizing should solve this problem. But it needs to do so for all cases. Also, it's not clear when those JEPs will be widely available. Until that's the case we should try to adjust defaults to the changed reality to ease some of this pain.

They are pretty far along.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/25086#issuecomment-3309269956


More information about the hotspot-runtime-dev mailing list