Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8257419

Suboptimal PreTouchParallelChunkSize defaults and limits

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 16
    • hotspot
    • None
    • gc
    • behavioral
    • low
    • Hide
      Evaluation always showed a performance improvement. Users who previously specified a nonsensical value < page size will get an error to update their specification.
      Quick searching on the web indicated no particular usage of this flag.
      Show
      Evaluation always showed a performance improvement. Users who previously specified a nonsensical value < page size will get an error to update their specification. Quick searching on the web indicated no particular usage of this flag.
    • add/remove/modify command line option
    • Implementation

      Summary

      Update PreTouchParallelChunkSize default value for improved performance.

      Problem

      The current value of PreTouchParallelChunkSize has originally been set according to some ad-hoc testing. Further, more extensive testing showed that the time to pre-touch memory can be improved by almost 15% by adjusting this value.

      This can have significant impact on startup time with -XX:+AlwaysPreTouch enabled.

      Solution

      Set new default value for PreTouchParallelChunkSize to 4MB. JDK-8254699 contains a spreadsheet with an exhaustive performance test showing this value to be best overall.

      Also change minimal size of this value to a (small) page size.

      Specification

                                                                                \
      -  product(size_t, PreTouchParallelChunkSize, 1 * G,                      \
      +  product(size_t, PreTouchParallelChunkSize, 4 * M,                      \
                 "Per-thread chunk size for parallel memory pre-touch.")        \
      -          range(1, SIZE_MAX / 2)                                         \
      +          range(4*K, SIZE_MAX / 2)                                       \
                                                                                \

            tschatzl Thomas Schatzl
            tschatzl Thomas Schatzl
            Stefan Johansson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: