JavaTooling.SHARE2014
JavaTooling.SHARE2014
Diagnostic Tooling
Iris Baron
IBM Java JIT on System Z
[email protected]
Insert
Custom
Session
QR if
Desired.
Java Road Map
Java 7.0 Java 8.0**
Language Updates
• Support for dynamic languages • Language improvements
Java 5.0 Java 6.0 • Improve ease of use for SWING • Closures for simplified fork/join
• New Language features: • Performance Improvements
• New IO APIs (NIO2)
• Autoboxing • Client WebServices Support
• Java persistence API
• Enumerated types
• Generics • JMX 2.x and WS connection for
• Metadata JMX agents
• Language Changes
6.0
7.0
5.0
EE 5 EE 6.x
04 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014
IBM Java7R1
>= 20 platforms
• Improvements in
18 platforms
20 platforms
SE601/ 7.x
WAS WAS WAS • Performance
SE 6.0
WAS
SE 5.0
2
**Timelines and deliveries are subject to change.
Linux on System z and Java7SR3 on zEC12
Linux on System z - Multi-Threaded 64 bit Java Workload 16-Way
~12x Improvement in Hardware and Software
160
zEC12 SDK 7 SR3
Aggressive +
140
Normalized Throughput
LP Code Cache
zEC12 SDK 7 SR1
120
80
z196 SDK 6 SR9
60
20
z9 SDK 5 SR4
NO (CR or Heap LP)
0
1 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
Threads
J9R27 J9R27
4
IBM Operational Decision Manager
1.4
1.3
1.2
1.1
(Normalized to IBM Java 7 SR4)
1
0.9
0.8
Throughput
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
IBM Java 7 IBM Java 7R1
19% improvement to ODM with IBM Java 7R1 compared to IBM Java 7
5
Java Monitoring and Diagnostic Tooling
Agenda
6
Java Monitoring and Diagnostic Tooling
Why use the IBM Tools?
Possible problems:
• Tools simplify troubleshooting problems :
Application coding errors
7
Java Monitoring and Diagnostic Tooling
Where to get the IBM Tools?
8
Java Monitoring and Diagnostic Tooling
What is IBM Support Assistant?
9
Java Monitoring and Diagnostic Tooling
ISA Workbench – Diagnostic Tools
10
Java Monitoring and Diagnostic Tooling
What is IBM Support Assistant?
11
Java Monitoring and Diagnostic Tooling
What is IBM Support Assistant?
12
Java Monitoring and Diagnostic Tooling
Agenda
• IBM Monitoring and Diagnostic Tools for Java
– Why use the tools?
– Where to get the tools?
• Summary
13
Java Monitoring and Diagnostic Tooling
Health Center
Motivating questions:
• What is my JVM doing? Is everything ok?
• Why is my application running slowly?
• Why is it not scaling?
• Am I using the right options?
14
Java Monitoring and Diagnostic Tooling
Health Center
15
Java Monitoring and Diagnostic Tooling
Health Center
Health Center provides visualization and monitoring in the
following application areas:
• Method profiling
• Lock analysis
• Garbage Collection
• Threading
• Memory Usage
• System environment
• Java class loading
• Object Allocations
• File I/O
16
Java Monitoring and Diagnostic Tooling
Health Center - Installation
• The tool is provided in two parts:
– An Agent that collects data from a running application
– An Eclipse-based client that connects to the agent
17
Java Monitoring and Diagnostic Tooling
Health Center - Enable for Monitoring
• Full instructions are provided within the help shipped with the
Health Center Client but in most cases as simple as:
18
Java Monitoring and Diagnostic Tooling
Health Center – Advanced Options
19
Java Monitoring and Diagnostic Tooling
Health Center – API
// Connect to the Health Center agent, using the previous connection settings:
HealthCenter hcObject = HealthCenterFactory.connect(conn1, true);
20
Java Monitoring and Diagnostic Tooling
Health Center
DEMO
21
Java Monitoring and Diagnostic Tooling
Health Center
Environment reporting
•Detects invalid Java options
•Detects options which may hurt performance or
serviceability
•Useful for remote diagnosis of configuration-related
problems
22
Java Monitoring and Diagnostic Tooling
Health Center
CPU usage
•Visualizes overall system CPU use
as well as application process use
23
Java Monitoring and Diagnostic Tooling
Health Center
I/O
•Monitor application file open/close events as they
occur
•Lists currently open files
Native Memory
•Detect native memory leaks in application
•Determine if external forces are using more
memory
•Memory counters showing which parts of the
JVM are using the most native memory
24
Java Monitoring and Diagnostic Tooling
Health Center
Method Profiling
•Always-on profiling offers insight into application
activity
•Identifies the hottest methods in an application
•Full call stacks to identify where methods are being
called from and what methods they call
•No byte code instrumentation, no recompiling
25
Java Monitoring and Diagnostic Tooling
Health Center
Threads view
•List of current threads and states
•Deadlock detection and analysis
•Number of threads over time
•See contended monitors
26
Java Monitoring and Diagnostic Tooling
Agenda
• IBM Monitoring and Diagnostic Tools for Java
– Why use the tools?
– Where to get the tools?
• Summary
27
Java Monitoring and Diagnostic Tooling
Garbage Collector and Memory Visualizer (GCMV)
Motivating questions:
– How is the GC behaving? Can I do better?
– How much time is GC taking?
– How much free memory does my JVM have?
Overview
– Analyze Java verbose GC logs, providing insight into application behaviour
– Uses ps -p $PID -o pid,vsz,rss output to plot native footprint
– Visualize a wide range of GC data and Java heap statistics over time
– Provides the ability to detect memory leaks and optimized GC
– Recommendations use heuristics to guide you towards GC performance
tuning
28
Java Monitoring and Diagnostic Tooling
Garbage Collector and Memory Visualizer (GCMV)
• Views of GCMV
29
Java Monitoring and Diagnostic Tooling
Garbage Collector and Memory Visualizer (GCMV)
Graphical Display of Data
•Allows graphing of all available data: pause
times, heap size etc
•Allows zoom, cropping and change of axes
value and units
•Allows comparison of multiple files
30
Java Monitoring and Diagnostic Tooling
Agenda
• IBM Monitoring and Diagnostic Tools for Java
– Why use the tools?
– Where to get the tools?
• Summary
31
Java Monitring and Diagnostic Tooling
Memory Analyzer
Motivating questions:
– Why did I run out of Java memory?
– What’s in my Java heap? How can I explore it and get new insights?
Overview
– Tool for analyzing heap dumps and identifying memory leaks from JVMs
– Works with IBM system dumps, heapdumps and Sun HPROF binary dumps
– Provides memory leak detection, footprint analysis:
Objects by Class, Dominator Tree Analysis, Path to GC Roots, Dominator Tree
by Class Loader
– Shows areas of memory wastage:
Collections, duplicate strings, substring/char arrays, constant value primitives
– Displays Stack trace with object references
– Provides SQL like object query language (OQL)
– Provides extension points to write analysis plugins
32
Java Monitoring and Diagnostic Tooling
Memory Analyzer
Overview:
•Overview of the heapdump including size and total
number of objects.
•Provides links to continued analysis
Path to GC Roots:
•Provides the reference chain that prevents
an object being garbage collected
33
Java Monitoring and Diagnostic Tooling
Agenda
• IBM Monitoring and Diagnostic Tools for Java
– Why use the tools?
– Where to get the tools?
• Summary
34
Java Monitoring and Diagnostic Tooling
Problem Scenarios and Tools
35
Iris Baron
[email protected]
36
© Copyright IBM Corporation 2012. All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind,
express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have
the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM
software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities
referenced in these materials may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature
availability in any way. IBM, the IBM logo, Rational, the Rational logo, Telelogic, the Telelogic logo, and other IBM products and services are trademarks of the International Business Machines
Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others.
37
Where to find more information
• Documentation
• http://www.ibm.com/developerworks/java/jdk/docs.html
• http://www.redbooks.ibm.com/redpapers/pdfs/redp3950.pdf
• zOS SDK
• http://www.ibm.com/servers/eserver/zseries/software/java
• System z Linux SDK
• http://www.ibm.com/developerworks/java/jdk/linux/download.html
• Java Tuning documentation
• http://www.ibm.com/developerworks/views/java/libraryview.jsp?
search_by=java+technology+ibm+style:
• http://www-01.ibm.com/support/docview.wss?uid=swg27013824&aid=1
• http://proceedings.share.org/client_files/SHARE_in_San_Jose/S1448KI161816.pdf
• IBM Support Assistant
• http://www.ibm.com/software/support/isa/
• IBM Monitoring and Diagnostic Tools for JavaTM
• http://www.ibm.com/developerworks/java/jdk/tools/
• http://pic.dhe.ibm.com/infocenter/isa/v4r1m0/index.jsp
• Health Center API articles
– Monitor a Java application with the Health Center API parts 1 and 2
• http://www.ibm.com/developerworks/library/j-healthcareapi1/index.html
• http://www.ibm.com/developerworks/library/j-healthcareapi2/index.html
38