Skip to content
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

JDK-8275608: runtime/Metaspace/elastic/TestMetaspaceAllocationMT2 too slow #6041

Conversation

tstuefe
Copy link
Member

@tstuefe tstuefe commented Oct 20, 2021

Small tweaks to make these elastic metaspace stress tests faster.

Before, runtime for individual tests was wobbling between 40+ seconds and some rare timeouts at 3+ minutes, depending on machine load and random luck. Now, we get a steadfast 35-37 seconds.

I tested this manually, checking the numbers that we really test what we want to test (a lot of arena activity). Also GHAs and SAP nightlies.

Thanks, Thomas


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8275608: runtime/Metaspace/elastic/TestMetaspaceAllocationMT2 too slow

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6041/head:pull/6041
$ git checkout pull/6041

Update a local copy of the PR:
$ git checkout pull/6041
$ git pull https://git.openjdk.java.net/jdk pull/6041/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6041

View PR using the GUI difftool:
$ git pr show -t 6041

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6041.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 20, 2021

👋 Welcome back stuefe! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Oct 20, 2021

@tstuefe The following label will be automatically applied to this pull request:

  • hotspot-runtime

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.

@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Oct 20, 2021
@tstuefe tstuefe marked this pull request as ready for review October 22, 2021 12:43
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 22, 2021
@mlbridge
Copy link

mlbridge bot commented Oct 22, 2021

Webrevs

Copy link
Member

@MBaesken MBaesken left a 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; you might want to update the copyright headers too (no new review needed for that of course).

@openjdk
Copy link

openjdk bot commented Oct 29, 2021

@tstuefe 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:

8275608: runtime/Metaspace/elastic/TestMetaspaceAllocationMT2 too slow

Reviewed-by: mbaesken, shade

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 3 new commits pushed to the master branch:

  • 15fd8a3: 8276102: JDK-8245095 integration reverted JDK-8247980
  • e89b2c0: 8276086: Increase size of metaspace mappings
  • 24cf480: 8276047: G1: refactor G1CardSetArrayLocker

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 29, 2021
@tstuefe
Copy link
Member Author

tstuefe commented Oct 29, 2021

Looks good to me; you might want to update the copyright headers too (no new review needed for that of course).

Thank you Matthias! Will update the copyright before pushing.

Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me, some minor nits I wondered about below.

@@ -41,7 +41,7 @@
*/

/*
* @test id=debug-default
* @test id=debugdefault
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why these changes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, got my reply.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I wrote, I changed the test names, because I want to be able to call them individually with '#bla' and that does not work if the subtest name contains non-alphanumerics. I can do it in a separate RFE if you prefer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I don't mind doing it here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the renaming from this patch, its maybe cleaner to do it separately. Or, idk, maybe fix jtreg itself.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing jteg would be nice. There are plenty of tests with these dashed IDs, IIRC.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a committer to code-tools though. I'll need a sponsor.

@tstuefe
Copy link
Member Author

tstuefe commented Oct 29, 2021

Changes:

  • Used volatile as Alexey suggested
  • changed the breathe-in-and-out logic a bit. No need to count ticks on breathe in, the logic is:
    • allocate till we hit ceiling
    • deallocate a bit
    • again allocate until full
    • repeat 1000 times
      This leads to a reasonable small - but not 0 - number of re-created arenas, which was the intention of this test. Beforehand, allocation threads were too often recreated, we spent too much time in thread creation and -cleanup.

I also changed the test names, because I want to be able to call them individually with '#bla' and that does not work if the subtest name contains non-alphanumerics.

@tstuefe
Copy link
Member Author

tstuefe commented Oct 29, 2021

Thanks @shipilev and @MBaesken.
/integrate

@openjdk
Copy link

openjdk bot commented Oct 29, 2021

Going to push as commit d6d82f5.
Since your change was applied there have been 7 commits pushed to the master branch:

  • a1ec4f9: 6854300: [TEST_BUG] java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter_3.java fails in jdk6u14 & jdk7
  • 8cc5950: 8251468: X509Certificate.get{Subject,Issuer}AlternativeNames and getExtendedKeyUsage do not throw CertificateParsingException if extension is unparseable
  • 4c3491b: 8017175: [TESTBUG] javax/swing/JPopupMenu/4634626/bug4634626.java sometimes failed on mac
  • c0cda1d: 8273026: Slow LoginContext.login() on multi threading application
  • 15fd8a3: 8276102: JDK-8245095 integration reverted JDK-8247980
  • e89b2c0: 8276086: Increase size of metaspace mappings
  • 24cf480: 8276047: G1: refactor G1CardSetArrayLocker

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Oct 29, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 29, 2021
@openjdk
Copy link

openjdk bot commented Oct 29, 2021

@tstuefe Pushed as commit d6d82f5.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@tstuefe tstuefe deleted the JDK-8275608-make-elastic-metaspace-tests-faster branch November 11, 2021 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants