Using Java Flight Recorder

Slides:



Advertisements
Similar presentations
1.
Advertisements

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 of the corporate.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Your customer as a segment of one That changes every second! Hein Van Der Merwe Chief.
Chapter Five Users, Groups, Profiles, and Policies.
Oracle User Productivity Kit Professional Ensuring Success with Oracle Apps
Run with PC speaker on for narrative Welcome to the Narrated Guided Tour of Cizer.Net Reporting for Microsoft SQL Server Reporting Services
® IBM Software Group © 2010 IBM Corporation What’s New in Profiling & Code Coverage RAD V8 April 21, 2011 Kathy Chan
A Java Architecture for the Internet of Things Noel Poore, Architect Pete St. Pierre, Product Manager Java Platform Group, Internet of Things September.
Oracle Cloud Marketplace Neelesh Gurnani Director, Product Development Arif Khan Director, Product Management September 29, 2014 Copyright © 2014, Oracle.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Track the changes in your Apex application between releases: Yes you can Plsql.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle SQL Developer What’s New in Version 4.1 Jeff Smith
Introduction To JavaFX Scenic View Jonathan Giles Software Engineer, JavaFX Team Oracle Corp Copyright © 2014, Oracle and/or its affiliates. All rights.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle SQL Developer For the DBA Jeff Smith
The Safe Harbor The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated.
Best Practices for Supporting Oracle Hyperion EPM and Business Intelligence Solutions Mitra Veluri Senior Principal Technical Support Engineer David Valociek.
Best Practices for Upgrading Oracle PeopleSoft Environments
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Amit Jha Project Leader, Product Management Oracle EBS Procurement & Contracts.
SETUP AND CONFIGURATIONS WEBLOGIC SERVER. 1.Weblogic Installation 2.Creating domain through configuration wizard 3.Creating domain using existing template.
Best Practices for Maintaining Primavera EPPM Solutions Mike Kieffer, Sr. Manager Mary Wiedenman, Sr. Program Manager Oracle Software Support Primavera.
2 2 The following is intended to outline our general product direction. It is intended for informational purposes only, and may not be incorporated into.
Hands-On Microsoft Windows Server 2008 Chapter 11 Server and Network Monitoring.
CH 13 Server and Network Monitoring. Hands-On Microsoft Windows Server Objectives Understand the importance of server monitoring Monitor server.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. JD Edwards Summit The Newest JDE Module – Rental Management Joel Sandberg Sales Consultant.
Getting Started with Oracle Compute Cloud
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. JD Edwards Summit PaaS from an Applications Perspective Charles McGuinness Director,
Oracle Confidential – Internal/Restricted/Highly RestrictedCopyright © 2014, Oracle and/or its affiliates. All rights reserved. | Oracle Identity Management.
Managing DHCP. 2 DHCP Overview Is a protocol that allows client computers to automatically receive an IP address and TCP/IP settings from a Server Reduces.
1 Chapter Overview Monitoring Server Performance Monitoring Shared Resources Microsoft Windows 2000 Auditing.
This presentation will guide you though the initial stages of installation, through to producing your first report Click your mouse to advance the presentation.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 1.
September 18, 2002 Introduction to Windows 2000 Server Components Ryan Larson David Greer.
1Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 8 Reporting from Contract.
Using Windows Firewall and Windows Defender
Oracle E-Business Suite Order Management: Presenting the HTML and Mobile User Experience Durgaprasad Bodapati Director, Product Management Bhavana Sharma.
Oracle Application Express 3.0 Joel R. Kallman Software Development Manager.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Improving Agility in Product Development and Pricing to Gain a Competitive Edge.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 1 Quick Tutorial – Part 2 Open Data Web Services for Oracle BPM August, 2013 Forms.
1Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 8 Contract Management.
Learning Oracle ADF Grant Ronald Director of Product Management Mobility and Development Tools September, 2014 Copyright © 2014, Oracle and/or its affiliates.
1 Chapter Overview Publishing Resources in Active Directory Service Redirecting Folders Using Group Policies Deploying Applications Using Group Policies.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. JD Edwards Summit Really Cool Demo Stuff – 2015 Edition!!!!! For demo content, please.
Tool Integration with Data and Computation Grid GWE - “Grid Wizard Enterprise”
© 2010 Oracle Corporation – Proprietary and Confidential.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 1.
RIA and Web2.0 Development with no Coding Juan Camilo Ruiz Senior Product Manager Development Tools.
Workforce Scheduling Release 5.0 for Windows Implementation Overview OWS Development Team.
Oracle Fusion Applications 11gR1 ( ) Functional Overview (L2) Manage Inbound Logistics (L3) Put Away Loads.
RESTful Microservices In Java With Jersey Jakub Podlešák Software Engineer Oracle, Application Server Group September 29, 2014 Copyright © 2014, Oracle.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Planning & Budgeting Cloud Service (PBCS) Overview Business Analytics Product Group.
Week 4 Objectives Overview of Group Policy Group Policy Processing Implementing a Central Store for Administrative Templates.
Oracle Fusion Applications 11gR1 ( ) Functional Overview (L2) Manage Inbound Logistics (L3) Inspect Material.
Tool Integration with Data and Computation Grid “Grid Wizard 2”
Getting to Know Oracle Business Intelligence Oracle BI Enterprise Edition 11g Installation, Upgrade, Monitoring Limor Fledel Oracle Business Intelligence.
Hands-On Microsoft Windows Server 2008 Chapter 5 Configuring Windows Server 2008 Printing.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 5 Lifehacks for the Apex Development environment Five frameworks you should use.
CON8473 – Oracle Distribution of OpenStack Ronen Kofman Director of Product Management Oracle OpenStack September, 2014 Copyright © 2014, Oracle and/or.
Slide 1. What's New in NetBeans IDE 7.1 Name Title.
Oracle Java Cloud Service Oracle Develop July 2013.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | What You Need to Know About User Defined Objects (UDOs) With Tools Release 9.2.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Daddy, what's a middle wear? An incredibly oversimplified explanation of what Middleware.
Java Flight Recorder and Java Mission Control
SQL Database Management
FedEx Billing Online (FBO) Non-Revenue Quick Guide
My Oracle Support (The next generation Metalink experience) lynn
Flight Recorder in OpenJDK
OpenWorld 2018 How to Combine Data from Source Sites
JD Edwards Support and Oracle Cloud Infrastructure: A Successful Path to Oracle Cloud
Oracle Sales Cloud Sales campaign
1.
Presentation transcript:

Using Java Flight Recorder Marcus Hirt Consulting Member of Technical Staff Michael Avrahamov Sr. Dir. Software Development

Agenda Flight Recorder Overview Creating Recordings Analyzing Recordings Customizations Future

The following is intended to outline our general product direction 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.

Flight Recorder High Performance Event Recorder Built into the JVM 101 High Performance Event Recorder Built into the JVM Binary recordings Chunks Self contained Self describing

Flight Recorder Advantages Very detailed information Extremely low overhead (<= 1%) Can keep it always on, dump when necessary Tooling for analysing recordings built into the Oracle JDK (Java Mission Control) Java APIs available for recording custom information into the Flight Recorder in the Oracle JDK Third party integration giving wholistic view of the detailed information recorded by the Flight Recorder (WLS, JavaFX)

Java Flight Recorder Java Mission Control released with the 7u40 JDK Resulted from the JRockit and HotSpot JVM Convergence Java Mission Control released with the 7u40 JDK Java Mission Control 5.4.0 released with 8u20 Java Mission Control 5.5.0 to be released with 8u40 Most development effort is spent on Java Mission Control 6.0.0 - more on this later Thread start & stop Recording metadata

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) Thread start & stop Recording metadata

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.

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: 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. Time Settings T0→T1 S0 T1→T2 S0 ∪ S1 >T2

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

Flight Recorder Inner Workings Performance, performance, performance Extremely low overhead Using data already gathered High performance recording engine Testing! Third party events WLS DMS JavaFX You can add your own! (Not supported yet.) Thread start & stop Recording metadata

Creating recordings

Preparations Hotspot Start the JVM from which to get recordings with: -XX:+UnlockCommercialFeatures -XX:+FlightRecorder 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 Thread start & stop Recording metadata

Creating Recordings Using Mission Control Easy and intuitive 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. Thread start & stop Recording metadata

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:\TEMP\myrecording.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 Thread start & stop Recording metadata

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:\demos\dumponexit.jfr. -XX:+UnlockCommercialFeatures -XX:+FlightRecorder - XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true,dumponexitpath=C: \demos\dumponexit.jfr Thread start & stop Recording metadata

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:\TEMP\myrecording.jfr Example checking on recordings: jcmd 7060 JFR.check Example dumping a recording: jcmd 7060 JFR.dump name=MyRecording filename=C:\TEMP\dump.jfr Thread start & stop Recording metadata

Recording creation DEMO

Oracle EM

Enterprise Production Environments Tight Security protocols with respect to access to JVMs Large sets of JVMs on different life cycles Test Pre production (stage) Production Admins top priority: resume service delivery Automate discovery Automate and simplify collection Developers prefer to investigate in their habitat Thread start & stop Recording metadata

Oracle EM – secure access Problem: Dev needs access to JVM/JFR in production IT Requirements: Authentication who is allowed? Authorization What can they do? Which target/objects can they manage/see? Audit What have they done? Benefit: Admin can allow developers controlled and audited access to JVMs in production Thread start & stop Recording metadata

Oracle EM – Enterprise scale Manage all JVMs across enterprise (monitor, track changes, diagnose) Thread start & stop Recording metadata

EM JFR Demo

Analyzing Recordings

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

The Operative Set The Operative Set is a global set of events 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

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)

Analyzing Recordings DEMO

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

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

Customization

Adding Your Own Events (unsupported)

Minimizing Object Creation Can reuse event objects Use with care – only where you know it’s thread safe !

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

Customization DEMOS

Future

Quick roadmap Continually JMC 5.5.0 (8u40) JMC 6.0.0 (JDK 9) Near, mid future JMC 5.5.0 (8u40) Dynamic enablement of Flight Recorder (no startup flags needed) Hiding of Lambda Form methods JMC 6.0.0 (JDK 9) Automatic analysis of Flight Recordings Greatly revised user interface (more modern, cleaner) Continually New event types (improved I/O events, GC events, loaded libraries)

Other Resources JMC Homepage http://oracle.com/missioncontrol Plus shameless book plug JMC Homepage http://oracle.com/missioncontrol Hirt’s blog http://hirt.se/blog Twitter @javamissionctrl, @hirt Shameless Book plug EM – go to OTN