RFR: 8342444: Shenandoah: Uncommit regions from a separate, STS aware thread [v7]

Aleksey Shipilev shade at openjdk.org
Thu Nov 21 08:20:18 UTC 2024


On Wed, 20 Nov 2024 20:26:15 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> This one is still not addressed, unfortunately ^
>
> Yes, I spent some time trying to resurrect `ShenandoahConcurrentPhase` for uncommit here, but it really doesn't want to be used outside of a gc cycle. Also, previously it was logging heap _usage_, which isn't quite what we want here (this may actually increase during this phase, which makes it seem as though nothing is being uncommitted).
> 
> I've restored the original logging format, but instead of logging heap usage it is now logging heap committed before and after. Here is an excerpt from specjbb2015 with `-Xms5g -Xmx10g`:
> 
> 
> [2024-11-20T20:02:25.056+0000][97.396s][22293][info][gc,start       ] Concurrent uncommit
> [2024-11-20T20:02:25.072+0000][97.412s][22293][info][gc             ] Concurrent uncommit 5424M->5120M(5120M) 15.988ms
> [2024-11-20T20:05:17.916+0000][270.255s][22293][info][gc,start       ] Concurrent uncommit
> [2024-11-20T20:05:18.169+0000][270.508s][22293][info][gc             ] Concurrent uncommit 10240M->5120M(5120M) 253.048ms
> [2024-11-20T20:06:45.329+0000][357.668s][22293][info][gc,start       ] Concurrent uncommit
> [2024-11-20T20:06:45.596+0000][357.935s][22293][info][gc             ] Concurrent uncommit 10240M->5120M(5120M) 267.144ms
> [2024-11-20T20:06:57.147+0000][369.486s][22293][info][gc,start       ] Concurrent uncommit
> [2024-11-20T20:06:57.148+0000][369.487s][22293][info][gc             ] Concurrent uncommit 5456M->5440M(5440M) 1.189ms

If we are emitting a log line that looks like a properly formatted GC log line, but the numbers there mean something else for `Concurrent uncommit`, we are bound to confuse users and automatic tools. Uncommit should affect `capacity`, this is how we know how deep we have uncommitted. So, I suggest we emit:


Concurrent uncommit XXXXM->XXXXM (YYYYM) z.zzzms


...where `XXXX` is the heap used at the end of uncommit (note before and after are the same) and YYYY is capacity. This will not expose users to thinking uncommit grows the heap usage, and would give us instantaneous view on heap usage and capacity.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22019#discussion_r1851556763


More information about the hotspot-gc-dev mailing list