RFR: 8369346: Remove default value of and deprecate the MaxRAM flag [v2]
Albert Mingkun Yang
ayang at openjdk.org
Thu Oct 23 11:10:12 UTC 2025
On Thu, 23 Oct 2025 09:04:21 GMT, Joel Sikström <jsikstro at openjdk.org> wrote:
>> Hello,
>>
>> Please see the CSR for a more detailed explanation and specific information regarding the deprecation of the flag. To summarize, the JVM is well-equiped to detect system memory and handle potential truncation errors (see [JDK-8367413 ](https://bugs.openjdk.org/browse/JDK-8367413)), making MaxRAM largely redundant. Removing the default value from MaxRAM mainly impacts systems with more memory than the default (128GB on 64-bit systems and 4GB on 32-bit systems) that are running with `-XX:-UseCompressedOops` or `-XX:+UseZGC`, which disable compressed oops. We recommend users to use well-supported flags such as `-Xms` and `-Xmx` to influence heap sizing instead.
>>
>> MaxRAM is used to a very small extent to influence memory allocation in JDK tests, where MaxRAMPercentage is much more common. When MaxRAM is eventually obsoleted, the few affected tests will need to be updated or use alternative flags.
>>
>> Testing:
>> * Oracle's tier1-8
>
> Joel Sikström has updated the pull request incrementally with one additional commit since the last revision:
>
> Move MaxRAM to deprecated section in java.md
Marked as reviewed by ayang (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/27952#pullrequestreview-3369394093
More information about the hotspot-gc-dev
mailing list