Rti V33 Enable Loadrunner

RTI v33 Enable Loadrunner
View more...
   EMBED

Share

  • Rating

  • Date

    December 1969
  • Size

    2.3MB
  • Views

    597
  • Categories

Preview only show first 6 pages with water mark for full document please download

Transcript

RTI v3.3 – Lightweight Deep Diagnostics for LoadRunner Monitoring Performance of LoadRunner Transactions End-to-End 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, we’ll 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 JBoss Application Server RTI Tomcat Web Server LoadRunner Load Generator RTI RTI JBoss Application Server 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 we’ll 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 [email protected]. Overview – How it Works RTI is an end-to-end deep diagnostic tool for web based java applications. Out of the box, RTI supports performance monitoring and tracing for a variety of Applications, Middleware and Test Automation Frameworks including: Internet Explorer, Firefox, Apache HTTPD, Tomcat, JBoss Enterprise and Community Platforms, LoadRunner, JMeter and SoapUI. RTI can also monitor your custom java application. In the case of LoadRunner, RTI provides end-to-end monitoring and deep diagnostics for scripts based on the Web Protocol. RTI traces LoadRunner transactions from the point of execution—Virtual User Generator (VuGen) or a Load Generator as a part of a larger scenario—across the network and into the backend web and application tiers down to the method level. If you are having performance or integration problems with your environment, RTI can isolate degradation starting from the Transaction and drill-down to the method level in the application tier. RTI also captures key context information to help you determine why some transactions fail while others don’t. For example, if RTI finds a slow database query you can see the exact SQL executed to diagnose why that query was slow. LoadRunner Script Instrumentation RTI works by first scanning existing LoadRunner scripts and adding small blocks of code to monitor and trace your Transactions end-to-end. The instrumentation is initiated through the RTI Console and is described in detail in Enabling Performance Collection. The following is an example of a LoadRunner script after it has been instrumented by RTI: 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 level—providing the same information as LoadRunner—but 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… Packaging and Execution through VuGen or Controller As part of the instrumentation step, RTI will add several *.h and *.dll files to the folder or directory containing the LoadRunner script being instrumented. These files are required by RTI and cannot be deleted or modified. The added files are available to execution either within VuGen or a Scenario managed by the Controller. As scripts are pushed to remote Load Generators, the added RTI files are automatically pushed by the LoadRunner Controller. 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. We’ve already installed RTI on our backend Web Tier—Apache HTTPD –and our backend Application Tier—Jboss. Our test environment looks like this: Enabling RTI in Tomcat and JBoss Enabling RTI for your backend Web and Application tiers including Tomcat and JBoss on Windows or Linux is covered in user-guide documentation. We recommend reviewing that information to leverage RTIs ability to collect end-to-end deep diagnostics. Step-by-Step Guide to Enabling and Executing with RTI Deep Diagnostics Starting the RTI Console To start, invoke the RTI Console with Start→All Programs→RTI→Console. You should see something like this: See the Welcome View on the right and the Collectors and RTI Workspace views on the left. Enabling LoadRunner Deep Diagnostics Before RTI can trace and deep-dive on your LoadRunner Transactions, you first need to enable performance data collection; this is an easy process and involves only a single step: Instrument LoadRunner Script. In this example, we’ll show the RTI Console running on the same Windows host as VuGen and a LoadRunner Controller and Load Generator. We’ll then show a LoadRunner script that exercises an ecommerce application deployed within JBoss on a remote Linux Server. 1. Invoke the RTI Console with Start→All Programs→RTI→Console. 2. Select localhost in the Collectors View, then right-click to access the context menu and select Instrument LoadRunner Script. You should see something like this: 3. Select localhost, then Next: 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: Script Execution - Discovering RTI Diagnostics After you have successfully Enabled LoadRunner Deep Diagnostics you are now ready to run. RTI provides deep diagnostics for an instrumented script that is run in either VuGen or part of a Scenario managed through the LoadRunner Controller and executed by Load Generators. For this example, we’ll start by doing a trial run through VuGen to verify our instrumentation has worked. After opening the script that we instrumented, you can see the additional RTI code added to enable deep diagnostics: 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 I’ve already installed RTI. Once you’ve started the script, open the RTI Console to verify that the data collection is working. Selecting the host where the script is executing—localhost in this case—right-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: Working with a Separate Load Generator The RTI Enterprise component must be installed on the Load Generator machine and the ‘rshd’ service started as described in the RTI Windows Install document. When it runs, the LoadRunner script will find the RTI installation, create the LoadRunner collector automatically and log event data. After the test run but before collecting data for the first time, use the New Host wizard to define a remote host connection to the LoadGenerator host and the LoadRunner collector on that host as described in RTI for JBoss/Tomcat on Windows. Analyzing Collected Performance Data We’ve now gotten set-up and are ready to start analyzing LoadRunner Transactions. To recap, we’ve completed the following steps: 1. Enabled RTI in JBoss 2. Enabled LoadRunner Deep Diagnostics 3. Run our instrumented script through VuGen and Discovered RTI Diagnostics If you skipped any of these steps or had problems, it’s best to go back and complete them or contact [email protected] with questions before going further. Gathering Collected Performance Data for Analysis Now that we have executed an instrumented script through VuGen, let’s bring the data into the Console for Analysis. We’ll select Transfer deep-dive performance data from the Welcome View: We are now presented with the RTI Get Data Dialog: 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 we’ve made. At a high-level, we’re 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   JBoss_Node2 on lt4.ocsystems.com Apache HTTPD on lt1.ocsystems.com If you don’t see your hosts or Collectors in this dialog, you’ll 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: You’ll 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. There’s 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 don’t 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) I’ve refreshed the Collectors view and I still don’t 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 that’s 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 I’m not getting any Events… Make sure you selected ‘Enable’ in the new collector wizard. If you didn’t, you need to delete the collector and start again. (Q) I selected Enable in the Wizard and I’m 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 don’t 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