Skip to content

JDK-8262163: Extend settings printout in jcmd VM.metaspace #2686

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

Conversation

tstuefe
Copy link
Member

@tstuefe tstuefe commented Feb 23, 2021

This is quite trivial.

jcmd VM.metaspace prints metaspace settings at the end of its printout. Missing from that printout are some settings which would be nice to see here, eg the GC thresholds and CDS settings (nice to know since CDS affects how metaspace is used).

Example output:

Settings:
MaxMetaspaceSize: 17179869184,00 GB
CompressedClassSpaceSize: 1,00 GB
Initial GC threshold: 20,75 MB
Current GC threshold: 21,50 MB
CDS: on
MetaspaceReclaimPolicy: balanced

Tests: Manually ran runtime/Metaspace/PrintMetaspaceDcmd.java.


Progress

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

Issue

  • JDK-8262163: Extend settings printout in jcmd VM.metaspace

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2686/head:pull/2686
$ git checkout pull/2686

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 23, 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 openjdk bot added the rfr Pull request is ready for review label Feb 23, 2021
@openjdk
Copy link

openjdk bot commented Feb 23, 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 Feb 23, 2021
@mlbridge
Copy link

mlbridge bot commented Feb 23, 2021

Webrevs

@y1yang0
Copy link
Member

y1yang0 commented Feb 23, 2021

Looks good! IMHO, can we simply reorder these settings? i.e.

Settings:
AppCDS: on
Initial GC threshold: 20,75 MB
Current GC threshold: 21,50 MB
MaxMetaspaceSize: 17179869184,00 GB
MetaspaceReclaimPolicy: balanced
CompressedClassSpaceSize: 1,00 GB

@tstuefe
Copy link
Member Author

tstuefe commented Feb 23, 2021

Hi Yang,

Looks good! IMHO, can we simply reorder these settings? i.e.

Settings:
AppCDS: on
Initial GC threshold: 20,75 MB
Current GC threshold: 21,50 MB
MaxMetaspaceSize: 17179869184,00 GB
MetaspaceReclaimPolicy: balanced
CompressedClassSpaceSize: 1,00 GB

Sure, I can reorder that, but on what base? Alphabetically?

..Thomas

@y1yang0
Copy link
Member

y1yang0 commented Feb 24, 2021

Maybe good-looking based ordering : )

@tstuefe
Copy link
Member Author

tstuefe commented Feb 24, 2021

Maybe good-looking based ordering : )

In that case I rather keep it as it is, since its ordered by subjective importance :)

Copy link
Contributor

@RealLucy RealLucy left a comment

Choose a reason for hiding this comment

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

The changes look good to me.

What I don't like is the printout of the MaxMetaspaceSize value. It is outrageously big. The value displayed corresponds to 0x400000000 GB. Looking at the code, I would expect "unlimited" to be printed. Can you explain why it is not?

@RealLucy
Copy link
Contributor

I just found JDK-8262099. It deals with the effect I disliked in my review comment. So, once JDK-8262099 is in, I am happy with this change here.

@tstuefe
Copy link
Member Author

tstuefe commented Feb 24, 2021

I just found JDK-8262099. It deals with the effect I disliked in my review comment. So, once JDK-8262099 is in, I am happy with this change here.

Thanks Lutz! Yes, I left the fix for MaxMetaspaceSize out to not interfere with Yi Yang's change.

Cheers, Thomas

@tstuefe
Copy link
Member Author

tstuefe commented Feb 24, 2021

/integrate

@openjdk
Copy link

openjdk bot commented Feb 24, 2021

@tstuefe This PR has not yet been marked as ready for integration.

@tstuefe
Copy link
Member Author

tstuefe commented Feb 24, 2021

@RealLucy Can you please approve then? Thanks!

@tstuefe tstuefe closed this Feb 24, 2021
@tstuefe tstuefe deleted the JDK-8262163-extend-vm-metaspace-settings-printout branch February 24, 2021 20:00
@tstuefe tstuefe restored the JDK-8262163-extend-vm-metaspace-settings-printout branch February 24, 2021 20:03
Copy link
Contributor

@RealLucy RealLucy left a comment

Choose a reason for hiding this comment

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

With the other change: LGTM.

@tstuefe tstuefe reopened this Feb 24, 2021
@tstuefe
Copy link
Member Author

tstuefe commented Feb 25, 2021

@RealLucy Can you please approve? As in, press the "Approve" button? :) Thanks!

Copy link
Contributor

@RealLucy RealLucy left a comment

Choose a reason for hiding this comment

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

LGTM.

@openjdk
Copy link

openjdk bot commented Feb 25, 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:

8262163: Extend settings printout in jcmd VM.metaspace

Reviewed-by: lucy

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

  • 0f8be6e: 8261868: Reduce inclusion of metaspace.hpp
  • 3a0d6a6: 8262099: jcmd VM.metaspace should report unlimited size if MaxMetaspaceSize isn't specified
  • a50725d: 8254001: [Metrics] Enhance parsing of cgroup interface files for version detection
  • 6549212: 8262315: missing ';' in generated entities
  • d70fd7b: 8258855: Two tests sun/security/krb5/auto/ReplayCacheTestProc.java and ReplayCacheTestProcWithMD5.java failed on OL8.3
  • 9d9ad96: 8261919: java/util/Locale/LocaleProvidersRun.java failed with "RuntimeException: Expected log was not emitted. LogRecord: null"
  • 2c99bad: 8261920: [AIX] jshell command throws java.io.IOError on non English locales
  • 8c07063: 8262259: Remove unused variable in MethodLiveness::BasicBlock::compute_gen_kill_single
  • 0d2dbd2: 8262027: Improve how HttpConnection detects a closed channel when taking/returning a connection to the pool
  • 382e38d: 8256438: AArch64: Implement match rules with ROR shift register value
  • ... and 17 more: https://git.openjdk.java.net/jdk/compare/8cfea7c523fdda1375dc74bfc3a1042d45f2188e...master

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 Feb 25, 2021
@tstuefe
Copy link
Member Author

tstuefe commented Feb 25, 2021

/integrate

@openjdk openjdk bot closed this Feb 25, 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 Feb 25, 2021
@openjdk
Copy link

openjdk bot commented Feb 25, 2021

@tstuefe Since your change was applied there have been 28 commits pushed to the master branch:

  • a83e802: 8262299: C2 compilation fails with "modified node was not processed by IGVN.transform_old()"
  • 0f8be6e: 8261868: Reduce inclusion of metaspace.hpp
  • 3a0d6a6: 8262099: jcmd VM.metaspace should report unlimited size if MaxMetaspaceSize isn't specified
  • a50725d: 8254001: [Metrics] Enhance parsing of cgroup interface files for version detection
  • 6549212: 8262315: missing ';' in generated entities
  • d70fd7b: 8258855: Two tests sun/security/krb5/auto/ReplayCacheTestProc.java and ReplayCacheTestProcWithMD5.java failed on OL8.3
  • 9d9ad96: 8261919: java/util/Locale/LocaleProvidersRun.java failed with "RuntimeException: Expected log was not emitted. LogRecord: null"
  • 2c99bad: 8261920: [AIX] jshell command throws java.io.IOError on non English locales
  • 8c07063: 8262259: Remove unused variable in MethodLiveness::BasicBlock::compute_gen_kill_single
  • 0d2dbd2: 8262027: Improve how HttpConnection detects a closed channel when taking/returning a connection to the pool
  • ... and 18 more: https://git.openjdk.java.net/jdk/compare/8cfea7c523fdda1375dc74bfc3a1042d45f2188e...master

Your commit was automatically rebased without conflicts.

Pushed as commit ea48a0b.

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

@tstuefe tstuefe deleted the JDK-8262163-extend-vm-metaspace-settings-printout branch April 26, 2021 05:04
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