RFR: 8347717: Small MaxHeapSize gets increased a lot on platform with large page size

Martin Doerr mdoerr at openjdk.org
Tue Jan 14 16:07:06 UTC 2025


`GCArguments::compute_heap_alignment()` is currently problematic for platforms with large page size. E.g. on PPC64 with 64k pages:
`java -XX:+PrintFlagsFinal -Xmx8m -version |grep -E "GCCardSizeInBytes|MaxHeapSize"` says:

     uint GCCardSizeInBytes                        = 512                                       {product} {default}
   size_t MaxHeapSize                              = 33554432                                  {product} {command line, ergonomic}
   size_t SoftMaxHeapSize                          = 33554432                               {manageable} {ergonomic}
openjdk version "25-internal" 2025-09-16



I suggest to adapt `GCCardSizeInBytes` such that we get the following in this case:

     uint GCCardSizeInBytes                        = 128                                       {product} {ergonomic}
   size_t MaxHeapSize                              = 8388608                                   {product} {command line}
   size_t SoftMaxHeapSize                          = 8388608                                {manageable} {ergonomic}


Please review. Are there good alternatives / other proposals?

-------------

Commit messages:
 - 8347717: Small MaxHeapSize gets increased a lot on platform with large page size

Changes: https://git.openjdk.org/jdk/pull/23107/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23107&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8347717
  Stats: 6 lines in 1 file changed: 6 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/23107.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23107/head:pull/23107

PR: https://git.openjdk.org/jdk/pull/23107


More information about the hotspot-runtime-dev mailing list