-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8254699: Suboptimal PreTouchParallelChunkSize defaults and limits #1503
Conversation
👋 Welcome back amitdpawar! A progress list of the required criteria for merging this PR into |
@amitdpawar The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but could you undo the changes in pretouchTask.cpp? These break the rule to have all gang tasks with a "Running .... with ... workers" message. Also, this message is then printed for all pretouch actions - even when resizing the heap which can be quite annoying.
Instead, the method could use a GCTraceTime
instance to time the method. However I do not think this is really necessary or desired - imho in this case the caller should decide on whether it wants some log output, but others may have a different opinion :)
Since a CSR is needed for changes to product flags like this, I started one with JDK-8257419. Probably also needs a release note.
/csr needed
Thanks Thomas for your reply. Log message was changed to include the time to make it easier for testing and reviewing. If not required will revert it back. Please suggest. Thanks, |
Please remove this what looks like debug code. |
I agree with Thomas, I think we should revert the changes done in |
Done. Thanks, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm.
We need to wait until the CSR has been approved. This typically happens on Thursdays.
@amitdpawar This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 122 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@tschatzl, @kstefanj) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
/csr |
@tschatzl this pull request will not be integrated until the CSR request JDK-8257419 for issue JDK-8254699 has been approved. |
Thanks Thomas and Stefan for reviewing and approving the changes. Will wait until csr approval. |
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 For guidance on how to make it a platform-dependent flag you can look at how |
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:
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. |
OK and I will make it platform specific as suggested. Thanks, |
PreTouchParallelChunkSize is changed to platform-dependent as suggested. Please check now. To make testing easier created two scripts and attached as zip file run_pretouch_test.zip.
Thanks, |
…t value set to 4M from 1G for Linux only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Thanks for approving and will issue Integrate command now. |
/Integrate |
@amitdpawar |
/integrate |
@tschatzl Only the author (@amitdpawar) is allowed to issue the |
/sponsor |
@tschatzl @amitdpawar Since your change was applied there have been 129 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 805d058. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
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)
Command: time ./jdk/bin/java -XX:+AlwaysPreTouch -XX:+-Xmx900g -Xms900g -Xmn800g -XX:SurvivorRatio=400 -Xlog:gc*=debug:file=gc.log -XX:ParallelGCThreads=128 -XX:PreTouchParallelChunkSize= -version
Test results are recorded in XL file. PreTouchParallelChunkSize_TestResults.xlsx
Test results shows:
With AdaptiveSizePolicy disabled.
SPECjbb composite test with UseAdaptiveSizePolicy + UseLargePages enabled.
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.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/1503/head:pull/1503
$ git checkout pull/1503