Trace-Based and Sample-Based Profiling in Rational Application Developer



Similar documents
NetBeans Profiler is an

Zing Vision. Answering your toughest production Java performance questions

Tool - 1: Health Center

Performance Improvement In Java Application

Instrumentation Software Profiling

Java VM monitoring and the Health Center API. William Smith

IBM Software Group. SW5706 JVM Tools IBM Corporation 4.0. This presentation will act as an introduction to JVM tools.

2015 ej-technologies GmbH. All rights reserved. JProfiler Manual

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

Practical Performance Understanding the Performance of Your Application

TECHNOLOGY WHITE PAPER. Application Performance Management. Introduction to Adaptive Instrumentation with VERITAS Indepth for J2EE

Holly Cummins IBM Hursley Labs. Java performance not so scary after all

language 1 (source) compiler language 2 (target) Figure 1: Compiling a program

Holistic Performance Analysis of J2EE Applications

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

Monitoring IBM WebSphere extreme Scale (WXS) Calls With dynatrace

Oracle JRockit Mission Control Overview

Profiling and Testing with Test and Performance Tools Platform (TPTP)

J2EE-JAVA SYSTEM MONITORING (Wily introscope)

JProfiler: Code Coverage Analysis Tool for OMP Project

Effective Java Programming. measurement as the basis

How to analyse your system to optimise performance and throughput in IIBv9

WebSphere Performance Monitoring & Tuning For Webtop Version 5.3 on WebSphere 5.1.x

Also on the Performance tab, you will find a button labeled Resource Monitor. You can invoke Resource Monitor for additional analysis of the system.

PTC System Monitor Solution Training

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

Monitoring Agent for Microsoft.NET Version Reference IBM

Eclipse Visualization and Performance Monitoring

IBM Tivoli Composite Application Manager for WebSphere

Java memory proler user guide

Interpreters and virtual machines. Interpreters. Interpreters. Why interpreters? Tree-based interpreters. Text-based interpreters

CSE 403. Performance Profiling Marty Stepp

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

FileNet System Manager Dashboard Help

Debugging Java performance problems. Ryan Matteson

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

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

Java Troubleshooting and Performance

<Insert Picture Here> Java Application Diagnostic Expert

Memory Profiling using Visual VM

Object Instance Profiling

Understand Performance Monitoring

ARM-BASED PERFORMANCE MONITORING FOR THE ECLIPSE PLATFORM

Advanced Performance Forensics

Transaction Performance Maximizer InterMax

WebSphere Architect (Performance and Monitoring) 2011 IBM Corporation

Delivering Quality in Software Performance and Scalability Testing

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

IBM SDK, Java Technology Edition Version 1. IBM JVM messages IBM

Monitoring Custom Applications User and Reference Guide

What s Cool in the SAP JVM (CON3243)

The Complete Performance Solution for Microsoft SQL Server

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

Rational Application Developer Performance Tips Introduction

Contents. 2. cttctx Performance Test Utility Server Side Plug-In Index All Rights Reserved.

PART IV Performance oriented design, Performance testing, Performance tuning & Performance solutions. Outline. Performance oriented design

Performance Testing of Java Enterprise Systems

Tomcat Tuning. Mark Thomas April 2009

Tuning WebSphere Application Server ND 7.0. Royal Cyber Inc.

Oracle WebLogic Thread Pool Tuning

IBM Tivoli Composite Application Manager for WebSphere

Top 10 reasons your ecommerce site will fail during peak periods

Angelika Langer The Art of Garbage Collection Tuning

Foglight. Monitoring Application Servers User and Reference Guide

Chapter 3 Application Monitors

Monitoring.NET Framework with Verax NMS

Memory Allocation. Static Allocation. Dynamic Allocation. Memory Management. Dynamic Allocation. Dynamic Storage Allocation

Java's garbage-collected heap

VMWARE WHITE PAPER 1

MONITORING PERFORMANCE IN WINDOWS 7

Performance Tools for Parallel Java Environments

Enterprise Manager Performance Tips

IBM RATIONAL PERFORMANCE TESTER

MCTS Guide to Microsoft Windows 7. Chapter 10 Performance Tuning

WINDOWS PROCESSES AND SERVICES

How to use IBM HeapAnalyzer to diagnose Java heap issues

Profiler User's Guide

Gary Frost AMD Java Labs

Garbage Collection in the Java HotSpot Virtual Machine

Load Testing and Monitoring Web Applications in a Windows Environment

TDA - Thread Dump Analyzer

IBM Tivoli Monitoring Version 6.3 Fix Pack 2. Infrastructure Management Dashboards for Servers Reference

Monitoring Java enviroment / applications

Running a Workflow on a PowerCenter Grid

Monitoring and Managing a JVM

11.1 inspectit inspectit

Implementing Java Distributed Objects with JDBC

Understanding Java Garbage Collection

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

High-Availability. Configurations for Liferay Portal. James Min. Senior Consultant / Sales Engineer, Liferay, Inc.

Basics of VTune Performance Analyzer. Intel Software College. Objectives. VTune Performance Analyzer. Agenda

Table of Contents INTRODUCTION Prerequisites... 3 Audience... 3 Report Metrics... 3

Troubleshooting PHP Issues with Zend Server Code Tracing

CSCI E 98: Managed Environments for the Execution of Programs

Performance Analysis of webmethods Integrations using Apache JMeter Information Guide for JMeter Adoption

Transcription:

Trace-Based and Sample-Based Profiling in Rational Application Developer This document is aimed at highlighting the importance of profiling in software development and talks about the profiling tools offered in Rational Application Developer (hereafter termed/referred to as 'RAD'). I. Why do we need to profile our programs? Software application performance is a key aspect of delivering software. Poor performance and scalability results in high costs to the software company and disappoints clients, thereby damaging the company's reputation. Customers require applications that are responsive, reliable and saves time. This can be taken care of by analyzing code and looking for areas of code that run at peak performance. A common property of computer programs is described by the 90/10 rule: a program spends approximately 90% of its execution time in approximately 10% of the (executed) static program. Static program could be found in the form of loops or recursive functions. Optimizing these 'hot spots' results in reduced overall application execution time or reduced use of memory resources. Using a profiling tool helps in locating such bottlenecks within the code and thus diagnoses application performance. The IBM Rational Application Developer provides sophisticated profiling tools that can be used in the development phase itself. This gives developers time to make necessary changes to avoid performance issues from becoming critical problems later on. II. Profiling in RAD RAD profiling offers two main profiling modes: trace-based profiling and sample-based profiling. Understanding the difference between each of these modes helps in making the right decisions while testing the performance of applications. A high-level description of the mechanism with which both profiling modes operate and the pros and cons of each profiling method will be discussed. Simultaneously, a walk-through of the different profiling options available in RAD will be provided. In RAD, on selecting the Profile Java application option, a profiling configuration window appears as shown in Figure 1. The Java Profiling option use a trace-based profiler, while the Health Center Data Collector option uses a sample-based profiler.

Lets take a look at each of these two profiling groups in detail. III. Trace-based profiling In trace-based profiling, the profiling agent running alongside the JVM actively instruments methods in the JVM to find how long each method takes to run. The JVM notifies the profiler when a method is entered and exited and therefore provides an accurate measure of the number of calls and time spent in executing a particular method. The RAD JVMTI profiler is a trace-based profiler. It is used to detect: (i) performance bottlenecks, in terms of execution time (execution analysis), (ii) memory usage problems (memory analysis), and (iii) Contention analysis and deadlock detection (thread analysis).

The drawback of this method appears while profiling a large code base. Transmission of data from the JVM to the profiling agent, processing of the data by the workbench at regular intervals and storage of all data in memory for statistics generation leads to slower speed and large overhead during profiling. A workaround to this problem is to set filters during profiling. To set filters, click on the Edit Filters option (see Figure 2), which opens a window as shown below. The packages or classes to be profiled can be added in here. This helps you to collect data of interest and focus on analysis of your code. Figure 2: Filter Set window

(i) Execution Analysis view Figure 3: Execution Analysis view In the Package view, you can expand the packages and view the time taken to execute each class. The following statistics are displayed for each package, class or method: (i) The Base Time refers to the time that is taken to execute all method invocations only. This does not include the time spent in each of the called methods. (ii) The Average Base Time is the base time divided by the number of calls. (iii) The Cumulative time is the time that is taken to execute the invocation, including the time that is spent in the called methods. (iv) Calls refers to the number of calls that are made to the package, class or method. Execution Analysis also provides information regarding call tree, details about method invocation and number of times a method has been invoked.

Call Tree Figure 4: Call Tree view The Call Tree view displays the function execution paths that were traversed in the profiled application. The root of the tree is the entry point into the application. Each function node lists all the functions it called and performance data about those function calls. Method Invocation Details Method Invocation Details include information about a specific method. It tells two things (i) Which methods invoked the selected method (ii) Which methods are invoked by the selected method For example in Figure 5 the selected method is "getproducts()", it is invoked by "testproducts()" but it doesn't invoke any other methods in the execution path that was taken.

Figure 5: Method Invocation Details Method Invocation Method Invocation provides information about number of times a specific method has been invoked and each invocation performance data is displayed as well. For example in Figure 6 the selected method is "getproducts()", it is invoked one time during the execution path taken.

Figure 6: Method Invocation (ii) Memory Analysis View: Figure 7: Memory Analysis View The Object Allocations view shows statistics about the application heap. It provides information on the number of classes loaded, the number of instances that are alive and the memory size that is allocated by every class. (i) The Live Instances column shows the number of instances of the selected package, class or method where no garbage collection has taken place. (ii) The Active Size column shows the total size in bytes of all live instances. (iii) The Total Instances column shows the total number of instances that have been created of the selected package, class, or method during the JVM's lifetime.

(iv) The Total size column shows the total size in bytes of the selected package, class, or method, of all instances that were created for it during the JVM's lifetime. (v) The Average Age column shows the average number of garbage collections that objects of the class have survived. Memory Analysis View also consists of a tab called "Allocation Details" Allocation Details Figure 8: Allocation Details Allocation Details shows information about which methods are allocating memory for which classes along with information on the number of classes loaded, the number of instances that are alive and the memory size that is allocated for each class. For example in Figure 8, a method called "Store" is allocating memory for class "Customers".

(iii) Thread Analysis View Figure 9: Thead Analysis view Figure 10: Threads Visualizer view The Thread Statistics view shows the state, running time, and waiting time of the threads. The Monitor Statistics tab shows the details of a selected thread including the Java classes that are involved. The Thread Visualizer tab shows the timeline of the threads with their states

IV. Sample-based profiling Sample-based profiling tools collect snapshots of the current call stacks from the JVM at regular intervals. A set of samples of methods running on the JVM is generated. This method is not as accurate as trace-based profiling and reflects a statistical approximation of a method's execution time. Moreover, we do not obtain information of the number of method calls. However, this kind of profiling is faster and has very low overhead as compared to trace-based profiling and is therefore good to use when profiling applications that are CPU bound. Sample-based profiling using the Health Center Agent has been newly added to RAD v9.0. This is the same Health Center agent that is available on IBM Support Assistant (ISA) Figure 11: Health Center Agent Profiling Sample Data view The following figure shows the Health Center Agent view in RAD: The Health Center Profiling Sample Data view shows which methods are using the most processing resources. The objects shown higher on the table need to be optimized in order to improve the application's overall execution time. The following data is displayed: (i) The Method column shows the fully qualified method name. (ii) The Samples column shows the number of samples taken while a particular method was being run at the top of the stack. (iii) The Self % column shows the percentage of the number of samples taken while a particular method was being run at the top of the stack. (iv) The Tree % column shows the percentage of the samples taken while a particular method was anywhere in the call stack. (v) The Self and Tree columns are bar-representations of the Self % and Tree % columns respectively.

V. Conclusion By providing support for both trace-based and sample-based profiling, Rational Application Developer has provided users with a comprehensive profiling tool that can be used to diagnose a wide array of performance issues. In today's world, high performance software applications are in demand, and RAD's profiling tool can be of great help to software developers in improving the performance of their software applications.