Integrated: 8254699: Suboptimal PreTouchParallelChunkSize defaults and limits
Amit Pawar
github.com+71302734+amitdpawar at openjdk.java.net
Thu Dec 3 19:07:55 UTC 2020
On Sun, 29 Nov 2020 16:47:58 GMT, Amit Pawar <github.com+71302734+amitdpawar at openjdk.org> wrote:
> This PR fixes lower and default value of JVM flag PreTouchParallelChunkSize. Its default value is 1GB and is used by both G1GC and ParallelGC to pretouch the pages. Following test showed that reducing the chunk size improves JVM startup time and GC pause time.
>
> Tests are: (Test machine 2P 64C/128T with 1TB memory)
> 1. JVM startup time test with AdaptiveSizePolicy disabled: Pretouch 1TB of memory with/without transparent large page support and used time command to measure the time taken.
> Command: time ./jdk/bin/java -XX:+AlwaysPreTouch -XX:+<UseParallelGC or UseG1GC>-Xmx900g -Xms900g -Xmn800g -XX:SurvivorRatio=400 -Xlog:gc*=debug:file=gc.log -XX:ParallelGCThreads=128 -XX:PreTouchParallelChunkSize=<chunk size> -version
> 2. JVM startup and GC pause time test with AdaptiveSizePolicy enabled: SPECjbb composite run with 1TB heap and transparent large page support was enabled.
>
> Test results are recorded in XL file. [PreTouchParallelChunkSize_TestResults.xlsx](https://github.com/openjdk/jdk/files/5612448/PreTouchParallelChunkSize_TestResults.xlsx)
>
> Test results shows:
> 1. With AdaptiveSizePolicy disabled.
> 1. G1GC improved upto ~14% on large page disabled and ~5% on enabled.
> 2. ParallelGC improved upto ~15% on large page disabled and ~5% on enabled.
> 3. Tests showed improvement from 64KB for default page size and 2MB for lage page size.
> 4. Please check "JVM_Startup_Summary" sheet in XL file for more detail.
>
> 2. SPECjbb composite test with UseAdaptiveSizePolicy + UseLargePages enabled.
> 1. Pretouch takes up-to 30-90% less time for memory range 32MB-4GB. This happens because memory less than 1GB also pretouched with multiple threads.
> 2. Same also helps to bring down GC pause time and this is dependent on memory size. Effect is larger when expansion size is smaller.
> 3. Please check SPECjbb_Summary sheet in XL file for more detail.
>
> Default value of PreTouchParallelChunkSize is changed to 4MB and based your suggestion it can be changed to right value. Please check and review this PR.
This pull request has now been integrated.
Changeset: 805d0581
Author: Amit Pawar <amith.pawar at gmail.com>
Committer: Thomas Schatzl <tschatzl at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/805d0581
Stats: 6 lines in 5 files changed: 4 ins; 0 del; 2 mod
8254699: Suboptimal PreTouchParallelChunkSize defaults and limits
Reviewed-by: tschatzl, sjohanss
-------------
PR: https://git.openjdk.java.net/jdk/pull/1503
More information about the hotspot-dev
mailing list