Professional Documents
Culture Documents
This quick start guide is intended to get you up-and-running quickly analyzing Web Performance by deep diving on your problem LoadRunner transactions.
3/7/2012
Table of Contents
Table of Contents .................................................................................................................................... 2 Introduction ............................................................................................................................................ 3 Prerequisites ....................................................................................................................................... 3 Getting Help ........................................................................................................................................ 3 Overview How it Works ........................................................................................................................ 4 LoadRunner Script Instrumentation ..................................................................................................... 4 Packaging and Execution through VuGen or Controller ........................................................................ 6 Architecture Overview ......................................................................................................................... 6 Enabling RTI in Tomcat and JBoss......................................................................................................... 7 Step-by-Step Guide to Enabling and Executing with RTI Deep Diagnostics................................................ 7 Starting the RTI Console....................................................................................................................... 7 Enabling LoadRunner Deep Diagnostics ............................................................................................... 8 Script Execution - Discovering RTI Diagnostics.................................................................................... 10 Working with a Separate Load Generator .......................................................................................... 12 Analyzing Collected Performance Data .............................................................................................. 12 Gathering Collected Performance Data for Analysis ....................................................................... 12 Working with the Overview ........................................................................................................... 15 Deep Diving on LoadRunner Transactions ...................................................................................... 17 Working with the Summary View ................................................................................................... 19 Troubleshooting .................................................................................................................................... 21 Missing Data...................................................................................................................................... 22 Learning More....................................................................................................................................... 23
Introduction
This quick start guide is intended to get you up-and-running quickly tracing LoadRunner transactions end-to-end and deep-diving on problem transactions to diagnose your performance problems! In this tutorial, well describe how to enable deep diagnostic performance monitoring on your LoadRunner scripts and to analyze results and identify potential bottlenecks. Before you go any further, please make sure you meet the prerequisites.
Prerequisites
This quick-start guide assumes you have already downloaded and installed RTI including both the RTI Console and the RTI Enterprise Performance Collector. The RTI Console provides administration and visualization capabilities; the enterprise performance collectors monitor your Load Runner client transactions as well as any backend Tomcat and JBoss Applications. The Collectors must be installed everywhere you intend to measure performance; e.g.
LoadRunner VuGen
RTI
Tomcat Web Server LoadRunner Load Generator
RTI
RTI
RTI
RTI
To request a download of RTI, please visit us on the web at http://www.rtiperformance.com/download or start by completing the install if you have already downloaded the tool. If you will be deep-diving into a distributed application that involves a remote Windows or Linux Server, you will need to install RTI on each server where you wish to monitor an application for performance. More information on the RTI architecture given the sample application well be using in this document is available under RTI Architecture Overview. Additional instructions for enabling RTI in your backend JBoss or Tomcat servers can be found under Enabling RTI in Tomcat and JBoss.
Getting Help
If you encounter any problems with RTI, please contact rti_support@ocsystems.com.
Action.c (Example)
/** start the transaction to switch currency in my ecommerce site */ OCS_RTI_START_TRANSACTION("currency GB", NULL); lr_start_transaction("currency GB"); /* send an HTTP pos to currency.do, this is part of my currency GB transaction */ OCS_RTI_START_WEB("currency.do", "currency GB"); web_submit_data("currency.do", "Action=http://10.189.1.20/ecommerce/currency.do", "Method=POST", "RecContentType=text/html", "Referer=http://10.189.1.20/ecommerce/home.do", "Snapshot=t3.inf", "Mode=HTML", ITEMDATA, "Name=currencyId", "Value=3", ENDITEM, LAST); /** my web request is now complete */ OCS_RTI_STOP_WEB("currency.do"); /** my transaction is now complete */ OCS_RTI_STOP_TRANSACTION("currency GB"); lr_end_transaction("currency GB",LR_AUTO);
The instrumentation allows RTI to start measurement at the Transaction levelproviding the same information as LoadRunnerbut then trace the underlying web requests across the network and into the backend web and application tiers diagnosing failure to the network level. As an example, the above Transaction instrumented with RTI is shown in the RTI Console after execution:
It is recommended but not required that you define your LoadRunner Transactions prior to instrumenting your script with RTI. If calls to lr_start_transaction() are missing, RTI will provide deepdive measurement for each LoadRunner web request; e.g. web_url(), web_submit_data(), etc
Architecture Overview
With our example, LoadRunner is running on a Windows Server and exercises an e-commerce application hosted on multiple backend Linux Servers. The RTI architecture is broken into 2 main components: RTI Collector Monitors and collects performance data for an application. Data is stored locally. RTI Console Gathers data on-demand from the collectors. Stores gathered data into the RTI data repository.
Weve already installed RTI on our backend Web TierApache HTTPD and our backend Application TierJboss. Our test environment looks like this:
See the Welcome View on the right and the Collectors and RTI Workspace views on the left.
4. Select the Script Home, which is the folder containing the script you wish to measure:
5. As an option, you can choose an Instance Name to identify measurements captured for this script, the default if left blank will be to use the script name. When finished, select Finish:
6. The selected script has now been instrumented to be measured by RTI. For an overview of the RTI instrumentation process, please review LoadRunner Script Instrumentation. You can verify that this step was successful by viewing your script in VuGen or any of your Action*.c files in a text editor. You will see the RTI code is now added to measure your LoadRunner transactions:
You can now run this script directly from VuGen and RTI will trace each LoadRunner transaction end-toend starting from VuGen and into my Web and Application Tiers where Ive already installed RTI. Once youve started the script, open the RTI Console to verify that the data collection is working. Selecting the host where the script is executinglocalhost in this caseright-click to select the Host context menu and then select Refresh:
The Console queries the RTI installation on localhost to discover what applications are monitored and you can now see that RTI has successfully initiated monitoring of my LoadRunner script:
The Get Data Dialog presents a list of options including: Dataset Name: Deep dive data is transferred from the remote host performance collectors and stored locally within a dataset with this name. Description: A description of the deep dive dataset. Time Range: Specify the time range of deep dive data to collect from the remote hosts and performance collectors. Performance Collectors: Which local and remote hosts and performance collectors do we want to transfer and analyze deep dive data? Filter: Should we filter any short running methods from our trace to reduce the amount of data bloat in our analysis and let us focus on finding the main problems?
Now may be a good time to refer to the Architecture Overview and review our test scenario in order to understand the selections weve made. At a high-level, were asking RTI to gather and persist data over the last hour and then automatically open it for analysis from the following performance collectors: LoadRunner on localhost JBoss_Node1 on lt3.ocsystems.com
If you dont see your hosts or Collectors in this dialog, youll want to reference the section Connecting to a Remote Linux Host found in Linux JBoss and Tomcat Configuration. After selecting Get Data, the RTI Console will query the selected collectors based on your parameters for performance data. Depending on the amount of data generated and the time frame selected, this may take a few minutes:
Working with the Overview Once the data has been gathered from the collectors and inserted into the RTI data repository, it will be opened for Analysis. Initially you will see the Overview which contains a table of the measured Transactions as well as a chart visualizing overall performance:
The table can be sorted by selecting the column headers and you can filter, export and change charts using the icons within the toolbar. The charts are fully interactive, and you can isolate problem transactions by selecting and doubleclicking individual data points, or isolating areas of interest by selecting an area within the chart:
Zooming operations within the chart work by creating filters on the data, and if you need to reset the view to its original state, you can clear the filters:
RTI collects a number of context properties that describe each measurement including: Time (Create Time) Application Virtual User (If monitoring a LoadRunner scenario with multiple virtual users) LoadRunner Transaction Name (Event Class) Elapsed Time Many more
You can customize the data shown in the table by modifying the columns. Right-click the table and select Change Columns:
Deep Diving on LoadRunner Transactions The Overview provides a good, high-level representation of the Transactions measured and the overall run performance. However, the real power of RTI is to deep-dive on problem Transactions and determine where they went wrong. Start by selecting the Deep Dive tab, in the bottom of the View:
Youll see what looks like a similar view. Except by default, the chart now shows a timeline of all the events that occurred for the Selected Transaction only.
By expanding each node in the Deep Dive Tree, you can trace your LoadRunner Transaction end-to-end from its execution across the network and into the web and application tiers. Theres a lot of work that happens under the covers to serve a single Transaction!
In addition to drilling down through the Deep Dive Tree, charts help you clearly visualize where time is spent across multiple properties of the Transaction. The Charts always work on the selection and can be changed or customized by selecting the Chart icon in the toolbar:
Working with the Summary View The final view available is the Summary View:
The Summary view provides a flat breakdown summarizing all the measurements available in the dataset end-to-end across the tiers. It is useful to summarize across different aspects of the measurements, for example what is the time distribution by Host, by Application, by Event Class (Servlet, Hibernate, JDBC, etc). Iteration through summaries is possibly by selecting from the pre-defined summary configurations:
If the default configurations are not enough, you can customize the summary specifically using the Advanced option:
Selecting Advanced allows you to choose which metrics to summarize, what groupings or aggregations to apply and what functions to calculate (avg, min, max, count).
Troubleshooting
(Q) Why dont I see Tomcat, or Jboss listed in my Collectors view? You may need to refresh the View. Select the appropriate host in the Collectors view, mouse right-click and choose Refresh. (Q) Ive refreshed the Collectors view and I still dont see Tomcat or JBoss
You need to start or restart the application the first time after you configure RTI. After enabling a new RTI collector, you need to start or restart the application you intend to monitor. This is the only restart thats needed. All future configurations can be pushed to a running application without restarting. After you restart your application make sure to Refresh the Collectors view.
Missing Data
(Q) I think I did this right, but Im not getting any Events Make sure you selected Enable in the new collector wizard. If you didnt, you need to delete the collector and start again. (Q) I selected Enable in the Wizard and Im still not seeing any Events RTI is configured out of the box to only measure end-to-end transactions; if a transaction comes into the backend application and was not measured where it originated (Internet Explorer, Firefox, JMeter, SoapUI, etc), RTI will ignore the transaction in Tomcat or JBoss. This can be changed. Select the Collector where you expect to see Events, right-click and choose Edit Configuration:
The Collector configuration will load and then complete the following steps:
1. 2. 3. 4.
Switch to the Trace Policy tab Select default under Policies In Policy Details, select All as the Recording Policy Select Inject Changes to save the configuration back to the Collector
The Collector configuration is updated automatically, and you dont need to restart your application. Re-run your test again and collect data from your Tomcat or JBoss Application; you should now see performance events collected.
Learning More
This Quick Start Guide just scratches the surface of what RTI offers. Please see our other quick-start guides for additional information on using RTI and diagnosing your web performance problems! See the following for more information: Documentation RTI FAQ RTI Videos