SlideShare una empresa de Scribd logo
1 de 26
Descargar para leer sin conexión
THE BUSY JAVA DEVELOPER'S GUIDE TO
    WEBSPHERE DEBUGGING &
    TROUBLESHOOTING


                        ROHIT KELAPURE
                        IBM ADVISORY SOFTWARE ENGINEER
                        HTTP://WWW.LINKEDIN.COM/IN/ROHITKELAPURE
                        HTTP://TWITTER.COM/RKELA
                        HTTP://WASDYNACACHE.BLOGSPOT.COM/

May 1, 2010   IBM WebSphere Application Server
Agenda
2

       WebSphere Application Server component overview
       IBM Support Assistant
       JVM Troubleshooting Tools
       WebSphere Problem Determination Tools
       Scenario based problem resolution
       How customers get in trouble
       BadApp Demo
       Q&A
WAS Component Overview
3
IBM Support Assistant
    Workbench to help with Problem Determination
4
ISA V 4.1.1 Data Collection
    Remote Collection using ISA lite
5                     2


                                           1


            3




                                       4
ISA Tools
    Single Repository, up-to-date, scripts with IGAA
6
Tools for information generated by JVM
Problem
 7                         Artifact                         Tools
Memory leaks               Verbose Garbage collection       • Garbage Collection &
Out of Memory errors       log (native_stdout.log)          Memory Visualizer
Application Unresponsive                                    • Pattern Modeling & Analysis
                                                            tool
High CPU, Crash, Hang,     Javadump, Javacore               • Thread Monitor & Dump
Performance bottleneck,    (javacore*.txt)                  Analyzer (TMDA)
Unexpected termination

Lock Contention            Threads (Connection to running   • Monitoring & Diagnostic Tools
Low CPU at high load       JVM)                             for Java – Health Center

Memory Leak                Heapdump (*.phd, *.txt,          • Memory Analyzer Tool
Out of Memory errors       *.hprof)                         • HeapAnalyzer
                                                            • MDD4J
Native Memory Leak         System or core dump              • Dump Analyzer
Anomalies                  (core.dmp, user.dmp), Files must      • Modules for Dump
Unexpected Crash           be processed with jextract tool       Analyzer
WAS Runtime Serviceability aids
8
   Troubleshooting panels in the admin console
   Performance Monitoring Infrastructure metrics
       Tivoli Performance Viewer Monitoring
   Diagnostic Provider Mbeans
       Dump Configuration, State and run self-test
   Application Response Measurement/Request Metrics
       Follow transaction end-to-end and find bottlenecks
   Trace logs & First Failure Data Capture
   Runtime Performance Advisors
       Memory leak detection, session size, …
   Specialized tracing and Runtime checks
       Session crossover, Connection leak, WsByteBuffer leak detection …
   zOS runaway CPU thread protection
   Diagnostic Toolkit & Framework for Java
       API for accessing information in a system dump in an OS agnostic way
WebSphere Troubleshooting
Problem                                  Tools, Runtime capabilities
 9
Thread correlation, Trace log analysis   WAS Trace Analyzer
Delays in system response                WAS & Plugin Trace & Request Analyzer
Connection Leaks                         • Database Connection Pool Analyzer
                                         • Connection Leak Trace facility
                                              • Enabled using trace string WAS.j2c=finest
Server hang                              Thread Monitor - Hung Thread Detection Policy
                                         • Every 3 minutes detects threads active for > 10 min
Classloader issues                       Classloader viewer in the WAS Admin console
Corrupt Install                          Install Verification Utility (installver, ivt.bat/sh)
Runtime network status                   Port Scanning tool
Comparing & Validating                   • Visual Configuration Explorer
Configuration files                      • WebServices validation tool for WSDL & SOAP
HTTP Plugin & Proxy (No response,        • WebServer Plugin Analyzer
Incorrect load balancing)                • Dump ODC tree script
Issues with Security                     LDAP Server test connection, SSL Certificate & Key
                                         Management, Security Configuration Report
One more tool and I am
going to scream
WebSphere Monitoring tools
11

        Sun origin JVM Tools - visualVM & jConsole,
        SIBus – Explorer & Destination Handler
        Dynacache - Cache Monitor & Extended Cache Monitor
        HTTPSession - Session tracker debug Servlet*
        WebServices Request/Response tracking
            TCPMonitor & Fiddler
        dumpNameSpace tool
        osgiConsole.sh/bat
        Coregroup Visualization and analysis tool*
        Sun JVM ONLY Tools- jps, jstatd, jstack, jmap, jinfo, jhat
        LDAP tools- ldapsearch, apache LDAP browser
        JVM Diagnostics Collector
Most common JVM Problem Scenarios
12

          Functional Problems
          • Unexpected Exceptions, Compatibility

          OOM Errors
          • Java Heap ,Native Heap Classloaders

          Hangs
          • Synchronized resources, GC Pause times

          Crash
          • JVM errors, JIT errors, JNI errors

          High CPU
          • Spin loops
Have you ever pondered …
13

        Why does my app. run slow every time I do <…> ?
        Why does my app. have erratic response times ?
        Why am I getting Out of Memory Errors ?
        What is my applications memory footprint ?
        Which parts of my app. are CPU intensive ?
        How did my JVM vanish without a trace ?
        Why is my application unresponsive ?
        $%@ is wrong with my application ?
        What monitoring do I put in place for my app. ?
Why does my app run slow when I do xxx ?
14

    Understand impact of activity on WAS components
        Look at the thread & method profiles in the IBM Java Health Center
    Set IBM JVM method & dump trace - pinpoint performance
     problems.
        Shows entry & exit times of any Java method
            Method to trace to file for all methods in tests.mytest.package
                  -Xtrace:maximal=mt,output=trace.out,methods={tests/mytest/*.*}
        Allows taking javadump, heapdump, etc when a method is hit
            Dump javacore when method testInnerMethod in an inner class
             TestInnerClass of a class TestClass is called
                  -Xtrace:trigger=method{com/ibm/TestClass$TestInnerClass.testInnerMethod,javadump,,,5}

        -Xtrace and -Xdump can be triggered on a huge range of events …
         with filters and ranges
          gpf, user, abort, fullgc, slow, allocation, thrstop, throw …
          Stack traces, tool launching
Why does my application have erratic
         response times ?
15

    Verbose gc should be enabled by default
      (<2%)         impact on performance
    GCMV &PMAT : Visualize gc output & look @ recos.
      In   use space after GC
          Positive    gradient indicates memory leak
                  Increased load (use for capacity plan) OR memory leak (take HDs for PD.)
    Chose the right GC policy
        -Xgcpolicy:optthruput - optimized for “batch” type applications, consistent allocation profile
        -Xgcpolicy:optavgpause - tight responsiveness criteria, allocations of large objects
        -Xgcpolicy:gencon - high rates of object “burn”, large # of transitional objects
        -Xgcpolicy:subpools - 12, 16 core SMP systems with allocation contention (AIX only)
    GC overhead > 10% wrong policy or more tuning
    Enable compressed References enabled for 64 bit JVM ?
Why am I getting Out Of Memory
     Errors ?
16
    Java 1.4.* -look for heap fragmentation (rare for Java 5/6)
        Set –Xp and –Xk for pinned and dosed objects
    JVM Heap sized incorrectly
        IBM JDK Team does NOT recommend Xms == Xmx
        GC adapts heap size to keep occupancy [40, 70]%
    Determine heap occupancy of the app. under load
        Xmx = 43% larger than max. occupancy of app.
            For 700MB occupancy , 1000MB Max. heap is reqd. (700 +43% of 700)
    Analyze heapdumps & system dumps with dump tools
        Lack of Java heap or Native heap
    Finding which methods allocated large objects
        Prints stacktrace for all objects above 1K
            -Xdump:stack:events=allocation,filter=#1k
    Enable Java Heap and Native heap monitoring
        JMX and PMI metrics output by WAS JVM
    Classloader exhaustion in pre Java 5 SR3
What is my applications memory
       footprint ?
17

    HPROF – profiler shipped with JDK – uses JVMTI
      Analysis      of memory usage -Xrunhprof:heap=all
    Performance Inspector tools - JPROF Java Profiling Agent
      Capture        state of the Java Heap later processed by HDUMP
    Use MAT to investigate heapdumps & system dumps
      Find large clumps, Inspect those objects,                       What retains them ?
        Why is this object not being garbage collected
                List Objects > incoming refs, Path to GC roots, Immediate dominators
          Limit analysis to a single application in a JEE environment
                Dominator tree grouped by Class Loader
          Set of objects that can be reclaimed if we could delete X
                Retained Size Graphs
          Traditional memory hogs like Session, Dynacache
                Use Object Query Language (OQL)
Which parts of my application are
         CPU intensive ?
18

    HPROF - CPU spends most of its time
        -Xrunhrof:cpu=samples, -Xrunhprof:cpu=time
    JPROF – method level execution times, who calls whom, etc.
      Generate        WAS startup script & set the JVM argument
        "-agentlib:jprof=rtarcf,callflow,logpath=./jprof" "-Xjit:disableInlining“
        Output visualized using VPA
    Poor mans profiler
     -  Periodic javacores
      -Thread analysis - TMDA

    IBM – Health Center
      Low overhead
      Gets data from JIT
How did my JVM vanish without trace ?
19

    JVM Process Crash Usual Suspects
        Bad JNI calls, Segmentation violations, Call Stack Overflow
        Native memory leaks - Object allocation fails with sufficient space in the JVM heap
        Unexpected OS exceptions (out of disk space, file handles), JIT failures

    Monitor the OS process size
    Runtime check of JVM memory allocations -Xcheck:memory
    Native memory usage - Create a core or svc dump on an OOM
        -Xdump:system:events=systhrow,filter=java/lang/OutOfMemoryError
    JNI code static analysis -Xcheck:jni (errors, warnings, advice)
    GCMV provides scripts and graphing for native memory
        Windows “perfmon“, Linux “ps” & AIX “svmon”
    IBM Dump Analyzer & TMDA to find the last stack of native code
     executing on the thread during the crash
Why is my application unresponsive ?
20

    Usual Suspects (25-50% overhead of an app.)
        Thread Contention & sync. issues Deadlocks and Spin loops
    Take three javadumps spaced 1 minute apart
        Native stacks in javadumps in Java 6, SR7
    Monitor hold time accounting & Contention statistics
        Java Lock Monitor, IBM Health Center (always on profiling)
    Monitor hung thread messages
        WSVR0605W (Thread hung), WSVR0606W (Thread completed), WSVR0607W (threshold adjusted)
        Cause javacore on thread hang - Set“com.ibm.websphere.threadmonitor.dump” custom property to “true”
        Spawning new threads is an anti-pattern since these threads are outside the hang detection monitoring

    Is traffic flowing into the application server from the Plugin or the Proxy ?
        Increasing OS level TCP/IP connection backlog at the webserver/proxy
    IBM Health Center starts up on port 1972 for WAS and needs a generic
     JVM argument “-agentlib:healthcenter”
        Overhead < 3%
What is wrong with my application ?
     General problem determination steps
21

           Finding the Bottleneck
               CPU, Memory, I/O, Network
               Systems Resource Usage
                   top, perfmon, svmon, tasklist, ps, <add your favorite utility here …>

           JVM Heap Sizing
               Setting Correct GC Policy, Heap occupancy
               JIT Compilation & Performance

           Application Profiling
               Inbuilt hprof, Health Center
               Free - Performance Inspector tools (JPROF, TPROF, JLM, Jinsight …)
               Commercial- RAD, Jprofiler, Yourkit …

           OS specific tuning
               Setting TCP TIME_WAIT
What do I monitor ?
22




                       OS         Metrics




                            PMI
11 Malpractices
23               no arch.
                   plan
              No migration
                 plan

           No change records

            No Capacity plan

       No Production traffic profile

      Changes put directly in Prod.

         No load & Stress testing

       Communication breakdown

              No education

            Application Error

      Test environment != Production
Demo, Q&A
24
I would like to thank …
     Please google & read their blogs & articles
25

        Daniel Julin (IBM Lab)
        John Pape (SWAT)
        Kevin Grigorenko (SWAT)
        Art Jolin (ISSW)
        Chris Bailey (JDK)
        Katie Barett (Serviceability
         team)

        Russell Wright (ISA)
        Thomas Alcott (Tech. Sales)
26

Más contenido relacionado

La actualidad más candente

Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java WorkshopSimon Ritter
 
Introduction to the IBM Java Tools
Introduction to the IBM Java ToolsIntroduction to the IBM Java Tools
Introduction to the IBM Java ToolsChris Bailey
 
Jvm performance tuning
Jvm performance tuningJvm performance tuning
Jvm performance tuningIgor Igoroshka
 
Practical Performance: Understand and improve the performance of your applica...
Practical Performance: Understand and improve the performance of your applica...Practical Performance: Understand and improve the performance of your applica...
Practical Performance: Understand and improve the performance of your applica...Chris Bailey
 
Tools and Tips to Diagnose Performance Issues
Tools and Tips to Diagnose Performance IssuesTools and Tips to Diagnose Performance Issues
Tools and Tips to Diagnose Performance IssuesClaudio Miranda
 
"Java memory model for practitioners" at JavaLand 2017 by Vadym Kazulkin/Rodi...
"Java memory model for practitioners" at JavaLand 2017 by Vadym Kazulkin/Rodi..."Java memory model for practitioners" at JavaLand 2017 by Vadym Kazulkin/Rodi...
"Java memory model for practitioners" at JavaLand 2017 by Vadym Kazulkin/Rodi...Vadym Kazulkin
 
Garbage First and you
Garbage First and youGarbage First and you
Garbage First and youKai Koenig
 
JDK not so hidden treasures
JDK not so hidden treasuresJDK not so hidden treasures
JDK not so hidden treasuresAndrzej Grzesik
 
Get Rid Of OutOfMemoryError messages
Get Rid Of OutOfMemoryError messagesGet Rid Of OutOfMemoryError messages
Get Rid Of OutOfMemoryError messagesPoonam Bajaj Parhar
 
JavaOne 2014: Java Debugging
JavaOne 2014: Java DebuggingJavaOne 2014: Java Debugging
JavaOne 2014: Java DebuggingChris Bailey
 
JavaPerformanceChapter_5
JavaPerformanceChapter_5JavaPerformanceChapter_5
JavaPerformanceChapter_5Saurav Basu
 
Performance Test Driven Development with Oracle Coherence
Performance Test Driven Development with Oracle CoherencePerformance Test Driven Development with Oracle Coherence
Performance Test Driven Development with Oracle Coherencearagozin
 
Machine Learning With H2O vs SparkML
Machine Learning With H2O vs SparkMLMachine Learning With H2O vs SparkML
Machine Learning With H2O vs SparkMLArnab Biswas
 
Impact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java ToolsImpact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java ToolsChris Bailey
 
DevNexus 2019: Migrating to Java 11
DevNexus 2019: Migrating to Java 11DevNexus 2019: Migrating to Java 11
DevNexus 2019: Migrating to Java 11DaliaAboSheasha
 

La actualidad más candente (20)

Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java Workshop
 
Introduction to the IBM Java Tools
Introduction to the IBM Java ToolsIntroduction to the IBM Java Tools
Introduction to the IBM Java Tools
 
Troubleshooting Tools In JDK
Troubleshooting Tools In JDKTroubleshooting Tools In JDK
Troubleshooting Tools In JDK
 
Java On Speed
Java On SpeedJava On Speed
Java On Speed
 
Jvm performance tuning
Jvm performance tuningJvm performance tuning
Jvm performance tuning
 
Practical Performance: Understand and improve the performance of your applica...
Practical Performance: Understand and improve the performance of your applica...Practical Performance: Understand and improve the performance of your applica...
Practical Performance: Understand and improve the performance of your applica...
 
HotSpotコトハジメ
HotSpotコトハジメHotSpotコトハジメ
HotSpotコトハジメ
 
Tools and Tips to Diagnose Performance Issues
Tools and Tips to Diagnose Performance IssuesTools and Tips to Diagnose Performance Issues
Tools and Tips to Diagnose Performance Issues
 
"Java memory model for practitioners" at JavaLand 2017 by Vadym Kazulkin/Rodi...
"Java memory model for practitioners" at JavaLand 2017 by Vadym Kazulkin/Rodi..."Java memory model for practitioners" at JavaLand 2017 by Vadym Kazulkin/Rodi...
"Java memory model for practitioners" at JavaLand 2017 by Vadym Kazulkin/Rodi...
 
Garbage First and you
Garbage First and youGarbage First and you
Garbage First and you
 
JDK not so hidden treasures
JDK not so hidden treasuresJDK not so hidden treasures
JDK not so hidden treasures
 
Get Rid Of OutOfMemoryError messages
Get Rid Of OutOfMemoryError messagesGet Rid Of OutOfMemoryError messages
Get Rid Of OutOfMemoryError messages
 
Automation qtp classes in mumbai
Automation qtp classes in mumbaiAutomation qtp classes in mumbai
Automation qtp classes in mumbai
 
JavaOne 2014: Java Debugging
JavaOne 2014: Java DebuggingJavaOne 2014: Java Debugging
JavaOne 2014: Java Debugging
 
DIY Java Profiling
DIY Java ProfilingDIY Java Profiling
DIY Java Profiling
 
JavaPerformanceChapter_5
JavaPerformanceChapter_5JavaPerformanceChapter_5
JavaPerformanceChapter_5
 
Performance Test Driven Development with Oracle Coherence
Performance Test Driven Development with Oracle CoherencePerformance Test Driven Development with Oracle Coherence
Performance Test Driven Development with Oracle Coherence
 
Machine Learning With H2O vs SparkML
Machine Learning With H2O vs SparkMLMachine Learning With H2O vs SparkML
Machine Learning With H2O vs SparkML
 
Impact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java ToolsImpact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java Tools
 
DevNexus 2019: Migrating to Java 11
DevNexus 2019: Migrating to Java 11DevNexus 2019: Migrating to Java 11
DevNexus 2019: Migrating to Java 11
 

Destacado

Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparisonRohit Kelapure
 
Scalable, Available and Reliable Cloud Applications with PaaS and Microservices
Scalable, Available and Reliable Cloud Applications with PaaS and MicroservicesScalable, Available and Reliable Cloud Applications with PaaS and Microservices
Scalable, Available and Reliable Cloud Applications with PaaS and MicroservicesDavid Currie
 
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-final2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-finalRohit Kelapure
 
Taking the Application Server to Web Scale with Netflix Open Source Software
Taking the Application Server to Web Scale with Netflix Open Source SoftwareTaking the Application Server to Web Scale with Netflix Open Source Software
Taking the Application Server to Web Scale with Netflix Open Source SoftwareDavid Currie
 
Web sphere application server performance tuning workshop
Web sphere application server performance tuning workshopWeb sphere application server performance tuning workshop
Web sphere application server performance tuning workshopRohit Kelapure
 
Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparisonRohit Kelapure
 
Concierge: Bringing OSGi (Back) to Embedded Devices
Concierge: Bringing OSGi (Back) to Embedded DevicesConcierge: Bringing OSGi (Back) to Embedded Devices
Concierge: Bringing OSGi (Back) to Embedded DevicesJan S. Rellermeyer
 
A Deep Dive into the Liberty Buildpack on IBM BlueMix
A Deep Dive into the Liberty Buildpack on IBM BlueMix A Deep Dive into the Liberty Buildpack on IBM BlueMix
A Deep Dive into the Liberty Buildpack on IBM BlueMix Rohit Kelapure
 
Windows Debugging Tools - JavaOne 2013
Windows Debugging Tools - JavaOne 2013Windows Debugging Tools - JavaOne 2013
Windows Debugging Tools - JavaOne 2013MattKilner
 
Debugging Native heap OOM - JavaOne 2013
Debugging Native heap OOM - JavaOne 2013Debugging Native heap OOM - JavaOne 2013
Debugging Native heap OOM - JavaOne 2013MattKilner
 
Node Summit 2016: Web App Architectures
Node Summit 2016:  Web App ArchitecturesNode Summit 2016:  Web App Architectures
Node Summit 2016: Web App ArchitecturesChris Bailey
 
Liberty Buildpack: Designed for Extension - Integrating your services in Blue...
Liberty Buildpack: Designed for Extension - Integrating your services in Blue...Liberty Buildpack: Designed for Extension - Integrating your services in Blue...
Liberty Buildpack: Designed for Extension - Integrating your services in Blue...Rohit Kelapure
 
WebSphere Technical University: Top WebSphere Problem Determination Features
WebSphere Technical University: Top WebSphere Problem Determination FeaturesWebSphere Technical University: Top WebSphere Problem Determination Features
WebSphere Technical University: Top WebSphere Problem Determination FeaturesChris Bailey
 
Migrate Heroku & OpenShift Applications to IBM BlueMix
Migrate Heroku & OpenShift Applications to IBM BlueMixMigrate Heroku & OpenShift Applications to IBM BlueMix
Migrate Heroku & OpenShift Applications to IBM BlueMixRohit Kelapure
 
Liberty dynacache ffw_iea_ste
Liberty dynacache ffw_iea_steLiberty dynacache ffw_iea_ste
Liberty dynacache ffw_iea_steRohit Kelapure
 
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...timfanelli
 
O'Reilly Software Architecture Conf: Cloud Economics
O'Reilly Software Architecture Conf: Cloud EconomicsO'Reilly Software Architecture Conf: Cloud Economics
O'Reilly Software Architecture Conf: Cloud EconomicsChris Bailey
 

Destacado (20)

Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparison
 
Scalable, Available and Reliable Cloud Applications with PaaS and Microservices
Scalable, Available and Reliable Cloud Applications with PaaS and MicroservicesScalable, Available and Reliable Cloud Applications with PaaS and Microservices
Scalable, Available and Reliable Cloud Applications with PaaS and Microservices
 
D Y N A C A C H E Wxs
D Y N A C A C H E WxsD Y N A C A C H E Wxs
D Y N A C A C H E Wxs
 
D Y N A C A C H E Wxs
D Y N A C A C H E WxsD Y N A C A C H E Wxs
D Y N A C A C H E Wxs
 
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-final2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
 
Taking the Application Server to Web Scale with Netflix Open Source Software
Taking the Application Server to Web Scale with Netflix Open Source SoftwareTaking the Application Server to Web Scale with Netflix Open Source Software
Taking the Application Server to Web Scale with Netflix Open Source Software
 
1812 icap-v1.3 0430
1812 icap-v1.3 04301812 icap-v1.3 0430
1812 icap-v1.3 0430
 
Web sphere application server performance tuning workshop
Web sphere application server performance tuning workshopWeb sphere application server performance tuning workshop
Web sphere application server performance tuning workshop
 
Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparison
 
Concierge: Bringing OSGi (Back) to Embedded Devices
Concierge: Bringing OSGi (Back) to Embedded DevicesConcierge: Bringing OSGi (Back) to Embedded Devices
Concierge: Bringing OSGi (Back) to Embedded Devices
 
A Deep Dive into the Liberty Buildpack on IBM BlueMix
A Deep Dive into the Liberty Buildpack on IBM BlueMix A Deep Dive into the Liberty Buildpack on IBM BlueMix
A Deep Dive into the Liberty Buildpack on IBM BlueMix
 
Windows Debugging Tools - JavaOne 2013
Windows Debugging Tools - JavaOne 2013Windows Debugging Tools - JavaOne 2013
Windows Debugging Tools - JavaOne 2013
 
Debugging Native heap OOM - JavaOne 2013
Debugging Native heap OOM - JavaOne 2013Debugging Native heap OOM - JavaOne 2013
Debugging Native heap OOM - JavaOne 2013
 
Node Summit 2016: Web App Architectures
Node Summit 2016:  Web App ArchitecturesNode Summit 2016:  Web App Architectures
Node Summit 2016: Web App Architectures
 
Liberty Buildpack: Designed for Extension - Integrating your services in Blue...
Liberty Buildpack: Designed for Extension - Integrating your services in Blue...Liberty Buildpack: Designed for Extension - Integrating your services in Blue...
Liberty Buildpack: Designed for Extension - Integrating your services in Blue...
 
WebSphere Technical University: Top WebSphere Problem Determination Features
WebSphere Technical University: Top WebSphere Problem Determination FeaturesWebSphere Technical University: Top WebSphere Problem Determination Features
WebSphere Technical University: Top WebSphere Problem Determination Features
 
Migrate Heroku & OpenShift Applications to IBM BlueMix
Migrate Heroku & OpenShift Applications to IBM BlueMixMigrate Heroku & OpenShift Applications to IBM BlueMix
Migrate Heroku & OpenShift Applications to IBM BlueMix
 
Liberty dynacache ffw_iea_ste
Liberty dynacache ffw_iea_steLiberty dynacache ffw_iea_ste
Liberty dynacache ffw_iea_ste
 
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
 
O'Reilly Software Architecture Conf: Cloud Economics
O'Reilly Software Architecture Conf: Cloud EconomicsO'Reilly Software Architecture Conf: Cloud Economics
O'Reilly Software Architecture Conf: Cloud Economics
 

Similar a Web Sphere Problem Determination Ext

Know More About Rational Performance - Snehamoy K
Know More About Rational Performance - Snehamoy KKnow More About Rational Performance - Snehamoy K
Know More About Rational Performance - Snehamoy KRoopa Nadkarni
 
3 know more_about_rational_performance_tester_8-1-snehamoy_k
3 know more_about_rational_performance_tester_8-1-snehamoy_k3 know more_about_rational_performance_tester_8-1-snehamoy_k
3 know more_about_rational_performance_tester_8-1-snehamoy_kIBM
 
JBoss Enterprise Application Platform 6 Troubleshooting
JBoss Enterprise Application Platform 6 TroubleshootingJBoss Enterprise Application Platform 6 Troubleshooting
JBoss Enterprise Application Platform 6 TroubleshootingAlexandre Cavalcanti
 
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
Performance Tuning -  Memory leaks, Thread deadlocks, JDK toolsPerformance Tuning -  Memory leaks, Thread deadlocks, JDK tools
Performance Tuning - Memory leaks, Thread deadlocks, JDK toolsHaribabu Nandyal Padmanaban
 
Java Performance and Profiling
Java Performance and ProfilingJava Performance and Profiling
Java Performance and ProfilingWSO2
 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderIsuru Perera
 
Planning For High Performance Web Application
Planning For High Performance Web ApplicationPlanning For High Performance Web Application
Planning For High Performance Web ApplicationYue Tian
 
Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)Ryan Cuprak
 
Performance Analysis of Idle Programs
Performance Analysis of Idle ProgramsPerformance Analysis of Idle Programs
Performance Analysis of Idle Programsgreenwop
 
JDK Tools For Performance Diagnostics
JDK Tools For Performance DiagnosticsJDK Tools For Performance Diagnostics
JDK Tools For Performance DiagnosticsBaruch Sadogursky
 
TechGIG_Memory leaks in_java_webnair_26th_july_2012
TechGIG_Memory leaks in_java_webnair_26th_july_2012TechGIG_Memory leaks in_java_webnair_26th_july_2012
TechGIG_Memory leaks in_java_webnair_26th_july_2012Ashish Bhasin
 
Oracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuningOracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuningMichel Schildmeijer
 
Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profilerIhor Bobak
 
Application Profiling for Memory and Performance
Application Profiling for Memory and PerformanceApplication Profiling for Memory and Performance
Application Profiling for Memory and Performancepradeepfn
 
Audit your reactive applications
Audit your reactive applicationsAudit your reactive applications
Audit your reactive applicationsOCTO Technology
 
Monitoring and Troubleshooting Tools in Java 9
Monitoring and Troubleshooting Tools in Java 9Monitoring and Troubleshooting Tools in Java 9
Monitoring and Troubleshooting Tools in Java 9Poonam Bajaj Parhar
 
OTM Performance Review and Benchmarking
OTM Performance Review and BenchmarkingOTM Performance Review and Benchmarking
OTM Performance Review and BenchmarkingMavenWire
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.jsorkaplan
 
Java programing considering performance
Java programing considering performanceJava programing considering performance
Java programing considering performanceRoger Xia
 

Similar a Web Sphere Problem Determination Ext (20)

Know More About Rational Performance - Snehamoy K
Know More About Rational Performance - Snehamoy KKnow More About Rational Performance - Snehamoy K
Know More About Rational Performance - Snehamoy K
 
3 know more_about_rational_performance_tester_8-1-snehamoy_k
3 know more_about_rational_performance_tester_8-1-snehamoy_k3 know more_about_rational_performance_tester_8-1-snehamoy_k
3 know more_about_rational_performance_tester_8-1-snehamoy_k
 
JBoss Enterprise Application Platform 6 Troubleshooting
JBoss Enterprise Application Platform 6 TroubleshootingJBoss Enterprise Application Platform 6 Troubleshooting
JBoss Enterprise Application Platform 6 Troubleshooting
 
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
Performance Tuning -  Memory leaks, Thread deadlocks, JDK toolsPerformance Tuning -  Memory leaks, Thread deadlocks, JDK tools
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
 
Java Performance and Profiling
Java Performance and ProfilingJava Performance and Profiling
Java Performance and Profiling
 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight Recorder
 
Planning For High Performance Web Application
Planning For High Performance Web ApplicationPlanning For High Performance Web Application
Planning For High Performance Web Application
 
Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)
 
Performance Analysis of Idle Programs
Performance Analysis of Idle ProgramsPerformance Analysis of Idle Programs
Performance Analysis of Idle Programs
 
JDK Tools For Performance Diagnostics
JDK Tools For Performance DiagnosticsJDK Tools For Performance Diagnostics
JDK Tools For Performance Diagnostics
 
TechGIG_Memory leaks in_java_webnair_26th_july_2012
TechGIG_Memory leaks in_java_webnair_26th_july_2012TechGIG_Memory leaks in_java_webnair_26th_july_2012
TechGIG_Memory leaks in_java_webnair_26th_july_2012
 
Oracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuningOracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuning
 
Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profiler
 
Application Profiling for Memory and Performance
Application Profiling for Memory and PerformanceApplication Profiling for Memory and Performance
Application Profiling for Memory and Performance
 
XPages Performance
XPages PerformanceXPages Performance
XPages Performance
 
Audit your reactive applications
Audit your reactive applicationsAudit your reactive applications
Audit your reactive applications
 
Monitoring and Troubleshooting Tools in Java 9
Monitoring and Troubleshooting Tools in Java 9Monitoring and Troubleshooting Tools in Java 9
Monitoring and Troubleshooting Tools in Java 9
 
OTM Performance Review and Benchmarking
OTM Performance Review and BenchmarkingOTM Performance Review and Benchmarking
OTM Performance Review and Benchmarking
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
Java programing considering performance
Java programing considering performanceJava programing considering performance
Java programing considering performance
 

Más de Rohit Kelapure

API First or Events First: Is it a Binary Choice?
API First or Events First: Is it a Binary Choice?  API First or Events First: Is it a Binary Choice?
API First or Events First: Is it a Binary Choice? Rohit Kelapure
 
External should that be a microservice
External should that be a microserviceExternal should that be a microservice
External should that be a microserviceRohit Kelapure
 
Should That Be a Microservice ?
Should That Be a Microservice ?Should That Be a Microservice ?
Should That Be a Microservice ?Rohit Kelapure
 
Travelers 360 degree health assessment of microservices on the pivotal platform
Travelers 360 degree health assessment of microservices on the pivotal platformTravelers 360 degree health assessment of microservices on the pivotal platform
Travelers 360 degree health assessment of microservices on the pivotal platformRohit Kelapure
 
SpringOne Platform 2018 Recap in 5 minutes
SpringOne Platform 2018 Recap in 5 minutesSpringOne Platform 2018 Recap in 5 minutes
SpringOne Platform 2018 Recap in 5 minutesRohit Kelapure
 
Dynacache in WebSphere Portal Server
Dynacache in WebSphere Portal ServerDynacache in WebSphere Portal Server
Dynacache in WebSphere Portal ServerRohit Kelapure
 
Classloader leak detection in websphere application server
Classloader leak detection in websphere application serverClassloader leak detection in websphere application server
Classloader leak detection in websphere application serverRohit Kelapure
 
2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
2012 04-06-v2-tdp-1163-java e-evsspringshootout-final2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
2012 04-06-v2-tdp-1163-java e-evsspringshootout-finalRohit Kelapure
 
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-final2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-finalRohit Kelapure
 
Performance tuningtoolkitintroduction
Performance tuningtoolkitintroductionPerformance tuningtoolkitintroduction
Performance tuningtoolkitintroductionRohit Kelapure
 
IBM Health Center Details
IBM Health Center DetailsIBM Health Center Details
IBM Health Center DetailsRohit Kelapure
 
Java EE vs Spring Framework
Java  EE vs Spring Framework Java  EE vs Spring Framework
Java EE vs Spring Framework Rohit Kelapure
 
Debugging java deployments_2
Debugging java deployments_2Debugging java deployments_2
Debugging java deployments_2Rohit Kelapure
 
SIBus Tuning for production WebSphere Application Server
SIBus Tuning for production WebSphere Application Server SIBus Tuning for production WebSphere Application Server
SIBus Tuning for production WebSphere Application Server Rohit Kelapure
 
First Failure Data Capture for your enterprise application with WebSphere App...
First Failure Data Capture for your enterprise application with WebSphere App...First Failure Data Capture for your enterprise application with WebSphere App...
First Failure Data Capture for your enterprise application with WebSphere App...Rohit Kelapure
 
Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparisonRohit Kelapure
 
Wsadminlib.wasug.2011 0125-0726
Wsadminlib.wasug.2011 0125-0726Wsadminlib.wasug.2011 0125-0726
Wsadminlib.wasug.2011 0125-0726Rohit Kelapure
 
Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Rohit Kelapure
 

Más de Rohit Kelapure (19)

API First or Events First: Is it a Binary Choice?
API First or Events First: Is it a Binary Choice?  API First or Events First: Is it a Binary Choice?
API First or Events First: Is it a Binary Choice?
 
External should that be a microservice
External should that be a microserviceExternal should that be a microservice
External should that be a microservice
 
Should That Be a Microservice ?
Should That Be a Microservice ?Should That Be a Microservice ?
Should That Be a Microservice ?
 
Travelers 360 degree health assessment of microservices on the pivotal platform
Travelers 360 degree health assessment of microservices on the pivotal platformTravelers 360 degree health assessment of microservices on the pivotal platform
Travelers 360 degree health assessment of microservices on the pivotal platform
 
SpringOne Platform 2018 Recap in 5 minutes
SpringOne Platform 2018 Recap in 5 minutesSpringOne Platform 2018 Recap in 5 minutes
SpringOne Platform 2018 Recap in 5 minutes
 
Dynacache in WebSphere Portal Server
Dynacache in WebSphere Portal ServerDynacache in WebSphere Portal Server
Dynacache in WebSphere Portal Server
 
Classloader leak detection in websphere application server
Classloader leak detection in websphere application serverClassloader leak detection in websphere application server
Classloader leak detection in websphere application server
 
2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
2012 04-06-v2-tdp-1163-java e-evsspringshootout-final2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
 
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-final2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
 
Performance tuningtoolkitintroduction
Performance tuningtoolkitintroductionPerformance tuningtoolkitintroduction
Performance tuningtoolkitintroduction
 
IBM Health Center Details
IBM Health Center DetailsIBM Health Center Details
IBM Health Center Details
 
Java EE vs Spring Framework
Java  EE vs Spring Framework Java  EE vs Spring Framework
Java EE vs Spring Framework
 
Debugging java deployments_2
Debugging java deployments_2Debugging java deployments_2
Debugging java deployments_2
 
SIBus Tuning for production WebSphere Application Server
SIBus Tuning for production WebSphere Application Server SIBus Tuning for production WebSphere Application Server
SIBus Tuning for production WebSphere Application Server
 
First Failure Data Capture for your enterprise application with WebSphere App...
First Failure Data Capture for your enterprise application with WebSphere App...First Failure Data Capture for your enterprise application with WebSphere App...
First Failure Data Capture for your enterprise application with WebSphere App...
 
Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparison
 
Wsadminlib.wasug.2011 0125-0726
Wsadminlib.wasug.2011 0125-0726Wsadminlib.wasug.2011 0125-0726
Wsadminlib.wasug.2011 0125-0726
 
Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010
 
Cache Tooling
Cache ToolingCache Tooling
Cache Tooling
 

Web Sphere Problem Determination Ext

  • 1. THE BUSY JAVA DEVELOPER'S GUIDE TO WEBSPHERE DEBUGGING & TROUBLESHOOTING ROHIT KELAPURE IBM ADVISORY SOFTWARE ENGINEER HTTP://WWW.LINKEDIN.COM/IN/ROHITKELAPURE HTTP://TWITTER.COM/RKELA HTTP://WASDYNACACHE.BLOGSPOT.COM/ May 1, 2010 IBM WebSphere Application Server
  • 2. Agenda 2  WebSphere Application Server component overview  IBM Support Assistant  JVM Troubleshooting Tools  WebSphere Problem Determination Tools  Scenario based problem resolution  How customers get in trouble  BadApp Demo  Q&A
  • 4. IBM Support Assistant Workbench to help with Problem Determination 4
  • 5. ISA V 4.1.1 Data Collection Remote Collection using ISA lite 5 2 1 3 4
  • 6. ISA Tools Single Repository, up-to-date, scripts with IGAA 6
  • 7. Tools for information generated by JVM Problem 7 Artifact Tools Memory leaks Verbose Garbage collection • Garbage Collection & Out of Memory errors log (native_stdout.log) Memory Visualizer Application Unresponsive • Pattern Modeling & Analysis tool High CPU, Crash, Hang, Javadump, Javacore • Thread Monitor & Dump Performance bottleneck, (javacore*.txt) Analyzer (TMDA) Unexpected termination Lock Contention Threads (Connection to running • Monitoring & Diagnostic Tools Low CPU at high load JVM) for Java – Health Center Memory Leak Heapdump (*.phd, *.txt, • Memory Analyzer Tool Out of Memory errors *.hprof) • HeapAnalyzer • MDD4J Native Memory Leak System or core dump • Dump Analyzer Anomalies (core.dmp, user.dmp), Files must • Modules for Dump Unexpected Crash be processed with jextract tool Analyzer
  • 8. WAS Runtime Serviceability aids 8  Troubleshooting panels in the admin console  Performance Monitoring Infrastructure metrics  Tivoli Performance Viewer Monitoring  Diagnostic Provider Mbeans  Dump Configuration, State and run self-test  Application Response Measurement/Request Metrics  Follow transaction end-to-end and find bottlenecks  Trace logs & First Failure Data Capture  Runtime Performance Advisors  Memory leak detection, session size, …  Specialized tracing and Runtime checks  Session crossover, Connection leak, WsByteBuffer leak detection …  zOS runaway CPU thread protection  Diagnostic Toolkit & Framework for Java  API for accessing information in a system dump in an OS agnostic way
  • 9. WebSphere Troubleshooting Problem Tools, Runtime capabilities 9 Thread correlation, Trace log analysis WAS Trace Analyzer Delays in system response WAS & Plugin Trace & Request Analyzer Connection Leaks • Database Connection Pool Analyzer • Connection Leak Trace facility • Enabled using trace string WAS.j2c=finest Server hang Thread Monitor - Hung Thread Detection Policy • Every 3 minutes detects threads active for > 10 min Classloader issues Classloader viewer in the WAS Admin console Corrupt Install Install Verification Utility (installver, ivt.bat/sh) Runtime network status Port Scanning tool Comparing & Validating • Visual Configuration Explorer Configuration files • WebServices validation tool for WSDL & SOAP HTTP Plugin & Proxy (No response, • WebServer Plugin Analyzer Incorrect load balancing) • Dump ODC tree script Issues with Security LDAP Server test connection, SSL Certificate & Key Management, Security Configuration Report
  • 10. One more tool and I am going to scream
  • 11. WebSphere Monitoring tools 11  Sun origin JVM Tools - visualVM & jConsole,  SIBus – Explorer & Destination Handler  Dynacache - Cache Monitor & Extended Cache Monitor  HTTPSession - Session tracker debug Servlet*  WebServices Request/Response tracking  TCPMonitor & Fiddler  dumpNameSpace tool  osgiConsole.sh/bat  Coregroup Visualization and analysis tool*  Sun JVM ONLY Tools- jps, jstatd, jstack, jmap, jinfo, jhat  LDAP tools- ldapsearch, apache LDAP browser  JVM Diagnostics Collector
  • 12. Most common JVM Problem Scenarios 12 Functional Problems • Unexpected Exceptions, Compatibility OOM Errors • Java Heap ,Native Heap Classloaders Hangs • Synchronized resources, GC Pause times Crash • JVM errors, JIT errors, JNI errors High CPU • Spin loops
  • 13. Have you ever pondered … 13  Why does my app. run slow every time I do <…> ?  Why does my app. have erratic response times ?  Why am I getting Out of Memory Errors ?  What is my applications memory footprint ?  Which parts of my app. are CPU intensive ?  How did my JVM vanish without a trace ?  Why is my application unresponsive ?  $%@ is wrong with my application ?  What monitoring do I put in place for my app. ?
  • 14. Why does my app run slow when I do xxx ? 14  Understand impact of activity on WAS components  Look at the thread & method profiles in the IBM Java Health Center  Set IBM JVM method & dump trace - pinpoint performance problems.  Shows entry & exit times of any Java method  Method to trace to file for all methods in tests.mytest.package  -Xtrace:maximal=mt,output=trace.out,methods={tests/mytest/*.*}  Allows taking javadump, heapdump, etc when a method is hit  Dump javacore when method testInnerMethod in an inner class TestInnerClass of a class TestClass is called  -Xtrace:trigger=method{com/ibm/TestClass$TestInnerClass.testInnerMethod,javadump,,,5}  -Xtrace and -Xdump can be triggered on a huge range of events … with filters and ranges  gpf, user, abort, fullgc, slow, allocation, thrstop, throw …  Stack traces, tool launching
  • 15. Why does my application have erratic response times ? 15  Verbose gc should be enabled by default  (<2%) impact on performance  GCMV &PMAT : Visualize gc output & look @ recos.  In use space after GC  Positive gradient indicates memory leak  Increased load (use for capacity plan) OR memory leak (take HDs for PD.)  Chose the right GC policy  -Xgcpolicy:optthruput - optimized for “batch” type applications, consistent allocation profile  -Xgcpolicy:optavgpause - tight responsiveness criteria, allocations of large objects  -Xgcpolicy:gencon - high rates of object “burn”, large # of transitional objects  -Xgcpolicy:subpools - 12, 16 core SMP systems with allocation contention (AIX only)  GC overhead > 10% wrong policy or more tuning  Enable compressed References enabled for 64 bit JVM ?
  • 16. Why am I getting Out Of Memory Errors ? 16  Java 1.4.* -look for heap fragmentation (rare for Java 5/6)  Set –Xp and –Xk for pinned and dosed objects  JVM Heap sized incorrectly  IBM JDK Team does NOT recommend Xms == Xmx  GC adapts heap size to keep occupancy [40, 70]%  Determine heap occupancy of the app. under load  Xmx = 43% larger than max. occupancy of app.  For 700MB occupancy , 1000MB Max. heap is reqd. (700 +43% of 700)  Analyze heapdumps & system dumps with dump tools  Lack of Java heap or Native heap  Finding which methods allocated large objects  Prints stacktrace for all objects above 1K  -Xdump:stack:events=allocation,filter=#1k  Enable Java Heap and Native heap monitoring  JMX and PMI metrics output by WAS JVM  Classloader exhaustion in pre Java 5 SR3
  • 17. What is my applications memory footprint ? 17  HPROF – profiler shipped with JDK – uses JVMTI  Analysis of memory usage -Xrunhprof:heap=all  Performance Inspector tools - JPROF Java Profiling Agent  Capture state of the Java Heap later processed by HDUMP  Use MAT to investigate heapdumps & system dumps  Find large clumps, Inspect those objects, What retains them ?  Why is this object not being garbage collected  List Objects > incoming refs, Path to GC roots, Immediate dominators  Limit analysis to a single application in a JEE environment  Dominator tree grouped by Class Loader  Set of objects that can be reclaimed if we could delete X  Retained Size Graphs  Traditional memory hogs like Session, Dynacache  Use Object Query Language (OQL)
  • 18. Which parts of my application are CPU intensive ? 18  HPROF - CPU spends most of its time  -Xrunhrof:cpu=samples, -Xrunhprof:cpu=time  JPROF – method level execution times, who calls whom, etc.  Generate WAS startup script & set the JVM argument  "-agentlib:jprof=rtarcf,callflow,logpath=./jprof" "-Xjit:disableInlining“  Output visualized using VPA  Poor mans profiler - Periodic javacores  -Thread analysis - TMDA  IBM – Health Center  Low overhead  Gets data from JIT
  • 19. How did my JVM vanish without trace ? 19  JVM Process Crash Usual Suspects  Bad JNI calls, Segmentation violations, Call Stack Overflow  Native memory leaks - Object allocation fails with sufficient space in the JVM heap  Unexpected OS exceptions (out of disk space, file handles), JIT failures  Monitor the OS process size  Runtime check of JVM memory allocations -Xcheck:memory  Native memory usage - Create a core or svc dump on an OOM  -Xdump:system:events=systhrow,filter=java/lang/OutOfMemoryError  JNI code static analysis -Xcheck:jni (errors, warnings, advice)  GCMV provides scripts and graphing for native memory  Windows “perfmon“, Linux “ps” & AIX “svmon”  IBM Dump Analyzer & TMDA to find the last stack of native code executing on the thread during the crash
  • 20. Why is my application unresponsive ? 20  Usual Suspects (25-50% overhead of an app.)  Thread Contention & sync. issues Deadlocks and Spin loops  Take three javadumps spaced 1 minute apart  Native stacks in javadumps in Java 6, SR7  Monitor hold time accounting & Contention statistics  Java Lock Monitor, IBM Health Center (always on profiling)  Monitor hung thread messages  WSVR0605W (Thread hung), WSVR0606W (Thread completed), WSVR0607W (threshold adjusted)  Cause javacore on thread hang - Set“com.ibm.websphere.threadmonitor.dump” custom property to “true”  Spawning new threads is an anti-pattern since these threads are outside the hang detection monitoring  Is traffic flowing into the application server from the Plugin or the Proxy ?  Increasing OS level TCP/IP connection backlog at the webserver/proxy  IBM Health Center starts up on port 1972 for WAS and needs a generic JVM argument “-agentlib:healthcenter”  Overhead < 3%
  • 21. What is wrong with my application ? General problem determination steps 21  Finding the Bottleneck  CPU, Memory, I/O, Network  Systems Resource Usage  top, perfmon, svmon, tasklist, ps, <add your favorite utility here …>  JVM Heap Sizing  Setting Correct GC Policy, Heap occupancy  JIT Compilation & Performance  Application Profiling  Inbuilt hprof, Health Center  Free - Performance Inspector tools (JPROF, TPROF, JLM, Jinsight …)  Commercial- RAD, Jprofiler, Yourkit …  OS specific tuning  Setting TCP TIME_WAIT
  • 22. What do I monitor ? 22 OS Metrics PMI
  • 23. 11 Malpractices 23 no arch. plan No migration plan No change records No Capacity plan No Production traffic profile Changes put directly in Prod. No load & Stress testing Communication breakdown No education Application Error Test environment != Production
  • 25. I would like to thank … Please google & read their blogs & articles 25  Daniel Julin (IBM Lab)  John Pape (SWAT)  Kevin Grigorenko (SWAT)  Art Jolin (ISSW)  Chris Bailey (JDK)  Katie Barett (Serviceability team)  Russell Wright (ISA)  Thomas Alcott (Tech. Sales)
  • 26. 26