RFR: JDK-8321266: Add diagnostic RSS threshold [v2]

David Holmes dholmes at openjdk.org
Tue Dec 5 10:41:18 UTC 2023


On Tue, 5 Dec 2023 09:34:27 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> src/hotspot/share/runtime/globals.hpp line 1372:
>> 
>>> 1370:           "memory size (e.g. \"2G\") or as a percentage of "                \
>>> 1371:           "the total available memory on this machine or in this "          \
>>> 1372:           "container (e.g. \"-XX:RssLimit=80%%\"). A value of 0 (default) " \
>> 
>> It would be more usual to take this as a fraction of available memory e.g. 0.8.
>> 
>> That simplifies the parsing and validation logic.
>
> I think percent is easier to understand:
> 
> - RSSLimit=100  - percent, I guess? Because such a small number makes no sense as limit?
> - RSSLimit=90 -  percent, I guess?
> - RSSLimit=90000000 - not percent, because it is larger than 100?
> - RSSLimit=100.0 - percent because of the decimal point?
> 
> Alternative would be a complementary "RssLimitPercent" switch, but I want to keep the number of switches at a minimum.

It would be 0.9 == 90% etc. so 0.x to 1.0

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16938#discussion_r1415324803


More information about the hotspot-dev mailing list