eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.27k stars 720 forks source link

-Xmnx startup GC hints #7281

Open amicic opened 5 years ago

amicic commented 5 years ago

We have fixed ratio of Nursery vs total heap space, for fully expanded heaps of 1/4. Tenure and Nursery independently grow (in generally, resize), and one may hit its limit much faster than the other, preventing the further growth while still not hitting the global (Xmx) limit and causing unnecessarily high GC overhead.

Over the course of a few restarts, using existing GC-hints-in-SCC facitlity , we can learn the behavior and adjust this ratio and have it more balanced.

As opposed to initial size (Xmns/Xmos) hints that we already adjust relatively quickly (typically a matter of few seconds), a snapshot of Xmnx as a stable point should be taken much latter, possibly a couple of minutes, and several global collections into the run. Clearly some experiments have to be done and establish reasonable heuristics.

amicic commented 5 years ago

@pshipton @vijaysun-omr

amicic commented 5 years ago

A conservative, but safe heuristic is to wait to hit local limits (Nursery hits Xmnx or Tenure hits -Xmox).