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

Added functionality for Java Native Memory Tracking to new helper - nmt #102

Merged
merged 2 commits into from
Sep 20, 2021

Conversation

pivotal-david-osullivan
Copy link
Contributor

@pivotal-david-osullivan pivotal-david-osullivan commented Sep 16, 2021

Summary

This PR adds Java Native Memory Tracking (NMT) features as part of RFC0003.
A helper has been added which sets the following required variables/flags to configure Java NMT:

  • "NMT_LEVEL_1=summary" - required to enable NMT successfully due to JDK bug
  • "-XX:+UnlockDiagnosticVMOptions"
  • "-XX:NativeMemoryTracking=summary" - (summary report of memory usage)
  • "-XX:+PrintNMTStatistics" - (prints memory usage data at VM exit)

These features will be enabled by default but come with a small amount of overhead - to disable Java NMT, users can set BPL_JAVA_NMT_ENABLED=false at runtime.

Use Cases

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@pivotal-david-osullivan pivotal-david-osullivan added semver:minor A change requiring a minor version bump type:enhancement A general enhancement labels Sep 16, 2021
Copy link
Contributor

@dmikusa dmikusa 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, that one minor note.

helper/nmt.go Outdated Show resolved Hide resolved
@dmikusa dmikusa merged commit a5f75e4 into main Sep 20, 2021
@dmikusa dmikusa deleted the nmt_functionality branch September 20, 2021 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump type:enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants