JDK-8157952 : Parallelize Memory Pretouch
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-05-26
  • Updated: 2022-01-22
  • Resolved: 2016-09-16
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 9
9 b139Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
On large machines (1 TB heap), pretouching the heap takes around 10mins.
Considering that we are aiming for even larger heap, that is too slow.
There are some indications that there is potential for improvements if parallelized.

Investigate this.
Comments
URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/bc2c975bc342 User: lana Date: 2016-10-05 20:01:40 +0000
05-10-2016

URL: http://hg.openjdk.java.net/jdk9/hs/hotspot/rev/bc2c975bc342 User: tschatzl Date: 2016-09-16 10:42:11 +0000
16-09-2016

Potential fix attached.
11-08-2016

FC Extension Request Justification: This change fixes startup performance problems with -XX:+AlwaysPreTouch. On large heaps, VM startup is dominated by single thread pretouch of used memory. In case of TB heaps, startup takes 12mins. With this change VM startup takes 60-90s. Risk assessment: Low - not a big change, has been run many times on benchmarks, also completed test runs. Proposed due date: Sep 20 2016
11-08-2016

On a 1 TB Java heap, this change reduces VM startup time from ~12mins to 90-120s, which is a huge improvement when using G1.
19-07-2016

Attached some graph showing how pretouch times for a 20g heap vary with increasing number of threads on my workstation, depending on page size. (Note that the missing data points are due to laziness, not any particular other reason)
16-06-2016