Bill Au CBS Interactive Troubleshooting Slow or Hung Java Applications.

Slides:



Advertisements
Similar presentations
Advanced Troubleshooting with Debug Diagnostics on IIS 6
Advertisements

TPTP 4.4 New Java Profiler (JVMTI) Test and Performance Tools Platform (TPTP) TPTP 4.4 Thread Profiler Pause/Resume and Attach/Detach Design Asaf Yaffe.
Java Virtual Machine Profiling
Overview Motivation Scala on LLVM Challenges Interesting Subsets.
Memory Leak WEBLOGIC SERVER.  Overview of Java Heap  What is a Memory Leak  Symptoms of Memory Leaks  How to troubleshoot  Tools  Best Practices.
THE ART AND METHODOLOGY OF TROUBLESHOOTING Alexey Diomin,
UPortal Performance Optimization Faizan Ahmed Architect and Engineering Group Enterprise Systems & Services RUTGERS
Chapter 14 Chapter 14: Server Monitoring and Optimization.
MCDST : Supporting Users and Troubleshooting a Microsoft Windows XP Operating System Chapter 10: Collect and Analyze Performance Data.
JVM-1 Introduction to Java Virtual Machine. JVM-2 Outline Java Language, Java Virtual Machine and Java Platform Organization of Java Virtual Machine Garbage.
V0.01 © 2009 Research In Motion Limited Introduction to Java Application Development for the BlackBerry Smartphone Trainer name Date.
MCITP Guide to Microsoft Windows Server 2008 Server Administration (Exam #70-646) Chapter 14 Server and Network Monitoring.
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.
Windows Server 2008 Chapter 11 Last Update
Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character.
Microsoft ® Official Course Monitoring and Troubleshooting Custom SharePoint Solutions SharePoint Practice Microsoft SharePoint 2013.
Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character.
Memory Leak Overview and Tools. AGENDA  Overview of Java Heap  What is a Memory Leak  Symptoms of Memory Leaks  How to troubleshoot  Tools  Best.
2 Debugging Performance Issues, Memory Issues and Crashes in.net Applications Tess Ferrandez - Norlander Support Escalation Engineer Microsoft Session.
Troubleshooting From the Field – Part 2 SQL DIAG & SQL NEXUS By Ahmad Osama SQL Server Geeks - Editor In Chief and Regional Mentor(Delhi & NCR)
MCTS Guide to Microsoft Windows Vista Chapter 11 Performance Tuning.
Key Concepts About Performance Factors Affecting SQL Performance SQL Performance Tuning Methodologies SQL Performance Tuning Tools 1.
- Tausief Shaikh (Senior Server developer). Introduction Covers sense of responsibility towards Project development in IT Focusing on memory and CPU utilizations.
Bill Au CBS Interactive Troubleshooting Slow or Hung Java Applications.
Ideas to Improve SharePoint Usage 4. What are these 4 Ideas? 1. 7 Steps to check SharePoint Health 2. Avoid common Deployment Mistakes 3. Analyze SharePoint.
JA-SIG 12/4/20051 JMX For Monitoring and Maintenance JA-SIG - December 4, 2005 – Atlanta, GA Eric Dalquist Division of Information Technology University.
JBOSS Profiler Performance Profiling. Contents ● Motivation – The problem ● Profiling ● Profiling Tools ● Java and Profiling ● JBoss Profiler ● Example.
Monitoring and Management Mihail Stoynov mihail.stoynov.com mihail.stoynov.com.
Installing, Configuring And Troubleshooting Coldfusion Mark A Kruger CFG Ryan Stille CF Webtools.
Power your JVM with Effective Garbage Collection Tuning SiliconIndia Java Conference 29 th October, 2010 Vivekanand Jha.
Profile and optimize your Java code Gabriel Laden CS 146 – Dr. Sin-Min Lee Spring 2004.
Performance Analysis & Code Profiling It’s 2:00AM -- do you know where your program counter is?
CH 13 Server and Network Monitoring. Hands-On Microsoft Windows Server Objectives Understand the importance of server monitoring Monitor server.
© 2006, National Research Council Canada © 2006, IBM Corporation Solving performance issues in OTS-based systems Erik Putrycz Software Engineering Group.
Monitoring and Managing Server Performance. Server Monitoring To become familiar with the server’s performance – typical behavior Prevent problems before.
NetLogger Using NetLogger for Distributed Systems Performance Analysis of the BaBar Data Analysis System Data Intensive Distributed Computing Group Lawrence.
Msdevcon.ru#msdevcon. ИЗ ПЕРВЫХ РУК: ДИАГНОСТИКА ПРИЛОЖЕНИЙ С ПОМОЩЮ ИНСТРУМЕНТОВ VISUAL STUDIO 2012 MAXIM GOLDIN Senior Developer, Microsoft.
Java Monitoring Java monitoring using Glassfish, JMX, Glassbox and JConsole by Greg Heithaus.
Advanced Performance Forensics Uncovering the Mysteries of Performance and Scalability Incidents through Forensic Engineering Stephen Feldman Senior Director.
® July 21, 2004GC Summer School1 Cycles to Recycle: Copy GC Without Stopping the World The Sapphire Collector Richard L. Hudson J. Eliot B. Moss Originally.
 cfObjective(ANZ)– November 17-18, 2011  Mike Brunt – CFWhisperer.
J2SE 1.5 : Memory Heap and Garbage Collector. Objectives You will be able to understand the JVM Memory Heap You will be able to know what the Garbage.
2 Common ASP.NET production issues and how to troubleshoot them with WinDbg Tess Ferrandez - Norlander Support Escalation Engineer Microsoft Session Code:
Java Performance Analysis 301 Peter Johnson CMG 2006, December 7, Session 534, Paper 6033.
Profile, HAT, Wireless Toolkit’s Profile Sookmyung Women’s Univ. PSLAB Choi yoonjeong.
#SummitNow Inspecting Alfresco – Tools and Techniques Nathan McMinn Technical Consultant - Alfresco.
Msdevcon.ru#msdevcon. ИЗ ПЕРВЫХ РУК: КАК СДЕЛАТЬ ВАШ КОД БЫСТРЫМ ПРОФАЙЛИНГ КЛИЕНТСКИХ И СЕРВЕРНЫХ ПРИЛОЖЕНИЙ В VISUAL STUDIO 2012 MAXIM GOLDIN Senior.
Using Correlated Tracing to Diagnose Query Level Performance What’s slowing down my app? Jerome Halmans Senior Software Development Engineer Microsoft.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Weblogic Server Best Practices for Troubleshooting Performance Issues –
Developing annotation based monitoring framework Fedor Romanov, TomTom.
Java performance for Jazz
GlassFish Performance Tuning: Tips from the Field
Multi Threading.
Solving Performance Bottlenecks for Spark Developers
Runtime Analysis of Hotspot Java Virtual Machine
NVIDIA Profiler’s Guide
Java Virtual Machine Complete subject details are available at:
Flight Recorder in OpenJDK
Mark Claypool and Jonathan Tanner Computer Science Department
PerfView Measure and Improve Your App’s Performance for Free
ColdFusion Performance Troubleshooting and Tuning
Tools.
Tools.
Jean Joseph DBA\DEVELOPER
java architect lead performance engineer FIS Global @EOstermueller
New GC collectors in Java 11
Java Virtual Machine Profiling. Agenda Introduction JVM overview Performance concepts Monitoring Profiling VisualVM demo Tuning Conclusions.
Presentation transcript:

Bill Au CBS Interactive Troubleshooting Slow or Hung Java Applications

2 Agenda » Tools of the Trade » Case Studies 2

3 Tools – Out Of The Box » jinfo, jmap, jstack, jstat » JConsole, VisualVM –Monitor CPU usage by using JTop plug-in ($JAVA_HOME/demo/management/JTop) » java.lang.management –Platform MXBeans: runtime, operating system, class loading, compilation, garbage collection, memory, thread –Sample code in $JAVA_HOME/demo/management 3

4 Tools – java.lang.management » Sample code: import java.lang.management.*; ThreadMXBean tb=ManagementFactory.getThreadMXBean(); if (tb.isThreadCpuTimeSupported()) { long[] tids=tb.getAllThreadIds(); for (long tid : tids) { System.out.println(“cputime:”+tb.getThreadCpuTime(tid)); System.out.println(“usertime:”+tb.getThreadUserTime(tid)); } 4

5 Tools » Garbage collection log –-Xloggc: –Sizes before and after GC events –Timestamp and duration of GC events –More options to explore: −-XX:+PrintGCDateStamps −-XX:+PrintGCDetails −-XX:+PrintTenuringDistribution − -XX:+PrintGCApplicationsStoppedTime 5

6 Tools » Thread dump –kill -3 (or kill –SIGHUP) –JConsole, VisualVM –ThreadMXBean –jstack (-F) » Consecutive thread dumps –Stop motion animation 6

7 Hung or Slow App » Long GC pauses and/or high GC overhead –Basic GC tuning −max heap size: -Xmx −type of collector used −-XX:+UserSerialGC −-XX:+UseParallelGC/-XX:+UseParallelOldGC −-XX:+UseConcMarkSweepGC −-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC (jdk6u14+) –Advanced GC tuning −young generation size: -Xmn –Baseline, tune, measure one change at a time » Demo: HPjmeter – garbage collection analysis (and more…) 7

8 Hung or Slow App » Deadlock –Take thread dump to run the JVM’s deadlock detector » Looping Threads –Monitor CPU times of running threads −ThreadMXBean −JTop plug-in for JConsole/VisualVM –Inspect stack trace of suspicious threads 8 Source: TBD

9 Slow or Hung App » Blocked threads –Look for blocked threads waiting on the same condition –Identify bottleneck for resource contention –Inspect code for incautious and/or improper synchronization » Demo: samurai – thread dump analysis tool » Stuck threads –Look for runnable threads with the same stack trace across consecutive thread dumps –Some common causes: −Blocking for a network call without specifying connect and/or read timeout (default may be no timeout) −Long execution time for calls to backend servers 9

10 Links » Presentation » HPjmeter ProductInfo.do?productNumber=HPJMETER ProductInfo.do?productNumber=HPJMETER » samurai