Profiling, Debugging, and Monitoring with JDK Flight Recorder and Cryostat

jeremy_davis 20 views 15 slides Jun 24, 2024
Slide 1
Slide 1 of 15
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15

About This Presentation

Java Flight Recorder and JDK Mission Control enable continuous collection of low level, detailed runtime information for incident analysis. JFR is included with the JDK, has a tiny footprint, and

Java Flight Recorder is a profiling and event collection framework built into the JDK.

JDK Mission Con...


Slide Content

Update confidential designator here
Version number here V00000
1
JDK Flight Recorder
and Cryostat

Jeremy Davis
Chief Architect, Red Hat
[email protected]
@argntprgrmr (Threads, Instagram, x, Twitter, Bluesky)
@[email protected]

Update confidential designator here
Version number here V00000
2
JDK Flight Recorder
and Cryostat

Jeremy Davis
Chief Architect, Red Hat
[email protected]
@argntprgrmr (Threads, Instagram, x, Twitter)
@[email protected]

Update confidential designator here
Version number here V00000
The TQM Guy
3
“Without data you are just
another person with an
opinion”
W. Edwards Deming

Update confidential designator here
Version number here V00000
It’s been around a long time
4

Update confidential designator here
Version number here V00000
5
JDK Flight Recorder

Update confidential designator here
Version number here V00000
Really 3 Things
6
Source:
Insert source data here
Insert source data here
▸JFR (JDK Flight Recorder)
▸jcmd
▸JMC (Java Mission Control)
Toolkit

Update confidential designator here
Version number here V00000
7
It’s Been Around a Long Time
Background
▸BEA JRockit Flight Recorder
▸Oracle JRockit
▸2018 OpenSource

Update confidential designator here
Version number here V00000
8
It’s Been Around a Long Time
Details
▸Designed for production
▸Event Based
▸Events aggregated as “recordings”
▸API’s for producing and analyzing events and event data
▸CLI, GUI, or custom
▸BEA, Oracle, and Open Source (since 2018)

Update confidential designator here
Version number here V00000
9
Events Are Core
Events
▸Event Id
▸Timestamp (CPU ticks)
▸Duration (CPU ticks)
▸Thread Id
▸Stack Trace Id
▸Event Specific Payload

Update confidential designator here
Version number here V00000
10
Recording
▸java -XX:StartFlightRecording
▸java -XX:StartFlightRecording:filename=myrecording.jfr,dumponexit=true
▸jcmd 60128 JFR.start
▸jcmd 60128 JFR.dump name=1 filename=60128.jfr

Update confidential designator here
Version number here V00000
Java Mission Control

Making Sense
11

Update confidential designator here
Version number here V00000
12
Cryostat

Update confidential designator here
Version number here V00000
13
cryostat.io
Cryostat UI
▸Dashboard
▸Automated Analysis
▸Grafana
▸Automated Rules
▸Recordings
▸Archive

Update confidential designator here
Version number here V00000
Finally
14
You Can Leave It Running
Source:
Insert source data here
Insert source data here
< 1% overhead
Make Custom Events!
Kubernetes == Cryostat
All the goodness in k8s

Update confidential designator here
Version number here V00000
Links
Agenda
15
▸https://docs.oracle.com/javacomponents/jmc-5-4/jfr-runtime-guide/toc.htm
▸https://cryostat.io
▸https://www.youtube.com/watch?v=XEKkUpPnf4Q
▸https://github.com/theygreystone/jmc-tutorial
▸https://developers.redhat.com/blog/2020/08/25/get-started-with-jdk-flight-recorder-in-openjdk-8u
▸https://www.youtube.com/watch?v=oPCTkW7S7T4
▸https://inside.java/2021/02/22/podcast-013/