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-JFR: Add new JFR Events: FileReadIOStatisticsEvent, FileWriteIOStatisticsEvent #10

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kthatipally
Copy link

@kthatipally kthatipally commented Sep 18, 2023

Summary:

AzDO Work item: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1751674

This pull request introduces code and test cases for incorporating new JDK.JFR (Java Flight Recorder) File I/O events. These events are designed to monitor Read Rate and Write Rate within specified intervals, logging the data periodically. The goal is to gain valuable insights into JVM performance patterns over time. The implementation is achieved through Instrumentation.

These events are designed to capture byte data statistics (Read Rate (Bytes/Sec), Write Rate((Bytes/Sec))) associated with JDK APIs, specifically those from classes like FileOutputStream, FileInputStream, RandomAccessFile, and sun.nio.ch.FileChannelImpl.

It's important to note that these events do not include byte data related to native file operations. (Native library loads).
By default, the events are disabled in default.jfc and profile.jfc

Testing:

The events attributes:

FileReadIO Statistics FileWriteIO Statistics Description
Start Time (default) Start Time (default) The start time of the event record.
Duration (default) Duration (default) startTime - endTime
End Time (default) End Time (default) The end time of the event record
Event Thread (default) Event Thread (default) JFR Periodic Thread
Read Rate (Bytes/sec) Write Rate (Bytes/sec) Rate at which the bytes are written/Read from the file operations.
Total Accumulated Read Bytes Total Accumulated Write Bytes Total bytes accumulated by the end of the JVM Process

Events Screenshots from JMC:

image

image

@kthatipally kthatipally changed the title Initial Commit: Implementation of new JFR FileReadIOStatisticsEvents … JFR-1751674: Add new JFR Events: FileReadIOStatisticsEvent, FileWriteIOStatisticsEvent Sep 18, 2023
@kthatipally kthatipally changed the title JFR-1751674: Add new JFR Events: FileReadIOStatisticsEvent, FileWriteIOStatisticsEvent JJDK-JFR: Add new JFR Events: FileReadIOStatisticsEvent, FileWriteIOStatisticsEvent Sep 28, 2023
@kthatipally kthatipally changed the title JJDK-JFR: Add new JFR Events: FileReadIOStatisticsEvent, FileWriteIOStatisticsEvent JDK-JFR: Add new JFR Events: FileReadIOStatisticsEvent, FileWriteIOStatisticsEvent Sep 28, 2023
@macarte
Copy link

macarte commented Oct 4, 2023

Looks good to me - do you have any specific text for the JBS issue? Or shall I use the PR description ...

Monitor Read Rate and Write Rate within specified intervals, logging the data periodically. The goal is to gain valuable insights into JVM performance patterns over time. The implementation is achieved through Instrumentation.

These events will capture byte data statistics (Read Rate (Bytes/Sec), Write Rate((Bytes/Sec))) associated with JDK APIs, specifically those from classes like FileOutputStream, FileInputStream, RandomAccessFile, and sun.nio.ch.FileChannelImpl.

It's important to note that these events will not include byte data related to native file operations. (Native library loads).
By default, the events are disabled in default.jfc and profile.jfc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants