dragonwell-project / dragonwell8

Alibaba Dragonwell8 JDK
http://dragonwell-jdk.io
GNU General Public License v2.0
4.21k stars 497 forks source link

[GC] Add IO related size policy for Parallel GC #662

Closed weixlu closed 3 months ago

weixlu commented 3 months ago

Summary: add new parallel gc option UseIOPrioritySizePolicy to early shrink heap when io wait is high.

Testing: jtreg

Reviewers: maoliang.ml, yude.lyd

Issue: https://github.com/dragonwell-project/dragonwell8/pull/661

CR: https://github.com/dragonwell-project/dragonwell8/pull/662

CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.

weixlu commented 3 months ago

This is almost a clean cherry-pick from dragonwell11 https://github.com/dragonwell-project/dragonwell11/pull/847, except the following differences:

  1. log format. change log_debug() to if (PrintAdaptiveSizePolicy) { gclog_or_tty->print_cr(""); } and log_warning() to warning().
  2. In jdk11 we need to modify function should_update_eden_stats() to update eden size upon GC locker caused young gc. In jdk8, we don't need to change anything, since by default eden size will be updated upon GC locker caused young gc.
weixlu commented 3 months ago

Regarding benchmark score improvement on Spark, we observed a similar acceleration on dw8 as it does on dw11.