RFR: 8254699: Suboptimal PreTouchParallelChunkSize defaults and limits [v2]

Stefan Johansson sjohanss at openjdk.java.net
Wed Dec 2 14:38:56 UTC 2020


On Wed, 2 Dec 2020 14:11:57 GMT, Amit Pawar <github.com+71302734+amitdpawar at openjdk.org> wrote:

>> I did some performance runs and found that on Windows this change will not speed up pre-touching. I see some quite big regressions in some cases. So I don't think we can do this change for all platforms without doing more benchmarking. 
>> 
>> But since it looks good on Linux, one solution would be to make `PreTouchParallelChunkSize` a platform-dependent flag and set it to 4M for Linux and keep it at 1G for the others until we can do more investigations. 
>> 
>> For guidance on how to make it a platform-dependent flag you can look at how `UseLargePages` is handled.
>
> I was doubtful about the improvement regarding other platforms and thanks for testing and verifying. I will make it platform-specific as per your suggestion. 
> 
> On other platform, this improvement is not seen for smaller or lesser memory range also right ? similar too SPECJbb_Summary sheet in Excel file.

I have not done extensive measurements, I basically ran some startup benchmarks with:
-XX:+AlwaysPreTouch -Xms8g -Xmx8g
-XX:+AlwaysPreTouch -Xms8g -Xmx8g -XX:PreTouchParallelChunkSize=4m
-XX:+AlwaysPreTouch -Xms8g -Xmx8g -XX:PreTouchParallelChunkSize=128m

And on Windows going with the current default is the clear winner, while on Linux using 4M gives best results. Given that and your tests I think it is fairly safe to use 4M for Linux, but for the other OSes we need to do more measurements before changing to a different value.

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

PR: https://git.openjdk.java.net/jdk/pull/1503



More information about the hotspot-gc-dev mailing list