Bill Au CBS Interactive Troubleshooting Slow or Hung Java Applications.

Slides:



Advertisements
Similar presentations
Java Virtual Machine Profiling
Advertisements

Overview Motivation Scala on LLVM Challenges Interesting Subsets.
… an introduction Peter Varsanyi Garbage collector Confidential.
PIA Load Balancing, JVMs and Garbage Collection David Kurtz Go-Faster Consultancy Ltd.
Memory Leak WEBLOGIC SERVER.  Overview of Java Heap  What is a Memory Leak  Symptoms of Memory Leaks  How to troubleshoot  Tools  Best Practices.
C O N F I D E N T I A L 17-May-15 1 Java Memory Management Overview Justin Chen Mar 16 rd, 2009.
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.
JVM-1 Introduction to Java Virtual Machine. JVM-2 Outline Java Language, Java Virtual Machine and Java Platform Organization of Java Virtual Machine Garbage.
MCITP Guide to Microsoft Windows Server 2008 Server Administration (Exam #70-646) Chapter 14 Server and Network Monitoring.
Toba Gregg M. Townsend Executable Code from Java Source.
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.
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.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
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.
Learningcomputer.com SQL Server 2008 – Profiling and Monitoring Tools.
Embedded Software SKKU 14 1 Sungkyunkwan University Tizen v2.3 Application Profiling & Debugging.
Debugging and Profiling With some help from Software Carpentry resources.
Performance Analysis & Code Profiling It’s 2:00AM -- do you know where your program counter is?
15.1 Threads and Multi- threading Understanding threads and multi-threading In general, modern computers perform one task at a time It is often.
Concurrency Control 1 Fall 2014 CS7020: Game Design and Development.
© 2006, National Research Council Canada © 2006, IBM Corporation Solving performance issues in OTS-based systems Erik Putrycz Software Engineering Group.
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:
Profile, HAT, Wireless Toolkit’s Profile Sookmyung Women’s Univ. PSLAB Choi yoonjeong.
#SummitNow Inspecting Alfresco – Tools and Techniques Nathan McMinn Technical Consultant - Alfresco.
What's New in Visual Studio 2010 Debugging Brian Peek Senior Consultant, ASPSOFT, Inc. Microsoft MVP - C#
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.
Tomcat Performance Tuning
GlassFish Performance Tuning: Tips from the Field
Multi Threading.
Lecture 21 Concurrency Introduction
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
JIT Compiler Design Maxine Virtual Machine Dhwani Pandya
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 –JDK demo and sample was part of JDK download for jdk6u31 or older, separate download for u32+ 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: –Timestamp and duration of GC events –Sizes before and after GC events –More options to explore: −-XX:+PrintGCDateStamps −-XX:+PrintGCDetails −-XX:+PrintTenuringDistribution −-XX:+PrintGCApplicationsStoppedTime –Some GC flags can be set dynamically by jinfo/JConsole/VisualVM: PrintGC, PrintGCDetails, PrintGCTimeStamps » visualgc – GUI for garbage collection monitoring 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

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 » samurai