RFR: 8359348: G1: Improve cpu usage measurements for heap sizing [v3]
Ivan Walulya
iwalulya at openjdk.org
Mon Aug 18 09:29:14 UTC 2025
On Wed, 6 Aug 2025 21:12:52 GMT, Man Cao <manc at openjdk.org> wrote:
>>> Which is very similar to the current approach to divide concurrent-cpu-usage by some arbitrary threading factor, without needing to know that factor, and incurring inaccuracies because of that.
>>
>> Effectively it divides that concurrent-cpu-usage by the number of active processors if I am not mistaken :)
>
> The `#active-processors * time-since-last-pause` approach sounds worth experimenting.
>
> One potential concern is the heap sizing behavior could be more heavily affected by #active-processors, which could be surprising comparing to G1's current behavior. Admittedly, G1's current heap sizing behavior could already be affected by #active-processors (mainly via default values for ParallelGCThreads/ConcGCThreads), but it is likely to a much lesser extent.
>
> If a prototype of this approach exists, we should probably test how much difference in heap sizing there is for an application running with a low value of `ActiveProcessorCount` vs a high value. My main worry is that `#active-processors * time-since-last-pause` could inflate the divisor too much if `#active-processors` is very high (e.g. >100), which could make the heap much smaller, which is quite counter-intuitive.
So iiuc, we have narrowed down to
Suggestion:
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26351#discussion_r2281829373
More information about the hotspot-gc-dev
mailing list