JDK-8346005 : Parallel: Incorrect page size calculation with UseLargePages
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 11,17,21,24,25
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2024-12-11
  • Updated: 2025-06-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26Unresolved
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
In `ParallelArguments::initialize_heap_flags_and_sizes`, we use the following to calculate the value of the (large) page size to use:

```
  const size_t min_pages = 4; // 1 for eden + 1 for each survivor + 1 for old
  const size_t page_sz = os::page_size_for_region_aligned(MinHeapSize, min_pages);
```

As we can see, the value of `MinHeapSize` (often derived ergonomically) is critical.

JDK-8345323 is an example where an incorrect large page size is picked. Even after reverting to the original OldSize value in that change, the underlying problem of selecting an incorrect large page size still persists—either due to changes in MinHeapSize or the available large page sizes.

For example: `-XX:+UseParallelGC -XX:+UseLargePages -XX:LargePageSizeInBytes=1g -XX:+UseNUMA -Xmx1g --version`. Here, `UseNUMA` is included to observe the effects of choosing an incorrect page size.