-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
8267246: -XX:MaxRAMPercentage=0 is unreasonable for jtreg tests on many-core machines #4062
Conversation
/test |
👋 Welcome back jiefu! A progress list of the required criteria for merging this PR into |
/label add build |
@DamonFool |
@DamonFool The |
Webrevs
|
@DamonFool you need to get approval to run the tests in tier1 for commits up until 94aac13 |
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.
Wait, no. That would mean on large core machines, the sum of heap sizes would be more than physical memory size. That is, 1% multiplied over >100 JTREG_JOBS would be >100%. Since MaxRAMPercentage
is lower priority than -Xmx
, and seeing that test does not expect heap OOME, why not just put the explicit heap size in that test?
diff --git a/test/hotspot/jtreg/vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java b/test/hotspot/jtreg/vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java
index 0d5f1a1626f..4ee794fb79d 100644
--- a/test/hotspot/jtreg/vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java
+++ b/test/hotspot/jtreg/vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java
@@ -36,7 +36,7 @@
* @build vm.mlvm.anonloader.stress.oome.metaspace.Test
* @run driver vm.mlvm.share.IndifiedClassesBuilder
*
- * @run main/othervm -XX:-UseGCOverheadLimit -XX:MetaspaceSize=10m -XX:MaxMetaspaceSize=20m vm.mlvm.anonloader.stress.oome.metaspace.Test
+ * @run main/othervm -Xmx1g -XX:-UseGCOverheadLimit -XX:MetaspaceSize=10m -XX:MaxMetaspaceSize=20m vm.mlvm.anonloader.stress.oome.metaspace.Test
*/
package vm.mlvm.anonloader.stress.oome.metaspace;
...maybe even |
The option -XX:MaxRAMPercentage can't really scale up properly unless it accepts values lower than 1. Not sure what to do about this. Even before hitting 0, we get very clunky behavior due to rounding at lower values. |
But my point is that the failing test -- is that the only test that fails? -- expects some heap size to accommodate Java allocations until the expected Metaspace OOM happens. In that case, the fix should be in the test itself. Because even if we do +1 to |
Mailing list message from erik.joelsson at oracle.com on build-dev: On 2021-05-17 10:19, Aleksey Shipilev wrote:
Oh, if it's double, we can just switch to using awk to make the
If this test has special needs, those should of course be handled by the /Erik |
1 similar comment
Mailing list message from erik.joelsson at oracle.com on build-dev: On 2021-05-17 10:19, Aleksey Shipilev wrote:
Oh, if it's double, we can just switch to using awk to make the
If this test has special needs, those should of course be handled by the /Erik |
Mailing list message from Aleksey Shipilev on build-dev: On 5/17/21 7:30 PM, erik.joelsson at oracle.com wrote:
Oh, cool. Having a more precise MaxRAMPercentage would be nice. -- |
1 similar comment
Mailing list message from Aleksey Shipilev on build-dev: On 5/17/21 7:30 PM, erik.joelsson at oracle.com wrote:
Oh, cool. Having a more precise MaxRAMPercentage would be nice. -- |
Patch has been updated to using awk to make the calculation. |
/test |
@DamonFool you need to get approval to run the tests in tier1 for commits up until a1e7aea |
I ran |
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.
I am good with this change, but someone else should take a look as well.
@DamonFool 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 22 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. ➡️ To integrate this PR with the above commit message to the |
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 to me, thanks for fixing this!
I took the change for a spin internally running our tier1-3.
We can still easily reproduce JDK-8267311 as before with this patch. /integrate |
@DamonFool Since your change was applied there have been 27 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 0daec49. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Hi all,
vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java fails on our many-core machines due to
-XX:MaxRAMPercentage=0
.This is because
MaxRAMPercentage
will be always 0 if JTREG_JOBS > 25 [1].It can be reproduced by:
make test TEST="vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java" JTREG="JOBS=26"
on almost all machines.Setting
-XX:MaxRAMPercentage=0
on many-core machines seems unreasonable.It would be better to fix it.
Thanks.
Best regards,
Jie
[1] https://github.com/openjdk/jdk/blob/master/make/RunTests.gmk#L741
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4062/head:pull/4062
$ git checkout pull/4062
Update a local copy of the PR:
$ git checkout pull/4062
$ git pull https://git.openjdk.java.net/jdk pull/4062/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4062
View PR using the GUI difftool:
$ git pr show -t 4062
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4062.diff