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

DirectByteBuffer do not use Large pages

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 9
    • 7
    • hotspot
    • generic

      A DESCRIPTION OF THE REQUEST :
      When using the flag -XX:+UseLargePages, DirectByteBuffers don't use them. This works fine when using standard ByteBuffers.

      JUSTIFICATION :
      Since one uses DirectByteBuffer when performance is of the essence, it would be nice to have large pages enabled for those.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      With the flag -XX:+UseLargePages, DirectByteBuffer gets allocated in the Huge page pool.
      ACTUAL -
      With the flag -XX:+UseLargePages, DirectByteBuffer uses standard pages.

      CUSTOMER SUBMITTED WORKAROUND :
      It's possible to use large pages and Direct memory by using a MappedByteBuffer that maps a file on a hugetlbfs filesytem.
      Performance is not as good as DirectByteBuffers though.

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: