Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8259739 | 17 | Patrick Zhang | P3 | Resolved | Fixed | b06 |
JDK-8260127 | 16.0.1 | Patrick Zhang | P3 | Resolved | Fixed | b03 |
This is actually a regression, with regards to JVM startup time extreme slowdown, initially found at an aarch64 platform (Ampere Altra core).
The chunk size of pretouching should cap with the input page size which probably stands for large pages size if UseLargePages was set, otherwise processing chunks with much smaller size inside large size pages would hurt performance.
This issue was introduced during a refactor on chunk calculationsJDK-8254972 (https://github.com/openjdk/jdk/commit/2c7fc85be92c60f4262aff3bc80e704792c1e810) but did not cause any problem immediately since the default PreTouchParallelChunkSize for all platforms are 1GB which can cover all popular sizes of large pages in use by most kernel variations. Later on, JDK-8254699 (https://github.com/openjdk/jdk/commit/805d05812c5e831947197419d163f9c83d55634a) set default 4MB for Linux platform, which is helpful to speed up startup time for some platforms. For example, most x64, since the popular default large page size (e.g. CentOS) is 2MB. In contrast, most default large page size with aarch64 platforms/kernels (e.g. CentOS) are 512MB, so using the 4MB chunk size to do page walk through the pages inside 512MB large page hurt performance of startup time.
In addition, there will be a similar problem if we set -XX:PreTouchParallelChunkSize=4k at a x64 Linux platform, the startup slowdown will show as well.
The fix for this is ready, I will attach the test results, and propose a PR soon
The chunk size of pretouching should cap with the input page size which probably stands for large pages size if UseLargePages was set, otherwise processing chunks with much smaller size inside large size pages would hurt performance.
This issue was introduced during a refactor on chunk calculations
In addition, there will be a similar problem if we set -XX:PreTouchParallelChunkSize=4k at a x64 Linux platform, the startup slowdown will show as well.
The fix for this is ready, I will attach the test results, and propose a PR soon
- backported by
-
JDK-8259739 Correct pretouch chunk size to cap with actual page size
- Resolved
-
JDK-8260127 Correct pretouch chunk size to cap with actual page size
- Resolved
- relates to
-
JDK-8254699 Suboptimal PreTouchParallelChunkSize defaults and limits
- Resolved
-
JDK-8254972 Fix pretouch chunk calculations
- Resolved
(2 links to)