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

Parallel GC does not handle UseLargePages and UseNUMA gracefully

XMLWordPrintable

    • gc
    • b03
    • linux

        Parallel does not handle the combination -XX:+UseLargePages and -XX:+UseNUMA gracefully. A minimal example that would trigger the bug:

        $ jdk-24/bin/java -server -XX:+UseParallelGC -XX:+UseLargePages -XX:+UseNUMA -Xmx200m -version

        If -Xmx is set to something that is larger than whatever /proc/sys/vm/nr_hugepages backs we get the expected message:

        Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve and commit memory using large pages. req_addr: 0x0000000083000000 bytes: 2097152000

        But if -Xmx is set to something that is smaller than whatever /proc/sys/vm/nr_hugepages backs we get:

        $ jdk-24/bin/java -server -XX:+UseParallelGC -XX:+UseLargePages -XX
        :+UseNUMA -Xmx200m -version
        Java HotSpot(TM) 64-Bit Server VM warning: UseNUMA is not fully compatible with +UseLargePages, disabling adaptive resizing (-XX:-UseAdaptiveSizePolicy -XX:-UseAdaptiveNUMAChunkSizing)
        mbind: Invalid argument
        mbind: Invalid argument
        mbind: Invalid argument

        This error only happens for Parallel (I have tested Serial, G1, ZGC).

              ayang Albert Yang
              jnorlinder Jonas Norlinder
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: