Integrated: 8309639: GenShen: Regression in LRU cache benchmark

William Kemper wkemper at openjdk.org
Thu Aug 17 21:01:06 UTC 2023


On Wed, 16 Aug 2023 23:31:33 GMT, William Kemper <wkemper at openjdk.org> wrote:

> Shenandoah's adaptive heuristic begins in a state where it is "learning" the application. In this state, it triggers collections somewhat more aggressively in an effort to "learn" the allocation rate and cycle times for the application.
> 
> Shenandoah also has the ability to "skip" evacuation phases when marking finds sufficient garbage in regions with no live objects. We call these "abbreviated" cycles. During the course of development for the generational mode, we found that such cycles tend to decrease the average cycle time tracked by the heuristic. This in turn leads to the heuristic triggering a cycle "too late" - because it expects the cycle to take less time than a normal (i.e., not abbreviated) cycle requires. To address this, we modified the heuristic to not include abbreviated cycle times in the average cycle time.
> 
> Unfortunately, this change also made the heuristic not count abbreviated cycles as "learning" cycles. Ordinarily, this is not a concern because the application will usually run plenty of "normal" cycles. However, we've discovered that the certain benchmarks and jtreg tests only run abbreviated cycles. This causes the heuristic to stay in the "learning" state for the duration of the benchmark. In this state, the GC is run more aggressively and performance suffers (15-20%).

This pull request has now been integrated.

Changeset: 867f558d
Author:    William Kemper <wkemper at openjdk.org>
URL:       https://git.openjdk.org/shenandoah/commit/867f558dc4249bdf6e7bf6a26c4a3d0dd235f7b6
Stats:     7 lines in 1 file changed: 3 ins; 3 del; 1 mod

8309639: GenShen: Regression in LRU cache benchmark

Reviewed-by: kdnilsen, ysr

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

PR: https://git.openjdk.org/shenandoah/pull/307


More information about the shenandoah-dev mailing list