Diagnosing Production Java Applications Madhav Sathe



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

<Insert Picture Here> Java Application Diagnostic Expert

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

Tuning WebSphere Application Server ND 7.0. Royal Cyber Inc.

Insight into Performance Testing J2EE Applications Sep 2008

SOA management challenges. After completing this topic, you should be able to: Explain the challenges of managing an SOA environment

Winning the J2EE Performance Game Presented to: JAVA User Group-Minnesota

Holistic Performance Analysis of J2EE Applications

Solutions for detect, diagnose and resolve performance problems in J2EE applications

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

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

IBM Tivoli Composite Application Manager for WebSphere

APAC WebLogic Suite Workshop Oracle Parcel Service Overview. Jeffrey West Application Grid Product Management

ITG Software Engineering

Enterprise Manager 12c for Middleware

IBM WebSphere Server Administration

Whitepaper ADF Performance Monitor Measuring, Analyzing, Tuning, and Controlling the Performance of Oracle ADF Applications

Introduction. AppDynamics for Databases Version Page 1

Monitoring IBM Maximo Platform

Aplicações empresariais de elevada performance com Oracle WebLogic e Coherence. Alexandre Vieira Middleware Solutions Team Leader

Management Packs for Database

WebSphere Server Administration Course

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

An Oracle White Paper September, Enterprise Manager 12c Cloud Control: Monitoring and Managing Oracle Coherence for High Performance

Using Apache Derby in the real world

WebSphere Application Server - Introduction, Monitoring Tools, & Administration

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

CHAPTER 1 - JAVA EE OVERVIEW FOR ADMINISTRATORS

Oracle SOA Suite: The Evaluation from 10g to 11g

Oracle Enterprise Manager 12c Cloud Control for Managing Oracle E-Business Suite 12.2

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

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

The Evolution of Load Testing. Why Gomez 360 o Web Load Testing Is a

Oracle WebLogic Server 11g Administration

Operations and Monitoring with Spring

WEBLOGIC SERVER MANAGEMENT PACK ENTERPRISE EDITION

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

IBM Tivoli Composite Application Manager for WebSphere

Deploying Rule Applications

THE BUSY DEVELOPER'S GUIDE TO JVM TROUBLESHOOTING

Thanks to the innovative technology that we have developed, lucierna is able to monitor all of the client s code with an overhead of less than 2%.

Global Headquarters: 5 Speen Street Framingham, MA USA P F

HP OO 10.X - SiteScope Monitoring Templates

White Paper. How to Achieve Best-in-Class Performance Monitoring for Distributed Java Applications

Exam : Oracle 1Z : Oracle WebLogic Server 10gSystem Administration. Version : DEMO

Monitoring Remedy with BMC Solutions

Cognos8 Deployment Best Practices for Performance/Scalability. Barnaby Cole Practice Lead, Technical Services

WEBLOGIC ADMINISTRATION

Performance Testing of Java Enterprise Systems

Why Alerts Suck and Monitoring Solutions need to become Smarter

Evidence based performance tuning of

Converting Java EE Applications into OSGi Applications

Tool - 1: Health Center

PTC System Monitor Solution Training

WebSphere Architect (Performance and Monitoring) 2011 IBM Corporation

An Oracle White Paper July Oracle Primavera Contract Management, Business Intelligence Publisher Edition-Sizing Guide

APPLICATION MANAGEMENT SUITE FOR ORACLE E-BUSINESS SUITE APPLICATIONS

Monitoring Custom Applications User and Reference Guide

Continuous Performance Testing

MONITORING A WEBCENTER CONTENT DEPLOYMENT WITH ENTERPRISE MANAGER

Wait-Time Analysis Method: New Best Practice for Performance Management

A technical guide for monitoring Adobe LiveCycle ES deployments

Enterprise Manager Performance Tips

OWB Users, Enter The New ODI World

Configuration Management of Massively Scalable Systems

APPLICATION MANAGEMENT SUITE FOR ORACLE E-BUSINESS SUITE APPLICATIONS

Performance Optimization For Operational Risk Management Application On Azure Platform

A Performance Engineering Story

Performance Best Practices Guide for SAP NetWeaver Portal 7.3

Mohammed Khan SUMMARY

Oracle Weblogic. Setup, Configuration, Tuning, and Considerations. Presented by: Michael Hogan Sr. Technical Consultant at Enkitec

Oracle Business Activity Monitoring 11g New Features

How To Use Ibm Tivoli Composite Application Manager For Response Time Tracking

JBOSS ENTERPRISE APPLICATION PLATFORM MIGRATION GUIDELINES

Glassfish Architecture.

Java EE 7: Back-End Server Application Development

Put a Firewall in Your JVM Securing Java Applications!

Analyzing IBM i Performance Metrics

What s Cool in the SAP JVM (CON3243)

echomountain Enterprise Monitoring, Notification & Reporting Services Protect your business

Glassbox: Open Source and Automated Application Troubleshooting. Ron Bodkin Glassbox Project Leader

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

Oracle Service Bus: - When to use, where to use and when not to use

An Oracle White Paper June Managing Oracle WebLogic Server with Oracle Enterprise Manager Cloud Control 12c

Transaction Monitoring Version for AIX, Linux, and Windows. Reference IBM

STEELCENTRAL APPINTERNALS

WebLogic Server Admin

JBoss EntErprisE ApplicAtion platform migration guidelines

Japan Communication India Skill Development Center

An Oracle White Paper June, Enterprise Manager 12c Cloud Control Application Performance Management

Java Management Extensions (JMX) and IBM FileNet System Monitor

Effective Java Programming. measurement as the basis

SCA-based Enterprise Service Bus WebSphere ESB

Whitepaper ADF Performance Monitor Measuring, analyzing, tuning, and checking the performance of Oracle ADF applications

Monitoring and Log Management in Hybrid Cloud Environments

Oracle Exam 1z0-599 Oracle WebLogic Server 12c Essentials Version: 6.4 [ Total Questions: 91 ]

BUILDING FLEXIBLE ENTERPRISE PROCESSES USING ORACLE BUSINESS RULES AND BPEL PROCESS MANAGER. An Oracle White Paper Jan 2005

What Is Specific in Load Testing?

26.Roundtable Münchner Unternehmerkreis IT Simone Frömming - Vice President Sales Oracle Deutschland GmbH

Transcription:

Diagnosing Production Java Applications Madhav Sathe Oracle India

Agenda Types of applications and issues Challenges Approaches to diagnostics Runtime JVM diagnostics Best practices Demo Q & A

Folientitel Font: Microsoft Sans Serif, 32 pt Font: Microsoft Sans Serif, 28 pt Font: Microsoft Sans Serif, 24 pt Font: Microsoft Sans Serif, 20 pt Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy eiusmod tempor incidunt ut labore et dolore magna aliquam erat volupat.

Applications using Java Technologies ADF Java EE/SE BPEL/ESB Java EE/SE, ADF, WS, SCA, Spring, OC4J, WebLogic ADF BC (BC4J) TopLink, Hibernate JPA DB Adapter EJB 2.1 CMP BMP ORM JPA+ OXM JAXB+ TopLink POJO EIS SDO DB WS JDBC JCA Databases Data Hub XML Data Packaged Apps Legacy Systems

Application Performance Issues Slow and slower response time Slower under heavy load System locks up Sudden chaos / Unexpected Errors Sporadic hangs and aberrant errors Web customer Internal user Billing Web store Web Users Batch job App Servers Financial System Database

Service levels going down SLAs Affected

Who will own the issue? Developer It s a problem in the DB Your application sucks! DBA Will someone diagnose and fix it? Administrator

Diagnostic Challenges: Lack of Visibility is Source of Problem Typical Multi-Tiered J2EE System Leaves the Administrators Blind Service Levels Measured Here Web page request Apache OHS Real issue is here App Layer Oracle ebusiness Oracle AS/WebLogic Peoplesoft Siebel JD Edwards SAP Custom apps Blame assigned Here Web Server J2EE layer Database

Challenges In Diagnosing Highly distributed systems Cross tier J2EE, DB, MOM, SOA How does DB configuration affect application performance? How to correlate SQLs to java sessions? What about Toplink, Hibernate generated SQLs? Was AS tuned properly? No visibility into runtime environment What error customer saw on browser? Which part of the code is taking time? Which application server instance is causing problem? Was the problem in J2EE layer or DB layer? The risk is very high as the time, effort and cost of diagnosing goes high

Application Diseases Java memory leak issues Liner Exponential Bad Coding Infinite loops Exception handling Unnecessary synchronization Resource Leak Thread deadlock Incorrect Application Server Configuration Pools, caches Memory External Issues JDBC / DB Issues Messaging Provider

Approaches to Application Monitoring Metrics Diagnostics Application, J2EE Servers, DB and Machine resources Find top SQL from DB monitoring and find out application code responsible Rerun Use case in test environment Use JVM diagnostic tools in test environment Use logs

Challenges In these approaches Logs don t have sufficient data Correlating logs across multiple application server instances and other tiers is very painful; impossible in some cases Test environment can t reproduce the exact scenario - load, resources contention, etc The actual execution context is lost forever

Challenges In these approaches Challenge in finding offending SQL Code in modern app using JPA or O-R Framework (TopLink, Hibernate) No cross tier correlation of application code with DB tier How to correlate metrics from various sources Monitor in production and diagnose in test/development environment

Application Problems and Possible Causes Slower over time or under load Application hangs in intermittently or times out Slower response over time, intermittent hangs Slower consistently and under load Sudden chaos Hangs and Sudden chaos Memory leak Application code or improper app server configurion Resource Leak JDBC or DB problem Threading problem Application Server or Back-end DB problem

Diagnose Application Server Issues Monitor Application Server resources and search for bottlenecks Thread pools / Work managers Resource usage (JMS, Data Sources) Applications (EJB Pools, bad JSPs/Servlets) Look for possible errors in Logs Time outs Exceptions Memory issues Use tools to proactively monitor using alert/event notifications

Application Code: Use monitoring tools to find offending tier View the time spent in server and network View response time breakdowns by Servlet/JSP, EJB, JDBC, and SQL Then drill down to the offending tier

Perform Transaction Response Time Analysis Trace active threads in real-time View the bottleneck resources

Improve Performance by Tuning Tune AS Thread pools/work managers Web Server concurrency JDBC / Data Source Tune connection pool Use SQL statement caching at DataSource level Reduce round trips with pre-fetch size Use lowers isolations levels when appropriate

Improve Performance by Tuning Improve Application DB Access Enforce primary key constraint at database level Avoid extra SQL for constraint checking by container/jpa provider Exploit DELETE CASCADE at database level Container generate multiple SQL statements Batch update operations to end of transaction Improve code Use sync code only when necessary Nullify references, invalidate sessions Declare variables, arguments final when possible

O-R Frameworks and its impact on DB Technologies such as CMP Entity Beans / Java Persistence API / TopLink/Hibernate abstracts object-level querying and creation results are objects persistence details from the application layer Objects J2EE & Web Services Objects Persistence Layer object creation and updates through object-level API results are returned as raw data rows JDBC SQL API uses SQL or database specific calls

Tuning Tips for CMP, JPA O-R Frameworks Find the SQL Generated by apps Log file Tracing and Monitoring tools Make sure that SQL Generated by your finder /select method uses indexes Exploit statement caching by the container Avoid findall() methods on large tables Use read-only beans when appropriate Reduce number of activations and passivations

Application Code Issues: Using Diagnostics Tools JMX based Byte Code Instrumentation / AOP JMVTI

JMX Based Monitoring Monitoring tools JMX data exposed by the application server and/or applications Get some high level metrics such as Response Time, Load, Open Connections, EJB Count, etc Alerts on threshold can give some indicators Limitations No insight into code Can not correlate user requests with mid tier metrics

Byte Code Instrumentation Find out code traces Can correlate user requests to code stack Find out code bottlenecks Limitations Need server restart or application redeployment Either instrument every thing or know what to instrument Over instrumentation will be have overheads Functional instrumentation is difficult and is impossible for admins

BCI Tools Aggregate of traces Segregation by layers in J2EE Some provide remoting support Capture each trace Some products ClearApp Dynatrace Wily Quest

JVMPI/JMVTI Use JVM hooks The agent is a shared library listening for JVM events Limitations High overheads Need JVM restart with agentlib option No cross tier visibility

JVM Native Diagnostics JVM specific agent running within JVM Take snapshots of JVM threads and heap DB agent makes crenellation with J2EE stack possible Advantages Extremely low overheads (< 1%) No byte code changes No server restarts or application redeployments Perfect for production scenarios

A new approach: JVM Native Capabilities Diagnostics Stack traces for all the threads Correlate call stacks with end user requests Find out object locks, network waits, etc Memory heap analysis DB agents allows to correlate DB locks to user requests and threads Use repository to do historical analysis

Application Diagnostics for Java No performance overhead No instrumentation No server restarts Need not redeploy app Thread state analysis. Locks, n/w waits, DB waits Call stack visibility Memory leak analysis Only solution for diagnosing application performance issues in production

Cross-tier trace with DB Trace Java thread to DB session Identify in-flight Java threads waiting for DB resource Drill to SQL DB State Causing the Bottleneck Identify DB Wait Trace DB session to Java thread SQL Causing the problem View DB sessions waiting for or holding locks Identify Java thread holding DB session

Best Practices Use single console to monitor all system components Choose right JVM diagnostic tool Should not need restarts/redeployments Monitor threads, heap real time Near zero % overheads Cross tier Capture the actual HTTP transactions seen by clients Capture traces in real time and segregate performance by various J2EE layers Correlate transactions across JVMs Do all this without any/negligible overhead on runtime system

Some Products Feature Infrastructure/Se rvices management and monitoring Application tracing Real user experience Production JVM and cross-tier diagnostics Products Oracle Grid Control, BMC, IBM Tivoli, HP Openview Oracle ClearApp, Wily, Dynatrace, Quest Oracle Real User Experience Insight (Moniforce), Quest Foglight, HP Real User Monitor Oracle Application Diagnostics for Java (AD4J)

AD4J Demo

Questions?