rti enable loadrunner

Upload: austinfru

Post on 03-Jun-2018

235 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 RTI Enable Loadrunner

    1/23

    RTI v3.3

    LightweightDeep Diagnostics for

    LoadRunnerMonitoring Performance of LoadRunner

    Transactions End-to-End

    3/7/2012

    This quick start guide is intended to

    get you up-and-running quickly

    analyzing Web Performance by deep

    diving on your problem LoadRunner

    transactions.

  • 8/12/2019 RTI Enable Loadrunner

    2/23

    Table of ContentsTable of Contents .................................................................................................................................... 2

    Introduction ............................................................................................................................................ 3

    Prerequisites ....................................................................................................................................... 3Getting Help ........................................................................................................................................ 3

    OverviewHow 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

  • 8/12/2019 RTI Enable Loadrunner

    3/23

    IntroductionThis 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 yourLoadRunner scripts and to analyze results and identify potential bottlenecks.

    Before you go any further, please make sure you meet theprerequisites.

    PrerequisitesThis 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.

    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 underRTI 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 HelpIf you encounter any problems with RTI,please [email protected].

    LoadRunner VuGen

    LoadRunner Load

    Generator

    RTI

    RTI

    Tomcat Web Server

    RTIJBoss Application Server

    RTI

    JBoss Application Server

    RTI

    http://www.rtiperformance.com/downloadhttp://www.rtiperformance.com/downloadmailto:[email protected]?subject=RTI%20Support%20Neededmailto:[email protected]?subject=RTI%20Support%20Neededmailto:[email protected]?subject=RTI%20Support%20Neededmailto:[email protected]?subject=RTI%20Support%20Neededhttp://www.rtiperformance.com/download
  • 8/12/2019 RTI Enable Loadrunner

    4/23

    Overview How it WorksRTI 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 executionVirtual User

    Generator (VuGen) or a Load Generator as a part of a larger scenarioacross 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 dont. 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 InstrumentationRTI 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 inEnabling Performance Collection.

    The following is an example of a LoadRunner script after it has been instrumented by RTI:

  • 8/12/2019 RTI Enable Loadrunner

    5/23

    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:

  • 8/12/2019 RTI Enable Loadrunner

    6/23

    It is recommended but not requiredthat you define your LoadRunner Transactions prior to

    instrumenting your script with RTI. If calls to lr_start_transaction() are missing, RTI will provide deep-

    dive measurement for each LoadRunner web request; e.g. web_url(), web_submit_data(), etc

    Packaging and Execution through VuGen or ControllerAs part of theinstrumentationstep, 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 OverviewWith 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 CollectorMonitors and collects performance data for an application. Data is storedlocally.

    RTI ConsoleGathers data on-demand from the collectors. Stores gathered data into the RTIdata repository.

    Weve already installed RTI on our backend Web TierApacheHTTPDand our backend Application

    TierJboss.

    Our test environment looks like this:

  • 8/12/2019 RTI Enable Loadrunner

    7/23

    Enabling RTI in Tomcat and JBossEnabling RTI for your backend Web and Application tiers including Tomcat and JBoss on Windows or

    Linux is covered inuser-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 ConsoleTo start, invoke the RTI Console with StartAll ProgramsRTIConsole. You should see something like

    this:

    See the Welcome View on the right and the Collectors and RTI Workspace views on the left.

    http://www.rtiperformance.com/documentationhttp://www.rtiperformance.com/documentationhttp://www.rtiperformance.com/documentationhttp://www.rtiperformance.com/documentation
  • 8/12/2019 RTI Enable Loadrunner

    8/23

    Enabling LoadRunner Deep DiagnosticsBefore 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, well showthe RTI Console running on the same Windows host as VuGen and a

    LoadRunner Controller and Load Generator. Wellthen show a LoadRunner script that exercises an

    ecommerce application deployed within JBoss on a remote Linux Server.

    1. Invoke the RTI Console with StartAll ProgramsRTIConsole.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:

  • 8/12/2019 RTI Enable Loadrunner

    9/23

    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 thisscript, the default if left blank will be to use the script name. When finished, select Finish:

  • 8/12/2019 RTI Enable Loadrunner

    10/23

    6. The selected script has now been instrumented to be measured by RTI. For an overview ofthe RTI instrumentation process, please reviewLoadRunner 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 DiagnosticsAfter you have successfullyEnabled LoadRunner Deep Diagnosticsyou 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, well 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:

  • 8/12/2019 RTI Enable Loadrunner

    11/23

    You can now run this script directly from VuGen and RTI will trace each LoadRunner transaction end-to-

    end 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 executinglocalhostin this caseright-click to select the Host

    context menu and then select Refresh:

    The Console queries the RTI installation on localhostto discover what applications are monitored and

    you can now see that RTI has successfully initiated monitoring of my LoadRunner script:

  • 8/12/2019 RTI Enable Loadrunner

    12/23

    Working with a Separate Load GeneratorThe RTI Enterprise component must be installed on the Load Generator machine and the rshd service

    started as described in theRTI 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 inRTI for JBoss/Tomcat on Windows.

    Analyzing Collected Performance DataWeve now gotten set-up and are ready to start analyzing LoadRunner Transactions. To recap, weve

    completed the following steps:

    1. Enabled RTI in JBoss2. Enabled LoadRunner Deep Diagnostics3. Run our instrumented script through VuGen andDiscovered RTI Diagnostics

    If you skipped any of these steps or had problems, its best to go back and complete them or contact

    [email protected] questions before going further.

    Gathering Collected Performance Data for Analysis

    Now that we have executed an instrumented script through VuGen, lets bring the data into the Console

    for Analysis. Well select Transfer deep-dive performance data from the Welcome View:

    http://www.rtiperformance.com/user-guide/RtiWindowsInstall.htm#rshdhttp://www.rtiperformance.com/user-guide/RtiWindowsInstall.htm#rshdhttp://www.rtiperformance.com/user-guide/RtiWindowsInstall.htm#rshdhttp://www.rtiperformance.com/user-guide/RTIEnableJBossWindows.htmhttp://www.rtiperformance.com/user-guide/RTIEnableJBossWindows.htmhttp://www.rtiperformance.com/user-guide/RTIEnableJBossWindows.htmmailto:[email protected]?subject=Help%20with%20LoadRunner%20Deep%20Diagnosticsmailto:[email protected]?subject=Help%20with%20LoadRunner%20Deep%20Diagnosticsmailto:[email protected]?subject=Help%20with%20LoadRunner%20Deep%20Diagnosticshttp://www.rtiperformance.com/user-guide/RTIEnableJBossWindows.htmhttp://www.rtiperformance.com/user-guide/RtiWindowsInstall.htm#rshd
  • 8/12/2019 RTI Enable Loadrunner

    13/23

    We are now presented with the RTI Get Data Dialog:

  • 8/12/2019 RTI Enable Loadrunner

    14/23

    The Get Data Dialog presents a list of options including:

    Dataset Name: Deep dive data is transferred from the remote host performance collectors andstored 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 wantto transfer and analyze deep dive data?

    Filter: Should we filter any short running methods from our trace to reduce the amount of databloat in our analysis and let us focus on finding the main problems?

    Now may be a good time to refer to theArchitecture Overviewand 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:

    LoadRunneron localhost JBoss_Node1on lt3.ocsystems.com

  • 8/12/2019 RTI Enable Loadrunner

    15/23

    JBoss_Node2on lt4.ocsystems.com Apache HTTPDon lt1.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 inLinux 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 Overviewwhich contains a table of the measured

    Transactions as well as a chart visualizing overall performance:

    http://www.rtiperformance.com/user-guide/RTIEnableJBossLinux.htmhttp://www.rtiperformance.com/user-guide/RTIEnableJBossLinux.htmhttp://www.rtiperformance.com/user-guide/RTIEnableJBossLinux.htmhttp://www.rtiperformance.com/user-guide/RTIEnableJBossLinux.htm
  • 8/12/2019 RTI Enable Loadrunner

    16/23

    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 double-

    clicking 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:

  • 8/12/2019 RTI Enable Loadrunner

    17/23

    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 Divetab, 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.

  • 8/12/2019 RTI Enable Loadrunner

    18/23

    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:

  • 8/12/2019 RTI Enable Loadrunner

    19/23

    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 examplewhat 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:

  • 8/12/2019 RTI Enable Loadrunner

    20/23

    If the default configurations are not enough, you can customize the summary specifically using the

    Advanced option:

    SelectingAdvancedallows you to choose which metrics to summarize, what groupings or aggregations

    to apply and what functions to calculate (avg, min, max, count).

  • 8/12/2019 RTI Enable Loadrunner

    21/23

    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 orJBoss

  • 8/12/2019 RTI Enable Loadrunner

    22/23

    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 toRefreshthe 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:

  • 8/12/2019 RTI Enable Loadrunner

    23/23

    1. Switch to the Trace Policytab2. Select defaultunder Policies3. In Policy Details, selectAllas the Recording Policy4. Select Inject Changesto 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 MoreThis 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

    http://www.rtiperformance.com/documentationhttp://www.rtiperformance.com/documentationhttp://rtiperformance.com/faqhttp://rtiperformance.com/faqhttp://rtiperformance.com/see-rti-in-actionhttp://rtiperformance.com/see-rti-in-actionhttp://rtiperformance.com/see-rti-in-actionhttp://rtiperformance.com/faqhttp://www.rtiperformance.com/documentation