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

8258414: OldObjectSample events too expensive #2644

Closed
wants to merge 5 commits into from

Conversation

flodav
Copy link

@flodav flodav commented Feb 19, 2021

The purpose of this change is to reduce the size of JFR recordings when the OldObjectSample event is enabled.

Problem

JFR recordings size blows up when the OldObjectSample is enabled. The memory allocation events are known to be very high traffic and will cause a lot of data, just the sheer number of events produced, and if stacktraces are added to this, the associated metadata can be huge as well. Sampled object are stored in a priority queue and their associated stack traces stored in JFRStackTraceRepository. When sample candidates are removed from the priority queue, their stacktraces remain in the repository, which will be later written at chunk rotation even if the sample has been removed.

Implementation

This PR adds a JFRStackTraceRepository dedicated to store stack traces for the OldObjectSample event. At chunk rotation, every sample stack trace is looked up in this repository and is serialized. Other stack traces are simply removed.

Benchmarks

On an AWS c5.metal instance (96 cores, 192 Gib), running SPECjvm2008 with default profile.jfc configuration with OldObjectSample event enabled gives

  • a recording size 2.78Mb with the PR fix
  • a recording size 20.73Mb with the PR fix

Progress

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

Issue

Download

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

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 19, 2021

👋 Welcome back fdavid! 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 19, 2021
@openjdk
Copy link

openjdk bot commented Feb 19, 2021

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

  • hotspot

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 hotspot-dev@openjdk.org label Feb 19, 2021
@flodav
Copy link
Author

flodav commented Feb 19, 2021

/label add hotspot-jfr

@openjdk openjdk bot added the hotspot-jfr hotspot-jfr-dev@openjdk.org label Feb 19, 2021
@openjdk
Copy link

openjdk bot commented Feb 19, 2021

@flodav
The hotspot-jfr label was successfully added.

@mlbridge
Copy link

mlbridge bot commented Feb 19, 2021

Webrevs

@flodav flodav closed this Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org hotspot-jfr hotspot-jfr-dev@openjdk.org rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

1 participant