JavaCro'14 - Profile any environment with Java Flight Recorder – Johan Janssen

1,647 views
1,579 views

Published on

Since the Java 7 update 40 Java Flight Recorder and Mission Control are shipped with the JDK. With these tools it is possible to profile an application not only on a developer computer, but also on production. The overhead of profiling with Flight Recorder is minimal, which allows us to use the profiler on any environment. These profiling tools are relatively new and unfortunately unknown to a lot of developers. This talk will give an overview of Java Flight Recorder and Mission Control so the audience can start profiling their applications afterwards.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,647
On SlideShare
0
From Embeds
0
Number of Embeds
10
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

JavaCro'14 - Profile any environment with Java Flight Recorder – Johan Janssen

  1. 1. Johan Janssen, Info Support
  2. 2. Current situation Why should we use a profiler? Java Mission ControlJava Mission Control Java Flight Recorder JOverflow plugin Demo Questions
  3. 3. High application response time High memory usage (per end user) High CPU usageHigh CPU usage High I/O We want to create high quality software!
  4. 4. Increase Java memory settings Increase physical memory Increase CPU’sIncrease CPU’s Distribute application over multiple machines
  5. 5. Scaling is difficult oMemory per machine is limited oMemory bandwidth is limited Garbage collectionGarbage collection Maintenance cost We still have low quality software!
  6. 6. High performance oMinimal overhead (1-3%) oUsable in productionoUsable in production New in Java 7 u40 Integrated in the Hotspot JVM from the JRockit JVM Commercial feature for production Free for development use
  7. 7. Method profiling Allocation profiling I/O analysisI/O analysis Garbage collector analysis Third party events analysis Exceptions analysis Heap analysis Configure triggers
  8. 8. JMX compliant monitoring tool Dynamically monitor and manage the JVM Analyze recordings made by the Flight Recorder Fully customizable dashboardsFully customizable dashboards Java 7 u40 contains 5.2.0 Java 8 contains 5.3.0 o Minor release o Bugfixes and incremental improvements (UI etcetera) o Eclipse support
  9. 9. Eclipse o Integration with codebase Application $JDK$binjmcApplication $JDK$binjmc
  10. 10. Adjust eclipse.ini -showsplash org.eclipse.platform -vm-vm C:Program FilesJavajdk1.8.0_05jrebin Install new software http://download.oracle.com/technology/products/missionconhttp://download.oracle.com/technology/products/missionconhttp://download.oracle.com/technology/products/missionconhttp://download.oracle.com/technology/products/missioncon trol/updatesites/base/5.3.0/eclipse/trol/updatesites/base/5.3.0/eclipse/trol/updatesites/base/5.3.0/eclipse/trol/updatesites/base/5.3.0/eclipse/ Install Mission Control
  11. 11. JConsole++ Live, real time monitoring of JVM TriggersTriggers
  12. 12. Record and analysis tool for JVM’s JVM events are recorded in detail Minimal performance impactMinimal performance impact Recording files oJFR binary Multiple recordings at the same time
  13. 13. Eclipse Application $JDK$binjmc CommandlineCommandline Jcmd
  14. 14. Use correct JDK Specify correct options:Specify correct options: -XX:+UnlockCommercialFeatures -XX:+FlightRecorder
  15. 15. Perform heap dump Visualize heap dump Analyze heap dump (automatically)Analyze heap dump (automatically)
  16. 16. Unused data structures Data structures that reserve more space as the default size is bigger Objects instead of primitives Complex collections instead of arrays Duplicate data
  17. 17. Apply manual patch before installing plugins!!Apply manual patch before installing plugins!!Apply manual patch before installing plugins!!Apply manual patch before installing plugins!! Remove the following lines from <JDK>/lib/missioncontrol/configuration/org.eclips e.equinox.simpleconfigurator/bundles.info :e.equinox.simpleconfigurator/bundles.info : org.eclipse.equinox.log.nl_ja org.eclipse.equinox.log.nl_zh org.eclipse.equinox.supplement.nl_ja org.eclipse.equinox.supplement.nl_zh
  18. 18. Overlap with Mission Control Tools are part of OpenJDK Likely to stay alongside Mission ControlLikely to stay alongside Mission Control Development will focus on Mission Control
  19. 19. johan.janssen@infosupport.com

×