RFR: 8295269: G1: Improve slow startup due to predictor initialization

Thomas Schatzl tschatzl at openjdk.org
Fri Oct 18 08:05:30 UTC 2024


On Tue, 15 Oct 2024 09:53:05 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi all,
> 
>   please review this change that improves the time it takes to adapt the predictors to actual values during startup.
> 
> Currently predictors are initialized using compiled-in values. These values are extremely conservative as they have been based on some SPARC test runs on specjbb2000(?) or so, which means that it takes a while until the weights from these values are "gone" from the predictor sequences. (This can take 20-30 GCs).
> 
> The change modifies prediction so that only the first prediction will use these pre-baked values, after that use live values.
> 
> This makes G1 adapt much more quickly to the current application/environment.
> 
> The drawback is that there may be differences (including regressions) in out-of-box performance because the garbage collections heavily impact heap expansion, potentially expanding the heap much less, resulting in less throughput. I.e. we do more GCs during startup, causing higher cpu time ratio, expanding more.
> 
> The changes are still well within allowed range wrt to cpu time ratio etc.
> 
> This also does not impact reasonable test setups.
> 
> Testing: gha, internal performance benchmarks mostly show no change or improvements. There are some regressions that are "fixed" by setting min/max heap size indicating this is a heap sizing difference caused by differences due to faster startup.
> 
> Hth,
>   Thomas

The GHA failures are due to some script not being found i.e. infrastructure issue afaict.

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

PR Comment: https://git.openjdk.org/jdk/pull/21518#issuecomment-2421752102


More information about the hotspot-gc-dev mailing list