talent. technology. true business value



Similar documents
Essentials of Java Performance Tuning. Dr Heinz Kabutz Kirk Pepperdine Sun Java Champions

Java Troubleshooting and Performance

Debugging Java performance problems. Ryan Matteson

WEBLOGIC ADMINISTRATION

Robert Honeyman

Java Monitoring. Stuff You Can Get For Free (And Stuff You Can t) Paul Jasek Sales Engineer

Advanced Liferay Architecture: Clustering and High Availability

Identifying Performance Bottleneck using JRockit. - Shivaram Thirunavukkarasu Performance Engineer Wipro Technologies

Monitoring and Managing a JVM

Troubleshoot the JVM like never before. JVM Troubleshooting Guide. Pierre-Hugues Charbonneau Ilias Tsagklis

THE BUSY DEVELOPER'S GUIDE TO JVM TROUBLESHOOTING

Java Debugging Ľuboš Koščo

BEAJRockit Mission Control. Using JRockit Mission Control in the Eclipse IDE

Tools in the Box. Quick overview on helpful tools in the JDK and use cases for them. Florin Bunau

Instrumentation Software Profiling

TDA - Thread Dump Analyzer

Informatica Master Data Management Multi Domain Hub API: Performance and Scalability Diagnostics Checklist

Tuning WebSphere Application Server ND 7.0. Royal Cyber Inc.

Liferay Performance Tuning

Effective Java Programming. measurement as the basis

Transaction Performance Maximizer InterMax

Monitoring HP OO 10. Overview. Available Tools. HP OO Community Guides

Enterprise Manager Performance Tips

WebSphere Server Administration Course

IBM WebSphere Server Administration

Performance Optimization For Operational Risk Management Application On Azure Platform

MID-TIER DEPLOYMENT KB

J2EE-JAVA SYSTEM MONITORING (Wily introscope)

USE IMPROVE EVANGELIZE. JVM Internals, Stefan Parvu System Administrator.

Java Performance Tuning

HeapStats: Your Dependable Helper for Java Applications, from Development to Operation

Top 10 Issues for Java in Production. SriSatish Ambati Cliff Click Jr. Azul Systems, Inc

Memory Profiling using Visual VM

Java Performance. Adrian Dozsa TM-JUG

Web Performance, Inc. Testing Services Sample Performance Analysis

What s Cool in the SAP JVM (CON3243)

Weblogic Server Administration Top Ten Concepts. Mrityunjay Kant, AST Corporation Scott Brinker, College of American Pathologist

Top 10 reasons your ecommerce site will fail during peak periods

CHAPTER 1 - JAVA EE OVERVIEW FOR ADMINISTRATORS

Load/Stress Test Results Final Report

WebLogic Server System Administration Top Ten Fundamentals Concepts Session ID# 11579

Mobile Application Hacking for Android and iphone. 4-Day Hands-On Course. Syllabus

Practical Performance Understanding the Performance of Your Application

JBoss Cookbook: Secret Recipes. David Chia Senior TAM, JBoss May 5 th 2011

An Oracle White Paper September Advanced Java Diagnostics and Monitoring Without Performance Overhead

Using jvmstat and visualgc to Solve Memory Management Problems

All The Leaves Aren t Brown

Deployment Checklist. Liferay Portal 6.1 Enterprise Edition

Configuring IBM WebSphere Application Server 6.1 to Support SAS 9.2 Web Applications

JBoss AS Administration Console User Guide. by Shelly McGowan and Ian Springer

Oracle WebLogic Server 11g Administration

Tuning Your GlassFish Performance Tips. Deep Singh Enterprise Java Performance Team Sun Microsystems, Inc.

Course Description. Course Audience. Course Outline. Course Page - Page 1 of 5

AGENDA. Introduction About Weblogic Server Weblogic Server Administration Top Ten Concepts Q & A

enterprise professional expertise distilled

B M C S O F T W A R E, I N C. BASIC BEST PRACTICES. Ross Cochran Principal SW Consultant

Monitoring, Tracing, Debugging (Under Construction)

Performance Testing of Java Enterprise Systems

Mobile Performance Management Tools Prasanna Gawade, Infosys April 2014

How To Use Java On An Ipa (Jspa) With A Microsoft Powerbook (Jempa) With An Ipad And A Microos 2.5 (Microos)

Java Mission Control

Oracle Corporation Proprietary and Confidential

Bellwether metrics for diagnosing

Configuring IBM WebSphere Application Server 7.0 for Web Authentication with SAS 9.3 Web Applications

WAS Performance on i5/os. Lisa Wellman May 2010

Agile Performance Testing

Java Garbage Collection Basics

Oracle WebLogic Thread Pool Tuning

Performance Tuning for Oracle WebCenter Content 11g: Strategies & Tactics CHRIS ROTHWELL & PAUL HEUPEL FISHBOWL SOLUTIONS, INC.

3 Examples of Reliability Testing. Dan Downing, VP Testing Services MENTORA GROUP

<Insert Picture Here> Java Application Diagnostic Expert

Lab 4 In class Hands-on Android Debugging Tutorial

Monitoring applications in multitier environment. Uroš Majcen A New View on Application Management.

Oracle WebLogic Server Monitoring and Performance Tuning

How To Improve Performance On An Asa 9.4 Web Application Server (For Advanced Users)

MONITORING CF WHAT ARE MY OPTIONS AND WHY SHOULD I

Blackboard Learn TM, Release 9 Technology Architecture. John Fontaine

WSO2 Business Process Server Clustering Guide for 3.2.0

Determine the process of extracting monitoring information in Sun ONE Application Server

Tool - 1: Health Center

Java DB2 Developers Performance Best Practices

ActiveVOS Performance Tuning

IBM Support Assistant v5. Review and hands-on by Joseph

Oracle JRockit Mission Control Overview

Java VM monitoring and the Health Center API. William Smith

WebOTX Application Server

Performance Monitor. Intellicus Web-based Reporting Suite Version 4.5. Enterprise Professional Smart Developer Smart Viewer

Monitoring and Diagnosing Production Applications Using Oracle Application Diagnostics for Java. An Oracle White Paper December 2007

SAP HANA Cloud Applications Partner Program Certification

Simba XMLA Provider for Oracle OLAP 2.0. Linux Administration Guide. Simba Technologies Inc. April 23, 2013

PASS4TEST 専 門 IT 認 証 試 験 問 題 集 提 供 者

Tomcat Tuning. Mark Thomas April 2009

Moving beyond hardware

Debugging with TotalView

Further evolved with trusted and proven technologies

White Paper. Fabasoft Folio Environment Variables. Fabasoft Folio 2015 Update Rollup 2

.NET and J2EE Intro to Software Engineering

A Practical Method to Diagnose Memory Leaks in Java Application Alan Yu

OS Observability Tools

System Architecture V3.2. Last Update: August 2015

Transcription:

March 26, 2008 JPMorganChase presents Java Debugging and Troubleshooting with No Source Code in Sight By Minoy Mathew talent. technology. true business value

The proliferation of the black and the gray boxes Buy Build Reuse Assemble Vendor products (black box) Open source products (gray box) Reusable components (gray box) Dependencies with other systems (black box)

Topics Information Visualization Information Dumps Debugging without Source Correlating Information Knowledge Information Data ------

Thinking like the programmer who wrote it! Patterns Globalized Industry Common mistakes and best practices She would have had to make it work with another black box too Some rules are ubiquitous

What s in a name Major Major Major

Leaking Map

Tools: Visual VM

Heap Dump

Homing in on the leak

JMX: Introspection into the JVM -- JConsole

Named your fear must be before banish it you can - Master Yoda (Star Wars)

Trends

Information Visualization: Squiggly Lines Profession Neurologist - EEG

Squiggly Lines Profession Java Developer

Garbage When Apps Panic

Garbage Finding Patterns

Garbage Findings GC panic was recoverable Indicative of an expiring cache usage? Activity persisted even with no load A background thread or process? Cyclical nature to recovery (~ 1 hour) Indicative that cache and background thread are related? Root Cause What Really Happened: A culprit background thread refreshing lookup data into an UNBOUNDED cache that had a TIMED EXPIRATION of an hour.

Garbage Problem Solved

Garbage and Squiggly Lines Tools and Learnings Know your GC algorithms and their repercussions java -Xms600m -Xmx600m -server -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled - XX:PermSize=64m -XX:MaxPermSize=256m -XX:NewSize=96m References: http://java.sun.com/developer/technicalarticles/programming/gcportal/ http://www.tagtraum.com/gcviewer.html Increase your GC verbosity! Force the GCs and look for patterns Load Testing http://jakarta.apache.org/jmeter/ http://grinder.sourceforge.net/ http://www.mercury.com/us/products/performance-center/loadrunner/

Association, correlation and causal analysis

Java Process and Thread

Correlating it to DB info

Correlating it to DB info

Correlating it to DB info

More profiling

Always in motion is the future Master Yoda (Star Wars)

DEADLOCK!

Thread dump: kill -3

Java Thread Dumps Stuck in a Service Call "Portlet Runner Thread Pool Thread-1" daemon prio=5 tid=0x01263680 nid=0x109 runnable [96ffe000..96fffc28] at java.net.socketinputstream.socketread0(native Method) at java.net.socketinputstream.read(socketinputstream.java:129) at java.net.socketinputstream.read(socketinputstream.java:182) at java.io.filterinputstream.read(filterinputstream.java:66) at java.io.pushbackinputstream.read(pushbackinputstream.java:120) at org.apache.commons.httpclient.httpparser.readrawline(httpparser.java:109) at org.apache.commons.httpclient.httpparser.readline(httpparser.java:135) at org.apache.commons.httpclient.httpconnection.readline(httpconnection.java:1086) at org.apache.commons.httpclient.httpmethodbase.readstatusline(httpmethodbase.java:2188) at org.apache.commons.httpclient.httpmethodbase.readresponse(httpmethodbase.java:1949) at org.apache.commons.httpclient.httpmethodbase.processrequest(httpmethodbase.java:2659) at org.apache.commons.httpclient.httpmethodbase.execute(httpmethodbase.java:1093) at com.mycompany.utils.gzipawarepostmethod.execute(gzipawarepostmethod.java:81) at org.apache.commons.httpclient.httpclient.executemethod(httpclient.java:675) at org.apache.commons.httpclient.httpclient.executemethod(httpclient.java:529) Then use Netstat or some other tool to find where the connection is being made to

Java Thread Dumps Waiting is a Good Thing, But Beware of the Sleepers! "Entitlement Thread Pool Thread-2" daemon prio=1 tid=0x00b08a28 nid=0xed in Object.wait() [980ff000..980ffc28] at java.lang.object.wait(native Method) - waiting on <0xbc0236a0> (a com.mycompany.utils.threadpoolimpl$poolthread) at com.mycompany.utils.threadpoolimpl$poolthread.run(threadpoolimpl.java:122) - locked <0xbc0236a0> (a com.mycompany.utils.threadpoolimpl$poolthread) "Cache (LookupCache) Maintenance Thread" daemon prio=5 tid=0x0045e820 nid=0xa9 waiting on condition [986ff000..986ffc28] at java.lang.thread.sleep(native Method) at com.mycompany.cache.jbosscache$maintenancethread.run(jbosscache.java:120)

Java Thread Dumps Not dependable when JVM in GC Panic "ExecuteThread: '2' for queue: 'weblogic.admin.rmi'" daemon prio=5 tid=0x002003e8 nid=0x49 runnable [9db7d000..9db7fc28] at java.net.socketoutputstream.socketwrite0(native Method) at java.net.socketoutputstream.socketwrite(socketoutputstream.java:92) at java.net.socketoutputstream.write(socketoutputstream.java:136) at com.sybase.jdbc2.tds.pduoutputformatter.doflush(pduoutputformatter.java:212) at com.sybase.jdbc2.tds.pduoutputformatter.flush(pduoutputformatter.java:155) at java.io.filteroutputstream.flush(filteroutputstream.java:123) at com.sybase.jdbc2.tds.tds.language(tds.java:698) at com.sybase.jdbc2.jdbc.sybstatement.sendquery(sybstatement.java:1451) at com.sybase.jdbc2.jdbc.sybpreparedstatement.sendquery(sybpreparedstatement.java:1158) at com.sybase.jdbc2.jdbc.sybstatement.executeupdate(sybstatement.java:1621) at com.sybase.jdbc2.jdbc.sybpreparedstatement.executeupdate(sybpreparedstatement.java:91)

Remote Debugging Inspection of all Variables Possible

Remote Debugging Don t Need Source to Set a Breakpoint

Remote Debugging Tools and Learnings Need to enable remote debugging at the command line: java -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7010 Most modern IDEs have remote debugging capabilities built in: http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.jdt.doc.user/concepts/cremdbug.htm http://www.jetbrains.com/idea/docs/help/project/rundebugremote.html http://wiki.netbeans.info/wiki/view/faqdebuggingremote Fairly safe to use in disparate environments WHEN NEEDED! Targetted use of breakpoints can home in on race condition and deadlock errors.

Fallacies: Post hoc ergo propter hoc -- Correlation is not causation Judge me by my size, do you? Master Yoda (Star Wars)

Lots of Stuff Not Covered Java Scripting - BeanShell, Java 6 scripting Open the JVM so that you can connect to it and inspect anything! OS level tracing: prstat, pstack, pmap, truss, netstat Log Scraping Decompilation JAD injection of decompiled classes into an app http://www.kpdus.com/jad.html Proxies Monitor the communication to and from an app http://ws.apache.org/commons/tcpmon/