SlideShare uma empresa Scribd logo
1 de 37
1

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Java Flight Recorder
Deep Dive
Marcus Hirt
Consulting Member of Technical Staff
Agenda
 Flight Recorder Overview (recap)
 Producing Flight Recordings

 Analyzing Flight Recordings
– Overview/Key indicators
– Method Profiling
– Memory Allocation

3

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Agenda cont’d
– GC analysis
– Weblogic plug-in
– Using the Operative Set

 Common pitfalls/misunderstandings
 Customization (unsupported)
– Adding custom events (unsupported)
– Customizing the GUI (unsupported)

4

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
The following is intended to outline our general product direction. It is intended
for information purposes only, and may not be incorporated into any contract.
It is not a commitment to deliver any material, code, or functionality, and should
not be relied upon in making purchasing decisions. The development, release,
and timing of any features or functionality described for Oracle’s products
remains at the sole discretion of Oracle.

5

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Flight Recorder History
 Started out with JRockit Runtime Analyzer
– A means to get more information about the JVM and applications

running on the JVM
 Addition to JRA – LAT
– Latency Analyzer Tool
– Soft real time GC (Deterministic GC) – important to discover non-GC

related latencies
 Customer wanted always on capability – JRockit Flight Recorder
– Low overhead imperative

– Dump at any time to get data collected so far
6

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Java Flight Recorder
JVM Convergence

 Already released the engine with 7u4
 JMC client has also released!
– 5.0 release (April 2012)
– 5.1 release (August 2012)
– Only available for WLS customers (MOS)

 Waited until 7u40 to release with JDK
– Only a very limited number of Java and JVM events available!
– Did not want to release with the JDK until proper events available
– Lot’s of WLDF (third party) events though

7

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Flight Recorder
101

 High Performance Event Recorder
 Binary recordings
 Chunks
– Self contained
– Self describing

8

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Different Kinds of Recordings
 Continuous Recordings
– Have no end time
– Must be explicitly dumped

 Time Fixed Recordings (sometimes known as profiling recordings)
– Have a fixed time
– Will be automatically downloaded by Mission Control when done (if

initiated by Mission Control)

9

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
How to Think About Recordings
Recordings are collections of event type settings

 A “recording” can both mean an ongoing recording on the server

side, as well as a recording file. The context usually separates the
two.
 It might help to think of the server side recording as:
– A named collection of event type settings…
– …that are active for a certain period of time.

10

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
How to Think About Recordings
Example
 A continuous recording R0 is started at T0 with settings S0. After a while, a time fixed

recording R1 is started at T1 with settings S1, where S1 ⊃ S0. The time fixed recording
R1 ends at T2.
This is what will be recorded:

Time

Settings

T0→T1

S0

T1→T2

S0 ∪ S1

>T2

S0

If dumping R0 for a time range intersecting [T1,T2], you will get information that you did not ask for in
the settings (S0). All this in the name of performance. Once T2 arrives, the settings for R1 will be
popped, and we’re back to just recording S0.
11

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Different Kinds of Events
 Instant Event
– Data associated with the time the data was captured

 Requestable Event
– Polled from separate thread
– Has a user configurable period

 Duration Event
– Has a start time and a stop time

 Timed Event
– Like Duration Event, but with user configurable threshold

12

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Flight Recorder Inner Workings
Performance, performance, performance
When full, is copied into

Java API Events

When full, is copied into

 Extremely low overhead
Global buffer

– Using data already gathered

Event

– High performance recording engine

Disk chunk

Event

Global buffer
Thread Buffer

 Third party events
– WLS events already available

JVM Events

– DMS events already available
– Glass Fish events on the way
– You can add your own! (Not supported yet.)

13

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Global buffer
PRODUCING
RECORDINGS

14

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Preparations
Hotspot

 Need to have started the JVM from which to get recording with the

appropriate flags (for now)
-XX:+UnlockCommercialFeatures -XX:+FlightRecorder
 Need to have a recent enough JDK
– 7u4, if having only WLS events are enough
– 7u40 and later if Java & JVM events are of interest

 If remote monitoring is required:
– Start with the appropriate com.sun.management flags
– In 7u40 JDP can be used for easy discovery of manageable JVMs on

the network
15

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Creating Recordings Using Mission Control
Easy and intuitive

1.
2.
3.

Find a JVM to do a recording on in the JVM Browser
Double click the Flight Recorder node under the JVM
Follow the wizard
(will show demo soon)
Note: Ongoing recordings are listed as nodes under the Flight Recorder
node. To dump one, simply drag and drop the ongoing recording to the
editor area, or double click it. This is mostly useful for continuous
recordings.

16

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Creating Recordings Using Startup Flags
Useful for enabling continuous recordings at startup


Documentation of startup flags available in the JDK docs



The following example starts up a 1 minute recording 20 seconds after
starting the JVM:
-XX:+UnlockCommercialFeatures -XX:+FlightRecorder XX:StartFlightRecording=delay=20s,duration=60s,name=MyRecording,filena
me=C:TEMPmyrecording.jfr,settings=profile
–

The settings parameter takes either the path to, or the name of, a template

–

Default templates are located in the jre/lib/jfr folder.

–

Note: Using the settings parameter will require either a JRockit or a Hotspot
7u40 or later.

 To get more information on what is going on, change the log level:

-XX:FlightRecorderOptions=loglevel=info
17

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
The Default Recording
Shorthand for starting a continuous recording. With benefits.



Special short hand to start the JVM with a continuous recording
Started with -XX:FlightRecorderOptions=defaultrecording=true



The default recording will have the recording id 0



Only the default recording can be used with the dumponexit and dumponexitpath
parameters



The following example will start up the continuous recording. It will be dumped
when the JVM exits to C:demosdumponexit.jfr.
-XX:+UnlockCommercialFeatures -XX:+FlightRecorder XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true,dumponexitpath=C:
demosdumponexit.jfr

18

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Creating Recordings Using JCMD
Useful for controlling JFR from the command line

Usage: jcmd <pid> <command>
Example starting a recording:
jcmd 7060 JFR.start name=MyRecording settings=profile
delay=20s duration=2m filename=c:TEMPmyrecording.jfr

Example checking on recordings:
jcmd 7060 JFR.check
Example dumping a recording:
jcmd 7060 JFR.dump name=MyRecording
filename=C:TEMPdump.jfr

19

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
RECORDING
CREATION DEMO

20

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
ANALYZING
RECORDINGS

21

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Analyzing Flight Recordings in JMC
 All tab groups except for the general Events tab group are

preconfigured to show a certain aspect of the recording (sometimes
referred to as static or preconfigured tabs)
 The pre-configured tabs highlights various areas of common
interest, such as code, memory & GC, threads and IO
 General Events tab group - useful for drilling down further and for
rapidly homing in on a set of events with certain properties

22

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
The Operative Set
Power Feature

 The Operative Set is a global set of events
 Events can be added or removed to the operative set from the

context menu
 The Events tabs usually have a check box to only show events in
the operative set
 Using the Events tabs together with the Operative Set is a powerful
way to home in on events with a certain set of properties

23

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Common Features in Most Tabs
 Almost all tabs have a range selector at the top
– Used to filter on a time range
– Can be synchronized between all tabs
– Highlights events in the operative set in cyan

 The tabs in the Events tab group can be used in conjunction with

the Event Types view to filter on Event Types
 In filter boxes:
– Kleene star can be used as wildcard (*.sun.*)
– Start with regexp: if more power is needed (regexp:.*.sun..*)

(not as performant though)
24

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Programmatically Analyzing Flight Recordings
Using the JMC parser (Unsupported)

 The parser included in Mission Control can be used to analyze

recordings programmatically
 If enough people want to, I can write a blog on how it can be used
 The JMC team also have an experimental JDBC bridge

25

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Some Common Pitfalls
 Not accounting for thresholds
– Thresholds are very useful for keeping performance up but still

detecting outliers
– Can be confusing. Example:

Thread T has been running for 2 minutes and sum of latencies is a
minute. Was the thread T running unblocked for a minute?
 Not accounting for CPU load
– Don’t make decisions based on method profiling data if there is no load
– If you have full load, then looking at latencies may be a waste of time

26

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
ANALYZING
RECORDINGS DEMOS

27

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
CUSTOMIZATION

28

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Adding Your Own Events (unsupported)

29

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Minimizing Object Creation
 Can reuse event objects
 Use with care – only where you know it’s thread safe

!

30

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Built in GUI editor (unsupported)
 The JMC has a built in designer
 Can be used to both customize the existing GUI and produce

entirely new GUIs for events
 The created GUIs can be exported as plug-ins and shared

31

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
CUSTOMIZATION
DEMOS

32

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
FUTURE

33

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Dynamic Flight Record Event Generation
BCI based JFR Event Generation Framework

 Uses BCI to dynamically insert event generation probes
 Also includes an annotation framework
– Will provide easy to use syntax for generating flight recording events on

method calls, entries or exits
– Will use the same BCI framework, which allows for enabling/disabling

the events dynamically

34

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Flight Recorder Heuristics Engine
Automatic analysis of Flight Recordings

 Provides automated analysis of Flight Recording data
– Automatically provides diagnostics information
– Automatically suggests potential performance enhancements

 Engine can be used by third party consumers

35

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Shameless Book Plug
Oracle JRockit: The Definitive Guide

36

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
37

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Mais conteúdo relacionado

Mais procurados

Kafka error handling patterns and best practices | Hemant Desale and Aruna Ka...
Kafka error handling patterns and best practices | Hemant Desale and Aruna Ka...Kafka error handling patterns and best practices | Hemant Desale and Aruna Ka...
Kafka error handling patterns and best practices | Hemant Desale and Aruna Ka...HostedbyConfluent
 
Click-Through Example for Flink’s KafkaConsumer Checkpointing
Click-Through Example for Flink’s KafkaConsumer CheckpointingClick-Through Example for Flink’s KafkaConsumer Checkpointing
Click-Through Example for Flink’s KafkaConsumer CheckpointingRobert Metzger
 
Concurrent Processing Performance Analysis for Apps DBAs
Concurrent Processing Performance Analysis for Apps DBAsConcurrent Processing Performance Analysis for Apps DBAs
Concurrent Processing Performance Analysis for Apps DBAsMaris Elsins
 
Maa goldengate-rac-2007111
Maa goldengate-rac-2007111Maa goldengate-rac-2007111
Maa goldengate-rac-2007111pablitosax
 
GraalVM Native and Spring Boot 3.0
GraalVM Native and Spring Boot 3.0GraalVM Native and Spring Boot 3.0
GraalVM Native and Spring Boot 3.0MoritzHalbritter
 
Secrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on KubernetesSecrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on KubernetesBruno Borges
 
Transparent Encryption in HDFS
Transparent Encryption in HDFSTransparent Encryption in HDFS
Transparent Encryption in HDFSDataWorks Summit
 
UseNUMA做了什么?(2012-03-14)
UseNUMA做了什么?(2012-03-14)UseNUMA做了什么?(2012-03-14)
UseNUMA做了什么?(2012-03-14)Kris Mok
 
Deploying Flink on Kubernetes - David Anderson
 Deploying Flink on Kubernetes - David Anderson Deploying Flink on Kubernetes - David Anderson
Deploying Flink on Kubernetes - David AndersonVerverica
 
Oracle GoldenGate 21c New Features and Best Practices
Oracle GoldenGate 21c New Features and Best PracticesOracle GoldenGate 21c New Features and Best Practices
Oracle GoldenGate 21c New Features and Best PracticesBobby Curtis
 
Introduction to Storm
Introduction to Storm Introduction to Storm
Introduction to Storm Chandler Huang
 
Oracle on kubernetes 101 - Dec/2021
Oracle on kubernetes 101 - Dec/2021Oracle on kubernetes 101 - Dec/2021
Oracle on kubernetes 101 - Dec/2021Nelson Calero
 
Running Kafka as a Native Binary Using GraalVM with Ozan Günalp
Running Kafka as a Native Binary Using GraalVM with Ozan GünalpRunning Kafka as a Native Binary Using GraalVM with Ozan Günalp
Running Kafka as a Native Binary Using GraalVM with Ozan GünalpHostedbyConfluent
 
Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?Ludovico Caldara
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuningSimon Huang
 
Migration to Oracle Multitenant
Migration to Oracle MultitenantMigration to Oracle Multitenant
Migration to Oracle MultitenantJitendra Singh
 

Mais procurados (20)

Kafka error handling patterns and best practices | Hemant Desale and Aruna Ka...
Kafka error handling patterns and best practices | Hemant Desale and Aruna Ka...Kafka error handling patterns and best practices | Hemant Desale and Aruna Ka...
Kafka error handling patterns and best practices | Hemant Desale and Aruna Ka...
 
Click-Through Example for Flink’s KafkaConsumer Checkpointing
Click-Through Example for Flink’s KafkaConsumer CheckpointingClick-Through Example for Flink’s KafkaConsumer Checkpointing
Click-Through Example for Flink’s KafkaConsumer Checkpointing
 
Concurrent Processing Performance Analysis for Apps DBAs
Concurrent Processing Performance Analysis for Apps DBAsConcurrent Processing Performance Analysis for Apps DBAs
Concurrent Processing Performance Analysis for Apps DBAs
 
Maa goldengate-rac-2007111
Maa goldengate-rac-2007111Maa goldengate-rac-2007111
Maa goldengate-rac-2007111
 
GraalVM Native and Spring Boot 3.0
GraalVM Native and Spring Boot 3.0GraalVM Native and Spring Boot 3.0
GraalVM Native and Spring Boot 3.0
 
Secrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on KubernetesSecrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on Kubernetes
 
Transparent Encryption in HDFS
Transparent Encryption in HDFSTransparent Encryption in HDFS
Transparent Encryption in HDFS
 
Apache flink
Apache flinkApache flink
Apache flink
 
UseNUMA做了什么?(2012-03-14)
UseNUMA做了什么?(2012-03-14)UseNUMA做了什么?(2012-03-14)
UseNUMA做了什么?(2012-03-14)
 
Deploying Flink on Kubernetes - David Anderson
 Deploying Flink on Kubernetes - David Anderson Deploying Flink on Kubernetes - David Anderson
Deploying Flink on Kubernetes - David Anderson
 
Oracle GoldenGate 21c New Features and Best Practices
Oracle GoldenGate 21c New Features and Best PracticesOracle GoldenGate 21c New Features and Best Practices
Oracle GoldenGate 21c New Features and Best Practices
 
GraalVM
GraalVMGraalVM
GraalVM
 
Introduction to Storm
Introduction to Storm Introduction to Storm
Introduction to Storm
 
Oracle on kubernetes 101 - Dec/2021
Oracle on kubernetes 101 - Dec/2021Oracle on kubernetes 101 - Dec/2021
Oracle on kubernetes 101 - Dec/2021
 
File Format Benchmark - Avro, JSON, ORC and Parquet
File Format Benchmark - Avro, JSON, ORC and ParquetFile Format Benchmark - Avro, JSON, ORC and Parquet
File Format Benchmark - Avro, JSON, ORC and Parquet
 
Running Kafka as a Native Binary Using GraalVM with Ozan Günalp
Running Kafka as a Native Binary Using GraalVM with Ozan GünalpRunning Kafka as a Native Binary Using GraalVM with Ozan Günalp
Running Kafka as a Native Binary Using GraalVM with Ozan Günalp
 
Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?
 
AWR and ASH Deep Dive
AWR and ASH Deep DiveAWR and ASH Deep Dive
AWR and ASH Deep Dive
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
 
Migration to Oracle Multitenant
Migration to Oracle MultitenantMigration to Oracle Multitenant
Migration to Oracle Multitenant
 

Semelhante a Java Mission Control: Java Flight Recorder Deep Dive

Using Java Flight Recorder
Using Java Flight RecorderUsing Java Flight Recorder
Using Java Flight RecorderMarcus Hirt
 
Java Mission Control in Java SE 7U40
Java Mission Control in Java SE 7U40Java Mission Control in Java SE 7U40
Java Mission Control in Java SE 7U40Roger Brinkley
 
Production Time Profiling Out of the Box
Production Time Profiling Out of the BoxProduction Time Profiling Out of the Box
Production Time Profiling Out of the BoxMarcus Hirt
 
Java mission control and java flight recorder
Java mission control and java flight recorderJava mission control and java flight recorder
Java mission control and java flight recorderWolfgang Weigend
 
A short Intro. to Java Mission Control
A short Intro. to Java Mission ControlA short Intro. to Java Mission Control
A short Intro. to Java Mission ControlHaim Yadid
 
Getting Started with JDK Mission Control
Getting Started with JDK Mission ControlGetting Started with JDK Mission Control
Getting Started with JDK Mission ControlMarcus Hirt
 
Java Colombo Meetup: Java Mission Control & Java Flight Recorder
Java Colombo Meetup: Java Mission Control & Java Flight RecorderJava Colombo Meetup: Java Mission Control & Java Flight Recorder
Java Colombo Meetup: Java Mission Control & Java Flight RecorderIsuru Perera
 
Oracle ADF Architecture TV - Development - Logging
Oracle ADF Architecture TV - Development - LoggingOracle ADF Architecture TV - Development - Logging
Oracle ADF Architecture TV - Development - LoggingChris Muir
 
[vbrownbag presentation] network_traffic_logging
[vbrownbag presentation] network_traffic_logging[vbrownbag presentation] network_traffic_logging
[vbrownbag presentation] network_traffic_loggingnguyen phuong an
 
Whats new in Oracle Trace File analyzer 18.3.0
Whats new in Oracle Trace File analyzer 18.3.0Whats new in Oracle Trace File analyzer 18.3.0
Whats new in Oracle Trace File analyzer 18.3.0Sandesh Rao
 
Whats new in oracle trace file analyzer 18.3.0
Whats new in oracle trace file analyzer 18.3.0Whats new in oracle trace file analyzer 18.3.0
Whats new in oracle trace file analyzer 18.3.0Gareth Chapman
 
Logging & Metrics with Docker
Logging & Metrics with DockerLogging & Metrics with Docker
Logging & Metrics with DockerStefan Zier
 
Ebs performance tuning session feb 13 2013---Presented by Oracle
Ebs performance tuning session  feb 13 2013---Presented by OracleEbs performance tuning session  feb 13 2013---Presented by Oracle
Ebs performance tuning session feb 13 2013---Presented by OracleAkash Pramanik
 
WebLogic Performance Monitoring - OFM Canberra July 2014
WebLogic Performance Monitoring - OFM Canberra July 2014WebLogic Performance Monitoring - OFM Canberra July 2014
WebLogic Performance Monitoring - OFM Canberra July 2014Joelith
 
OUGLS 2016: How profiling works in MySQL
OUGLS 2016: How profiling works in MySQLOUGLS 2016: How profiling works in MySQL
OUGLS 2016: How profiling works in MySQLGeorgi Kodinov
 
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]David Buck
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time OptimizationKan-Ru Chen
 
Huawei GGSN 9811 software management
Huawei GGSN 9811 software managementHuawei GGSN 9811 software management
Huawei GGSN 9811 software managementMario Gordon
 
WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...
WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...
WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...Jeffrey West
 

Semelhante a Java Mission Control: Java Flight Recorder Deep Dive (20)

Using Java Flight Recorder
Using Java Flight RecorderUsing Java Flight Recorder
Using Java Flight Recorder
 
Java Mission Control in Java SE 7U40
Java Mission Control in Java SE 7U40Java Mission Control in Java SE 7U40
Java Mission Control in Java SE 7U40
 
Production Time Profiling Out of the Box
Production Time Profiling Out of the BoxProduction Time Profiling Out of the Box
Production Time Profiling Out of the Box
 
Java mission control and java flight recorder
Java mission control and java flight recorderJava mission control and java flight recorder
Java mission control and java flight recorder
 
A short Intro. to Java Mission Control
A short Intro. to Java Mission ControlA short Intro. to Java Mission Control
A short Intro. to Java Mission Control
 
Getting Started with JDK Mission Control
Getting Started with JDK Mission ControlGetting Started with JDK Mission Control
Getting Started with JDK Mission Control
 
Java Colombo Meetup: Java Mission Control & Java Flight Recorder
Java Colombo Meetup: Java Mission Control & Java Flight RecorderJava Colombo Meetup: Java Mission Control & Java Flight Recorder
Java Colombo Meetup: Java Mission Control & Java Flight Recorder
 
Oracle ADF Architecture TV - Development - Logging
Oracle ADF Architecture TV - Development - LoggingOracle ADF Architecture TV - Development - Logging
Oracle ADF Architecture TV - Development - Logging
 
[vbrownbag presentation] network_traffic_logging
[vbrownbag presentation] network_traffic_logging[vbrownbag presentation] network_traffic_logging
[vbrownbag presentation] network_traffic_logging
 
Whats new in Oracle Trace File analyzer 18.3.0
Whats new in Oracle Trace File analyzer 18.3.0Whats new in Oracle Trace File analyzer 18.3.0
Whats new in Oracle Trace File analyzer 18.3.0
 
Whats new in oracle trace file analyzer 18.3.0
Whats new in oracle trace file analyzer 18.3.0Whats new in oracle trace file analyzer 18.3.0
Whats new in oracle trace file analyzer 18.3.0
 
Logging & Metrics with Docker
Logging & Metrics with DockerLogging & Metrics with Docker
Logging & Metrics with Docker
 
Ebs performance tuning session feb 13 2013---Presented by Oracle
Ebs performance tuning session  feb 13 2013---Presented by OracleEbs performance tuning session  feb 13 2013---Presented by Oracle
Ebs performance tuning session feb 13 2013---Presented by Oracle
 
WebLogic Performance Monitoring - OFM Canberra July 2014
WebLogic Performance Monitoring - OFM Canberra July 2014WebLogic Performance Monitoring - OFM Canberra July 2014
WebLogic Performance Monitoring - OFM Canberra July 2014
 
OUGLS 2016: How profiling works in MySQL
OUGLS 2016: How profiling works in MySQLOUGLS 2016: How profiling works in MySQL
OUGLS 2016: How profiling works in MySQL
 
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time Optimization
 
Huawei GGSN 9811 software management
Huawei GGSN 9811 software managementHuawei GGSN 9811 software management
Huawei GGSN 9811 software management
 
WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...
WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...
WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...
 
Java Cloud and Container Ready
Java Cloud and Container ReadyJava Cloud and Container Ready
Java Cloud and Container Ready
 

Último

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Último (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

Java Mission Control: Java Flight Recorder Deep Dive

  • 1. 1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 2. Java Flight Recorder Deep Dive Marcus Hirt Consulting Member of Technical Staff
  • 3. Agenda  Flight Recorder Overview (recap)  Producing Flight Recordings  Analyzing Flight Recordings – Overview/Key indicators – Method Profiling – Memory Allocation 3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 4. Agenda cont’d – GC analysis – Weblogic plug-in – Using the Operative Set  Common pitfalls/misunderstandings  Customization (unsupported) – Adding custom events (unsupported) – Customizing the GUI (unsupported) 4 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 5. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 5 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 6. Flight Recorder History  Started out with JRockit Runtime Analyzer – A means to get more information about the JVM and applications running on the JVM  Addition to JRA – LAT – Latency Analyzer Tool – Soft real time GC (Deterministic GC) – important to discover non-GC related latencies  Customer wanted always on capability – JRockit Flight Recorder – Low overhead imperative – Dump at any time to get data collected so far 6 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 7. Java Flight Recorder JVM Convergence  Already released the engine with 7u4  JMC client has also released! – 5.0 release (April 2012) – 5.1 release (August 2012) – Only available for WLS customers (MOS)  Waited until 7u40 to release with JDK – Only a very limited number of Java and JVM events available! – Did not want to release with the JDK until proper events available – Lot’s of WLDF (third party) events though 7 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 8. Flight Recorder 101  High Performance Event Recorder  Binary recordings  Chunks – Self contained – Self describing 8 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 9. Different Kinds of Recordings  Continuous Recordings – Have no end time – Must be explicitly dumped  Time Fixed Recordings (sometimes known as profiling recordings) – Have a fixed time – Will be automatically downloaded by Mission Control when done (if initiated by Mission Control) 9 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 10. How to Think About Recordings Recordings are collections of event type settings  A “recording” can both mean an ongoing recording on the server side, as well as a recording file. The context usually separates the two.  It might help to think of the server side recording as: – A named collection of event type settings… – …that are active for a certain period of time. 10 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 11. How to Think About Recordings Example  A continuous recording R0 is started at T0 with settings S0. After a while, a time fixed recording R1 is started at T1 with settings S1, where S1 ⊃ S0. The time fixed recording R1 ends at T2. This is what will be recorded: Time Settings T0→T1 S0 T1→T2 S0 ∪ S1 >T2 S0 If dumping R0 for a time range intersecting [T1,T2], you will get information that you did not ask for in the settings (S0). All this in the name of performance. Once T2 arrives, the settings for R1 will be popped, and we’re back to just recording S0. 11 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 12. Different Kinds of Events  Instant Event – Data associated with the time the data was captured  Requestable Event – Polled from separate thread – Has a user configurable period  Duration Event – Has a start time and a stop time  Timed Event – Like Duration Event, but with user configurable threshold 12 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 13. Flight Recorder Inner Workings Performance, performance, performance When full, is copied into Java API Events When full, is copied into  Extremely low overhead Global buffer – Using data already gathered Event – High performance recording engine Disk chunk Event Global buffer Thread Buffer  Third party events – WLS events already available JVM Events – DMS events already available – Glass Fish events on the way – You can add your own! (Not supported yet.) 13 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Global buffer
  • 14. PRODUCING RECORDINGS 14 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 15. Preparations Hotspot  Need to have started the JVM from which to get recording with the appropriate flags (for now) -XX:+UnlockCommercialFeatures -XX:+FlightRecorder  Need to have a recent enough JDK – 7u4, if having only WLS events are enough – 7u40 and later if Java & JVM events are of interest  If remote monitoring is required: – Start with the appropriate com.sun.management flags – In 7u40 JDP can be used for easy discovery of manageable JVMs on the network 15 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 16. Creating Recordings Using Mission Control Easy and intuitive 1. 2. 3. Find a JVM to do a recording on in the JVM Browser Double click the Flight Recorder node under the JVM Follow the wizard (will show demo soon) Note: Ongoing recordings are listed as nodes under the Flight Recorder node. To dump one, simply drag and drop the ongoing recording to the editor area, or double click it. This is mostly useful for continuous recordings. 16 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 17. Creating Recordings Using Startup Flags Useful for enabling continuous recordings at startup  Documentation of startup flags available in the JDK docs  The following example starts up a 1 minute recording 20 seconds after starting the JVM: -XX:+UnlockCommercialFeatures -XX:+FlightRecorder XX:StartFlightRecording=delay=20s,duration=60s,name=MyRecording,filena me=C:TEMPmyrecording.jfr,settings=profile – The settings parameter takes either the path to, or the name of, a template – Default templates are located in the jre/lib/jfr folder. – Note: Using the settings parameter will require either a JRockit or a Hotspot 7u40 or later.  To get more information on what is going on, change the log level: -XX:FlightRecorderOptions=loglevel=info 17 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 18. The Default Recording Shorthand for starting a continuous recording. With benefits.   Special short hand to start the JVM with a continuous recording Started with -XX:FlightRecorderOptions=defaultrecording=true  The default recording will have the recording id 0  Only the default recording can be used with the dumponexit and dumponexitpath parameters  The following example will start up the continuous recording. It will be dumped when the JVM exits to C:demosdumponexit.jfr. -XX:+UnlockCommercialFeatures -XX:+FlightRecorder XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true,dumponexitpath=C: demosdumponexit.jfr 18 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 19. Creating Recordings Using JCMD Useful for controlling JFR from the command line Usage: jcmd <pid> <command> Example starting a recording: jcmd 7060 JFR.start name=MyRecording settings=profile delay=20s duration=2m filename=c:TEMPmyrecording.jfr Example checking on recordings: jcmd 7060 JFR.check Example dumping a recording: jcmd 7060 JFR.dump name=MyRecording filename=C:TEMPdump.jfr 19 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 20. RECORDING CREATION DEMO 20 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 21. ANALYZING RECORDINGS 21 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 22. Analyzing Flight Recordings in JMC  All tab groups except for the general Events tab group are preconfigured to show a certain aspect of the recording (sometimes referred to as static or preconfigured tabs)  The pre-configured tabs highlights various areas of common interest, such as code, memory & GC, threads and IO  General Events tab group - useful for drilling down further and for rapidly homing in on a set of events with certain properties 22 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 23. The Operative Set Power Feature  The Operative Set is a global set of events  Events can be added or removed to the operative set from the context menu  The Events tabs usually have a check box to only show events in the operative set  Using the Events tabs together with the Operative Set is a powerful way to home in on events with a certain set of properties 23 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 24. Common Features in Most Tabs  Almost all tabs have a range selector at the top – Used to filter on a time range – Can be synchronized between all tabs – Highlights events in the operative set in cyan  The tabs in the Events tab group can be used in conjunction with the Event Types view to filter on Event Types  In filter boxes: – Kleene star can be used as wildcard (*.sun.*) – Start with regexp: if more power is needed (regexp:.*.sun..*) (not as performant though) 24 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 25. Programmatically Analyzing Flight Recordings Using the JMC parser (Unsupported)  The parser included in Mission Control can be used to analyze recordings programmatically  If enough people want to, I can write a blog on how it can be used  The JMC team also have an experimental JDBC bridge 25 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 26. Some Common Pitfalls  Not accounting for thresholds – Thresholds are very useful for keeping performance up but still detecting outliers – Can be confusing. Example: Thread T has been running for 2 minutes and sum of latencies is a minute. Was the thread T running unblocked for a minute?  Not accounting for CPU load – Don’t make decisions based on method profiling data if there is no load – If you have full load, then looking at latencies may be a waste of time 26 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 27. ANALYZING RECORDINGS DEMOS 27 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 28. CUSTOMIZATION 28 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 29. Adding Your Own Events (unsupported) 29 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 30. Minimizing Object Creation  Can reuse event objects  Use with care – only where you know it’s thread safe ! 30 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 31. Built in GUI editor (unsupported)  The JMC has a built in designer  Can be used to both customize the existing GUI and produce entirely new GUIs for events  The created GUIs can be exported as plug-ins and shared 31 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 32. CUSTOMIZATION DEMOS 32 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 33. FUTURE 33 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 34. Dynamic Flight Record Event Generation BCI based JFR Event Generation Framework  Uses BCI to dynamically insert event generation probes  Also includes an annotation framework – Will provide easy to use syntax for generating flight recording events on method calls, entries or exits – Will use the same BCI framework, which allows for enabling/disabling the events dynamically 34 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 35. Flight Recorder Heuristics Engine Automatic analysis of Flight Recordings  Provides automated analysis of Flight Recording data – Automatically provides diagnostics information – Automatically suggests potential performance enhancements  Engine can be used by third party consumers 35 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 36. Shameless Book Plug Oracle JRockit: The Definitive Guide 36 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 37. 37 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Notas do Editor

  1. Thread start &amp; stopRecording metadata
  2. Thread start &amp; stopRecording metadata
  3. Thread start &amp; stopRecording metadata
  4. Thread start &amp; stopRecording metadata
  5. Thread start &amp; stopRecording metadata
  6. Thread start &amp; stopRecording metadata
  7. Thread start &amp; stopRecording metadata
  8. Thread start &amp; stopRecording metadata
  9. Thread start &amp; stopRecording metadata