Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heap size startup hints #4168

Merged
merged 1 commit into from
Jan 8, 2019
Merged

Commits on Jan 8, 2019

  1. Heap size startup hints

    Initial contribution of feature where on PHASE_NOT_STARTUP phase change
    GC will store current heap sizes (optionally, averaged with already
    existing stored values) into Shared Cache. During early startup GC will
    use these hints to expand heap beyond default or even explicitly
    specified sizes.
    
    This should help large workloads to avoid early GCs while heap is
    aggressively expanding, which in turn may help with startup times.
    
    In this contribution, Standard group of GC policies are covered, with
    Balanced GC following at a later point.
    
    For Flat heap configurations (optthruput/optavgpause) only the total
    heap size is maintained/expanded, while for generational configuration,
    Tenure and Nursery are separately maintained/expanded.
    
    The feature is disabled by default, but can be enabled by specifying
    value [1-100] to -XXgc:heapSizeStatupHintWeightNewValue= command line
    option. Reasonable value is 80, which should typically take about 5
    restarts for hints to converge to stable values. Value 0 (currently
    defaults) means that new values are never accounted for, which means
    that values are always 0, which effectively means that feature is
    disabled. Value 100 would mean that only use the hints from the most
    recent run, hence no historical averaging.
    
    Another tuning options is -XXgc:heapSizeStatupHintConservativeFactor=
    Default value is 70. It means that conservatively only 70% of the hint
    values are taken.
    
    An example of verbose GC stanzas reporting the expand just after
    initialized stanza is complete, before even first GC:
    
    ```
    .....
    </initialized>
    
    <heap-resize id="2" type="expand" space="nursery" amount="1461583872"
    count="1" timems="1.738" reason="hint from previous runs"
    timestamp="2019-01-03T12:59:54.909" />
    <heap-resize id="3" type="expand" space="tenure" amount="200212480"
    count="1" timems="0.930" reason="hint from previous runs"
    timestamp="2019-01-03T12:59:54.910" />
    ```
    
    Signed-off-by: Aleksandar Micic <amicic@ca.ibm.com>
    amicic committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    f626d6c View commit details
    Browse the repository at this point in the history