RFR: 8359348: G1: Improve cpu usage measurements for heap sizing [v3]
Ivan Walulya
iwalulya at openjdk.org
Thu Jul 24 12:07:53 UTC 2025
On Thu, 24 Jul 2025 10:26:39 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> VMThread cpu time only contains VM thread cpu time for GC VM operations; string deduplication is a GC/memory management activity.
>
> Another issue seems to be that since both `record_pause_start()` and `record_pause()` are called for all pauses. It seems that this implementation only considers the concurrent CPU usage between Remark/Cleanup and Young pauses as G1 currently only resizes at Young collections.
>
> The bulk of concurrent work is from Young -> Remark and Remark -> Cleanup though. If e.g. all of the concurrent cycles occurs between two Young GCs, that whole concurrent cycle seems to be lost in the calculation (or at least parts of the concurrent CPU usage)?
>
> Or am I missing something?
The assumption here is the `update_gc_pause_time_ratios` is called at the end of all GCs. The only issue I notice is that we don't call it in case of allocation_failures, which is problematic. But probably I don't understand the issue you are highlighting.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26351#discussion_r2228325405
More information about the hotspot-gc-dev
mailing list