• No results found

Load Runner Architecture One Stop

N/A
N/A
Protected

Academic year: 2021

Share "Load Runner Architecture One Stop"

Copied!
22
0
0

Loading.... (view fulltext now)

Full text

(1)

Architecture Overview

LoadRunner works by creating virtual users who take the place of real users operating client software, such as Internet Explorer sending requests using the HTTP protocol to IIS or Apache web servers.

Requests from many virtual user clients are generated by "Load Generators" in order to create a load on various servers under test

These load generator agents are started and stopped by Mercury's "Controller" program.

The Controller controls load test runs based on "Scenarios" invoking compiled "Scripts" and associated "Run-time Settings".

Scripts are crafted using Mercury's "Virtual user script Generator" (named "V U Gen"), It generates

C-language script code to be executed by virtual users by capturing network traffic between Internet application clients and servers.

With Java clients, VuGen captures calls by hooking within the client JVM. During runs, the status of each machine is monitored by the Controller.

At the end of each run, the Controller combines its monitoring logs with logs obtained from load generators, and makes them available to the "Analysis" program, which can then create run result reports and graphs for Microsoft Word, Crystal Reports, or an HTML webpage browser.

Each HTML report page generated by Analysis includes a link to results in a text file which Microsoft Excel can open to perform additional analysis.

Errors during each run are stored in a database which can be read using Microsoft Access

Virtual Users (Vusers)

Unlike a WinRunner workstation which emulates a single user's use of a client, LoadRunner can emulate thousands of Virtual Users.

Load generators are controlled by VuGen scripts which issue non-GUI API calls using the same protocols as the client under test. But WinRunner GUI Vusers emulate keystrokes, mouse clicks, and other User Interface actions on the client being tested Only one GUI user can run from a machine unless LoadRunner Terminal Services Manager manages remote machines with Terminal Server Agent enabled and logged into a Terminal Services Client session.

During run-time, threaded vusers share a common memory pool. So threading supports more Vusers per load generator.

The Status of Vusers on all load generators start from "Running", then go to "Ready" after going through the init section of the script. Vusers are

"Finished" in passed or failed end status. Vusers are automatically "Stopped" when the Load Generator is overloaded. No additional license is needed to monitor standard web (HTTP) servers (Apache, IIS, and Netscape).

To use Web Services Monitors for SOAP and XML, a separate license is needed, and vUsers require the Web Services add-in installed with Feature Pack (FP1)

Product Versions

Version 9.10 installer, available Feb. 2008, is 2.31 GB after expansion. However, the folder created after an English language install is 931MB.

Version 8.1 Feature Pack 4 patch installer LR81FP4P136.exe at 7,786,800 bytes, was signed on January 2, 2007 as file 8.1.4.0 (Build: 1735) is Recorder Version: 1290

Note: Links to documents that used to be here were removed after Mercury Interactive, Inc. lawyers demanded their removal. Page numbers in online pdf files are different (have more pages) than page numbers in the paper document of the same title. Although version 9.10 is now installed under

(2)

1290.

Version 8.1 Feature Pack 4 installer LR81FP4.exe, at 194,644,720 bytes, was signed on December 15, 2006 as file version 8.1.4.0 (Build: 2249) is Recorder Version: 1289. This requires an upgrade to MS.NET 2.0 clients.

Version 8.1 Feature Pack 3 installer LR81FP3.exe, at 116,601,240 bytes, was signed on June 18, 2006 as file version 8.1.3.0 (Build 2085). It installs (as an item on your Start > Program Files) Microsoft WSE (Web Services Enhancements) 2.0 SP3 to deploy security policies for sytems running .NET Framework 1.1.

Version 8.1 became available October 2005. In VuGen it adds a "Workflow View", "Workflow Wizard", and a memory leak which is fixed with a patch downloadable since Dec. 2005. It renames the VuGen "Execution Log" the "Replay Log". Version 8.0 became available August 2004. It adds "Additional Attributes" to Runtime Settings. It also adds (for additional fee) diagnostics and tuning

capabilities, allowing Transaction Breakdown to breakdown transaction times across different servers servicing various transaction layers (web server, Oracle 11i & Peoplesoft 8 app server, database) layers. It separates SQL time in execute, parse, and fetch times.

Version 7.8 Feature Pack 1 added support for Windows XP. Version 7.8 became available September 2003.

Version 6.5 available June 2000 offered new "TurboLoad" technology -- a completely new replay engine that runs thousands of vusers using a single operating system thread.

Version 6.0 used a separate thread per user, which required almost 10 times more i/o and CPU cycles than 6.5.

"HP", "Mercury" remains under Program Files\Common Files, its \TDAPI\Client folder contains files TDCIntui.dll and tdclient.dll. These, the hidden folder C:\Config.Msi, the MacroVision folder (within Documents and Settings\All Users.WINDWS\Application Data), and many other files remain after uninstall.

Over three thousand entries also remain within the Windows Registry after uninstall.

Application Components' Requirements

Loadrunner makes use of four executables with different system requirements

Application Product Process Image Name V9.0 V8.0 Img KB File Size

Launcher LRLauncherApp.exe 15,840 16,288 n/a

Virtual User Generator VuGen.exe 23,980 12,436 2,334,769

Controller with On-Line Monitors wlrun.exe 61,312 13,076 5,681,215

Load Generator Agent magentproc.exe 3,336 3,236

magentservice.exe 3,496 65,536

mdrv.exe -

Analysis Analysisui.exe 64,460 13,132 6,058,496

Tuning Console protune.exe - 3,403,833

Console programs

perl5.8.0.exe Interpreter 20,535

regtlb.exe registers the batch automation type library 30,720 sed.exe GNU sed (gsed) version 2.05 55,296

wdiff.exe Compares text files 197,632

Alex Arbitman's LR 7.8 Footprints.xls reports that to run Web requires __ per process and __ per thread.

Using Windows Remote Desktop Connection

Remote Desktop Connection (part of the Terminal Services that comes with Winodows XP) is not as reliable with LoadRunner as Remote Administrator. To keep Windows Remote Desktop Connection sessions from timing out during a test, the Terminal Services on each machine should be configured as follows:

Click Start, point to Programs (or Control Panel), Administrative Tools and choose Terminal Services Configuration.

1.

Open the Connections folder in tree by clicking it once. 2.

Right-click RDP-Tcp and select Properties. 3.

Click the Sessions tab. 4.

Make sure "Override user settings" is checked. 5.

Set Idle session limit to the maximum of 2 days instead of the default 2 hours.

6.

Click Apply. 7.

Click OK to confirm message "Configuration changes have been made to the system registry; however the user session now active on the RDP Tcp 8.

Quality Web Systems: Performance, Security, and Usability (Addison-Wesley Professional; Aug. 2001) by Elfriede Dustin, Jeff Rashka, Douglas McDiarmid

The Web Testing Handbook (S T Q E Pub, Jan. 2001) by Steven

Splaine, Stefan P. Jaskiel, Alberto Savoia is a good

overview introduction, but does not make you an expert

(3)

HP's LoadRunner Support is part of OpenView Support. Among common problems installing LoadRunner: Windows 2003 & XP SP2 have a DEP (Data Execution Prevention) feature which prevents VuGen recording. Go to Control Panel, System -> Advanced tab, Performance section "Settings" button Data Execution

Prevention tab and add the client program or choose "Turn on DEP for essential

windows programs and services only." A reboot is required.

system registry; however, the user session now active on the RDP-Tcp connection will not be changed."

Make sure that when you do this you're not violating one of your corporation's security policies.

Terminal Server only allows two simultaneous connections. To disconnect from a session, do not click "X" on the remote desktop window but click Start and Log Off.

expert.

LR Installation and Configuration

Download [after required registration] the trial from the HP Download Center. I recommend that you put downloaded LoadRunner installation files and patches to a separate media such as a CD or USB drive. Then mark those files as read-only.

Disable your anti-virus software (Symantec, McAfee, etc.) before invoking on installers.

If you are running with an Intel chip, disable Intel Hyper-Threading technology by shutting down and entering BIOS. Microsoft's information on this.

Virus Detection engines may find that program regtlb.exe (which registers/unregisters type libraries) to contain a "virus" they call

"Backdoor.Win32.PoeBot.15872". Automatic repair by the virus remover will break those files

To avoid LR 9.x VuGen recording problems on Windows XP SP2 and Windows

2003, open Start > Control Panel > System, Advanced tab, click Performance settings. In the Performance Options Data Execution Prevention tab, select "DEP for essential services only", then reboot the machine.

The LR box comes with two CD's and this installation manual. Separate installation manuals are available for the

Controller and Analysis modules.

The Windows CD autostarts to this initial screen for v7.8 and this initial screen for v8.0

You can install just a single component (such as VuGen) by (ironically) selecting "Full install" and then the "Custom" option to check the specific components to install. However,

due to a strange bug with v8.0, before you do that, first install the Load Generator, then return to install "custom" components.

The UNIX CD installs only the Load Generator (not the Controller or VuGen) on UNIX machines because the Controller and VuGen only run on Windows machines.

Zero fill machine names to t001, ... t010, etc. The LR Controller sorts machines named t1, t2, ... t10 as t1, t10, t2.

Location of Program Files

The LoadRunner installation program adds files in Program Files, Windows folder, and the Windows Registry that are NOT removed during un-installation.

If you get a "License violation" message, you need to get from HP support a one-day license key to install with. Program Files (x86) is the default folder if you install LoadRunner on a 64 bit machine.

Different versions of LoadRunner are installed to different locations: LoadRunner 9.1 executable files are installed to file path "C:\Program Files\HP\LoadRunner\bin"

LoadRunner 8.1 and 9.0 executable files are installed to file path "C:\Program Files\Mercury\LoadRunner\bin"

LoadRunner 8.0 "stutters" when it installs to its default file path "C:\Program Files\Mercury Interactive\ Mercury LoadRunner\bin"

Note: Even though 8.0 uses a different folder, folders created by previous versions still need to be removed before its installation.

LoadRunner 7.8 executable files are installed to file path "C:\Program Files\Mercury Interactive\LoadRunner\bin"

When working with Java, instead of overridding these default installation folder to a path without spaces (such as C:\LR78) as recommended by KB article 11878, just use the equivalent DOS 8.3 file names:

For LoadRunner 8.1: C:\PROGRA~\MERCUR~1\LoadRunner\lib

For LoadRunner 8.0: C:\PROGRA~\MERCUR~1\MERCUR~1\lib

To quickly get at this LoadRunner installation folder, create an environment variable named "LR91" so you can use a quick command such as

cd %lr81%

To get at this folder quickly, I created a batch file named "L.bat" in the cmd's default C:\ root folder containing this:

cd \Program Files\Mercury\LoadRunner\bin

(4)

pause

I created a shortcut to this file on my desktop and dragged it over Windows so that I can click into that folder from anywhere. The pause command ensures that the command window does not disappear automatically. Alternately, from within a command window I can just type "L" and press Enter.

Files in Windows Folders

This path specified is stored under [ProductEnv] as M_ROOT in file wlrun.ini. This file was in the C:\WINNT (or C:\Windows) folder until v9.10, when it moved within the LR Config folder.

The C:\WINNT (or C:\Windows) folder also holds the Maintenance Number (MPN) specified during installation, stored as a parameter named "LoadRunner_SerialNumber" (such as 1234-1234567890) in the mercury.ini file.

Start Menu

Since LR 9.0, installers added links to the most used programs in > Programs > LoadRunner

Before that, LR installers added links to the most used programs in > Programs > Mercury Interactive > LoadRunner

However, some programs are installed which are not conveniently listed there, such as

WDiff.exe v1.49 to compare differences between two ASCII text files. It has an accompanying help file

Beginning with v7, LoadRunner prevents software piracy (much like Microsoft began doing with Windows XP) by requiring that a license key be provided within 10 days of installation. Mercury generates its license key based on a host ID generated on each computer. CPT12784.doc

With v7.x, to generate Generate a HostID key (such as "XCCWJU-APBE-BYDS") click down Programs > Mercury LoadRunner > LoadRunner > License tab

The key can be obtained before installation from program licidgenerator.exe and (after registration) its lm70.dll from the installation CD folder \lrunner\lm70.nt\bin or \lrunner\setup\lm70.nt\bin.

Sample Apps / Protocols

Running the samples install program populates folder C:\Program Files\Mercury Interactive\Mercury LoadRunner\

Copy the link location below into the "Program to record:" field:

Protocol Server Client Program Parameter Notes

Web WebTours\StartServer.bat http://localhost:1080/mercuryWebTours

COM/DCOM (Operating System) samples\bin\frsui.exe

Winsock sockfrs.exe samples\bin\flights.exe Winsock

WinSockWeb

ODBC (MS Access) samples\bin\flights.exe ODBC_Access

CORBA samples\CorbaSamples\server.cmd &

samples\CorbaSamples\server.bat

samples\CorbaSamples\client.cmd &

samples\Corbasamples\clientrecord.cmd StuartMoncrieff's article on CORBA

RMI samples\RMISamples\server.cmd &

samples\RMISamples\server.bat samples\RMISamples\client.cmd & samples\RMISamples\clientrecord.cmd

According to CPT11877.doc, JDK 1.5 users need to contact Mercury Support for a patch to each specific LoadRunner version (7.6, 7.8 FP1 or 8.0). Otherwise, you'll get these messages:

Error: Failed to find javac.exe Java Compiler in Path and JDK installation folder in registry. [MsgId: MERR-22981] Error: Failed to compile the Actions.java file. Please add the \bin to the path and try again. [MsgId: MERR-22996] Warning: Extension java_int.dll reports error -1 on call to function ExtPerProcessInitialize [MsgId: MWAR-10485]

Error: Thread Context: Call to service of the driver failed, reason - thread context wasn't initialized on this thread. [MsgId: MERR-10176]

The Java sample apps use the "flight32lr" User Data Source with Microsoft Access driver(*.mdb) in the USER DNS table in Data Sources(ODBC) of the VuGen's local machine.

Additionally, the sample Java servers must be operational prior to starting the client. This is done with the "samples\RMISamples\server.cmd": set lrpath=C:\PROGRA~1\Java\jre1.5.0_02\bin;C:\PROGRA~1\MERCUR~1\MERCUR~1\classes set lrclasspath=C:\PROGRA~1\MERCUR~1\MERCUR~1\classes;C:\PROGRA~1\MERCUR~1\MERCUR~1\classes\srv;C:\PROGRA~1\Java\jre1.5.0_02\lib\rt.jar set flightRmi=%~dp0;%~dp0RmiSamples.zip set classpath=%lrclasspath%;%flightRmi%;C:\PROGRA~1\Java\lib\rt.jar;.;%classpath% set path=%lrpath%;.;%path% cd %~dp0

start java -Djava.security.policy="%~dp0RmiFlights.policy" RmiFlights.Server

Note the location of loadrunner class files I added to the default sample. They are pre-pended to the existing classpath.

N t th t th i th fil th 27.

(5)

Note that there are no spaces in the file path.

The Zip file is equivalent to a JAR file in Unix systems.

Do not delete the black command window because the Java server runs within it.

CORBA and RMI Java clients are invoked with a command for Windows to start the java.exe program. This "samples\RMISamples\client.cmd" file contains:

set lrpath=C:\PROGRA~1\Java\jdk1.5.0_02\bin;C:\PROGRA~1\MERCUR~1\MERCUR~1\classes set lrclasspath=C:\PROGRA~1\MERCUR~1\MERCUR~1\classes;C:\PROGRA~1\MERCUR~1\MERCUR~1\classes\srv;C:\PROGRA~1\Java\jdk1.5.0_02\lib\rt.jar set flightRmi=%~dp0;%~dp0RmiSamples.zip set classpath=%lrclasspath%;%flightRmi%;C:\PROGRA~1\Java\jdk1.5.0_02\lib\rt.jar;.;%classpath% set path=%lrpath%;.;%path% cd %~dp0

start java RmiFlights.main

Note that the RmiFlights.main class file name is passed into java for it to load.

When recording Java with VuGen, a different command — such as the sample clientRecord.cmd — needs to be invoked because VuGen needs to be invoked within the JVM sandbox:

set flightRmi=%~dp0;%~dp0RmiSamples.zip set classpath=%flightRmi%;%classpath% cd %~dp0

start InvokeVugen.exe

The location of the JDK needs to be specified in the Windows PATH environment variable PATH to avoid this message:

Error: Failed to find javac.exe Java Compiler in Path and JDK installation folder in registry. [MsgId: MERR-22981] VuGen "Java Vusers" can only operate as Single Vuser mode (not multi-vuser).

Instead of web "Start recording", Java VuGen scripts invoke Java functions within the Actions section. "vuser_init" and "vuser_end" actions are not relevant within Java VuScripts.

Internally, the cjhook.ini file specifies which Java classes can hook in its [EXC_SYSTEM_CL] section. Java classes specified in the [SYSTEM_CL] section are not hooked.

The user.hooks file in LR \bin folder is a general format and cannot be used as-in. It needs to be copied.

Uninstall

To uninstall LoadRunner, you must be logged in with the same Windows userID as was used during original installation! If you use a different userid, the uninstall will delete only the dat folder which contains the "miuninst" file. Unlike Microsoft Office applications, Mercury has not programmed invididual components to be selectively uninstalled on its own.

LoadRunner Internal Architecture

This Visio 2002 file is based on LR8.0

(6)

application servers under test are placed under stress by 1.

driver processes mdrv.exe (the Multi-threaded Driver Process) and r3vuser.exe which emulate application clients such as Internet Explorer web brower. It performs 3 main actions:

Kli> cpp (C language pre-processor)

cci (C pre-compiling) which creaes a file with ci file, and 1.

execute using the driver for the protocol technology being tested. 2.

Runs can be invoked to run "silently" by invoking Mdrv.exe from a Windows batch script.

Mdrv can automatically stop loading Vusers because they communicate with Vusers and monitor CPU usage on Windows Load Generator machines.

A separate JVM is instantiated by each Java-based Vuser on Windows-based machines. Java Vusers are not supported on Unix platforms.

2.

virtual Vusers are invoked as groups (logical collection of virtual users running the same script on a specific load generator machine)

3.

by agents (3,900K magentproc.exe) running as a service or as a process

4.

on load generator client machines. 5.

Each machine hosting agents maintains an Execution Log in a .qtp file. 6.

When logging is enabled, the agent also creates within the results folder a sequential log file for each Vuser (segregated by Vuser group).

7.

During execution, this file is displayed in the view > Show Output window on the LoadRunner Controller machine. 8.

Upon a pre-set delay, the Scheduler running on a Controller machine instructs agents (via Windows port 54345 or dynamic Unix port) to initiate test session scenarios. The Controller (wlrun.exe) sends a copy of scenario files along with the request.

9.

Agents are launched by the Remote Agent Dispatcher process (formerly called Remote Command Launcher (RCL)) on each load generator machine.

10.

Each agent refer to scenario (.lrs) definition files to determine which Vuser groups and scripts to run on host machines.

This means the Controller can be started from a DOS batch (.bat) file (preferrably with a short name on a root drive):

REM Start Controller:

SET M_ROOT=C:\Program Files\Mercury Interactive\LoadRunner\bin cd %M_ROOT%

wlrun.exe -TestPath D:\Dev\Dev1.lrs -port 8080 -Run -DontClose pause Press Ctrl-Z to keep this window or

Including the -Run parameter is the same as manually pressing the "Start Scenario" automatically upon

invocation. This is not a good idea because you may have to decide about collating the file from a previous run or want to change the output folder.

This assumes that the system's environment PATH variable was updated to include where LoadRunner is installed.

11.

The Controller is invoked using parameter values within files in the Windows OS folder (WINNT for Windows 2000 and WINDOWS for Windows XP). The Windows folder is used because LoadRunner is designed to have only one instance of Controller running at a time on a machine.

To quickly switch among several applications, save a copy of LoadRunner's ini files after working on it within the Controller, then use Notepad to craft a batch file to copy application-specific versions of ini files before executing wlrun. An example of file copy actions for application XXX:

copy %LRDir%/config/wlrun7-XXX.ini %LRDir%/wlrun7.ini copy %LRDir%/config/wlrun7-XXX.dft %LRDir%/wlrun7.dft Prior to v9.0:

copy %WinDir%/wlrun7-XXX.ini %WinDir%/wlrun7.ini copy %WinDir%/wlrun7-XXX.dft %WinDir%/wlrun7.dft Some defaults you might want to change:

In the wlrun7.ini file file [output] section, MaxNumberOfOutputMessages= from 10000 to 100000 for long runs. This limits the number of output messages stored in the database.

MaxOutputUIRowsToShow limits the amount of messages/errors (lines) displayed in the Controller's Output window.

In the QTWeb.lrp file within the LoadRunner Program Files dat\protocols folder section [Vugen], add entry

MaxThreadPerProcess=5 to limit the number of threads managed by each load generator mdrv.exe process.

Values for DefaultScenarioDir, DefaultScriptDir, DefaultResultDir, and [Recent File List] stored in the wlrun5.ini

and wlrun7.dft files updated whenever values are changed within the Controller. 12.

The blocks of actions taken by each Vuser are 13.

defined in Vu scripts created using Loadrunner's VuGen.exe. When this program is invoked, it stores in the Windows folder a comparamui.INI file to save under "[LastTablesUsed]" a history of files and

[ParamDialogDates] specified using menu option Insert > New Parameter > Dates.

VuGen stores and retrieves a vugen.ini file in the Windows folder. When using Java, enable additional debug options:

[DynaDlg] 14.

(7)

JavaLevel=3

When using 8.0 scripts within VuGen 8.1, add to Vugen.ini: [Editor]

OLDEDITOR = 1

VuGen opens in LR folder template/qtweb default.cfg and script files.

Vu scripts can be coded to use variable values obtained from parameter files external to the script. I have a lot more on VuGen here

During a run, execution results are stored to a results folder.

I prefer to set Results Settings to "Automatically create a results directory for each scenario execution." which means that LR will increment the name of the Results Name when I start a scenario runs. For example, a value of "Res11" will be automatically incremented to "Res12" or sometimes "Res11-1".

Errors are written to the output.mdb MS Access database. See the ASP page I have written to access this database

15.

Within each results folder, a "Log" folder is automatically created to contain a log file for each group. After a run, to view a log file from within the Controller, click then right-click on a group to select "Show Vuser Log". 16.

As a scenario is run, monitors maintain counters locally on each host. 17.

After a run, the "collate" process takes .eve and .lrr result files and creates in the results folder a temporary .mdb (MS-Access ) database.

To prevent errors when processing large result files, use MSDE (Microsoft SQL Desktop Engine). Don't install it from the Add-in folder on the LoadRunner 7.8 CD, which is obsolete SQL7. Download MSDE 2000Release A which includes MSDE 2000 Service Pack 3a and MDAC 2.7 SP1a for use by Analysis on any Windows machine. Extract the file and share that folder. Open a command window to run a command such as:

setup SAPWD="StrongPassword" INSTANCENAME="LR" SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0 /L*v path to log file Using Windows Explorer, share the Data folder.

Then in Analysis Options > Database tab, use 8.3 names without spaces (indentified with DOS command DIR /X): Input the SAPWD password specified above.

1.

Logical Storage location: \\loadclient02\Data (the folder you shared) 2.

Physical Storage Location: C:\PROGRA~1\MICROS~1\MSSQL\Data (not C:\Program Files\Microsoft SQL Server\MSSQL\Data)

3.

Click "Test parameters". (This takes a few seconds) 4.

18.

The Analysis Module (8,320K analysisu.exe) 19.

generates analysis graphs and reports using data from the .mdb database. 20.

The LoadRunner Results file results_name.lrr from each scenario run -- also called an Analysis document file -- is read by the Analysis program to display Percentile graphs.

21.

By default, the LRReport folder is created in the test analyst's local machine My Documents folder to store Analysis Session files.

22.

They can optionally be formated in HTML. 23.

Their format are controlled by a .tem template file. 24.

Optionally, Mercury's Remote Performance Monitoring (RPM) MS-IIS/ASP web server for LoadRunner 7.8 can be installed on a Windows 2000 server ( but not on a Windows 2003 server) so that

25.

load test results to be viewed using a web browser.

Not pictured is the LoadRunner Tuning Module (a separate $50,000 product). Mercury's "Get Ready" white paper

26.

Load Generator Agent Process vs. Service

During installation, at the User Login Settings screen:

selecting "Allow virtual users to run on this machine without user login" means the LoadRunner agent will be run as a SYSTEM service named "LoadRunner Agent Service". From within Window's Perfmon, this image is named magentservice.exe.

For better security, specify a separate service account userid and password so that permissions for it can be limited.

After installation, to tell if it's running , bring up the Windows Services list:

On Windows 2000, go to Start -> Control Panel -> Administrative Tools -> Services.

On Windows NT4, go to Start -> Control Panel -> Services

You also need to enter the Services list to change the password or to unset the service as "Automatic".

selecting "Manual log in to the Load Generator " means the LoadRunner agent will be run as a process named magenproc.exe. This approach means you need to invoke the Load Generator from LoadRunner's \launch_service\bin folder

every time you boot-up that machine: magentproc.exe

You can tell it's running by the "satellite dish" icon in the Windows task bar at the lower right corner of your screen.

(8)

To get the Agent to start up automatically after reboot, create a shortcut to it in the Programs\Startup folder.

As a process, the Windows operating system constrains the agent service from running GUI (WinRunner, QuickTest Professional, etc.) or GUI-like scripts (Citrix, SAPGUI, etc.). Therefore, GUI and SAP Vusers cannot run if the Remote Agent Dispatcher is installed on the Load Generator machine as a service rather than as a process.

After installation, to switch from running LoadRunner as a service to running as a process:

cd \PROGRA~1\MERCUR~1\MERCUR~1\ LAUNCH~1\bin magentservice.exe -remove

To install LoadRunner as a service:

magentservice.exe -install

These commands do not result in response messages. But they do put the m_agent_attribs.cfg file in the load generator's C:\ root folder.

If you do not have Administrator rights and try to change the UserID: Admin and Password: Admin, you will see message ERROR: "29972:- Failed to reset launcher status call back function reason:no monikor was passed.

On a UNIX machine, the agent is configured by editing the br_Inch_server.cfg file in the dat folder under the LoadRunner root folder.

Confirm & Ensure Agent Readiness

At the Controller's Load Generators dialog, you should see "Ready" (for the agent you highlighted) after you click the "Connect" button.

Repeat these commands if you get message "Failed to connect to the agent. Load Generator not responding after timout Command line that was executed:" If this still doesn't result in "Ready" Status, go to Windows Services on the load generator client machine and kill, then remove the "LoadRunner Agent Service" before repeating the above commands.

Set FireWallServiceActive to 1 for true or 0 for false. Run bin/agent_config

Using network drive mappings

If several load generators need to access the same physical files, rather than having to remember to copy the files each time they change, each load generator can reference a common folder using a mapped drive. But since drive mappings are associated with a specific user:

Logon the load generator as the user the load generator will use 1.

Open Windows Explorer and under Tools select Map a Network Drive and create a drive.

It saves time and hassle to have consistent drive letters across load generators, so some organizations reserver certain drive letters for specific locations.

2.

Open the LoadRunner service within Services (accessed from Control Panel, Administrative Tasks),

3.

Click the "Login" tab. 4.

Specify the username and password the load generator service will use. (A dot appears in front of the username if the userid is for the local domain). 5.

Stop and start the service again. 6.

Controlling Load Generators and Monitoring Through a Firewall

The purpose of a firewall is to increase security by blocking communications and allowing communications only certain ports, such as 80 and 443 for HTTP and HTTPS traffic.

By default, the LoadRunner Controller uses TCP port 50500 to send data to TCP port 54345 on the Windows Load Generator.

The Load Generator sends information back via a dynamic port. through the MI Listener.

To avoid having to beg Network Administrators for more ports to be opened, on each load generator machine inside the firewall, from Start > Programs > ... LoadRunner > Advanced Settings > Agent Configuration

(launch_service\bin\AgentConfig.exe) install the (Monitoring Over Firewall machine) MoFW/RoWF agent. Check the option "Enable Firewall Agent". It collects performance counters and sends them to a controller over a firewall. LoadRunner 7.8 automates what LoadRunner 7.6 and earlier versions

required you to go into "Agent Settings" to change the mdrv.dat file within the dat folder where LoadRunner is installed The [FireWall] section should

(9)

the dat folder where LoadRunner is installed. The [FireWall] section should be changed to contain "FireWallServiceActive=1". This should cause the tiny stoplight to turn green in the agent icon on the toolbar.

br_lnch_server.cfg

MoFW communicates with the MI Listener through port 443, so you can't have any web servers (like Apache WebTours, IIS, or Oracle HTTP servers) running on both the machines.

Verify whether port 443 actually allows communication by running command and substituting the ip address in:

telnet 194.194.194.194 443 This should open a telnet window.

UNIX Load Generator uses a dynamic port that cannot be fixed.

When defining a "remote" load generator from within the Controller, click "Details" for the "Load Generator Information" dialog, where you can click the "Firewall" tab and check "Enable Firewall".

Monitors on Windows & UNIX/Linux

Monitoring UNIX Machines

Before starting a run on Linux, check to make sure that rstatd monitors are active. If rstatd services are dropped when a server becomes too busy or is restarted, LoadRunner 7.8 does not attempt to re-acquire information from rstatd. The work-around is to exit and reinitialize the Controller again.

MI Listener for HTTPS/SSL Traffic

When agents send HTTPS traffic (through port 443) from behind a firewall, it uses the "Monitoring over Firewall Component" and the Controller communicates uses a symbolic name for the agent through Mercury Interactive's MI Listener Machine (through port 50500) outside the firewall. Monitoring of Windows machines through a firewall use TCP port 139.

To test outside the firewall mercuryinteractive.com/products/protune_ds/ Mercury ProTune Delivery Service

The monitoring of Web services

Web Services Load Testing Guide by Mercury Interactive

VuGen Recording & Scripting

LoadRunner script code obtained from recording in the ANSI C language syntax, represented by icons in icon view until you click Script View.

Before recording against applications running within Microsoft's .NET Framework \ runtime on Window XP platform using LoadRunner7.8:

Back up trpfnc32.dll in the LoadRunner\bin directory. 1.

On the LoadRunner 7.8 CD, navigate to the \Patches\Trap_for_.net_patch folder.

2.

Copy trpfnc32.dll to the LoadRunner\bin directory. 3.

File Locations

I recommend that you store all files to a drive letter you created (by mapping to a folder). This makes it easier to override LoadRunner's defaults initially and also easier to remain consistent when you change machines and drives over time, especially when several testers use LoadRunner.

By default, .htm and resource files captured during a script's development are stored in a data folder created for each script under folder X:\Program Files \ Mercury Interactive \ LoadRunner \ scripts.

Each script's run-time settings are stored in that script's .cfg file within each Vuser

script's directory for use by both VuGen.exe and the LR Controller. VuGen stores and retrieves Windows Registry HKEY_LOCAL_MACHINE \SOFTWARE \Mercury Interactive \LoadRunner key RecentScripts every script.

VuGen also stores and retrieves Windows Registry key Test Results \ Recent File List the location of every .qtp file generated.

The maximum number of scripts displayed in the Available Scripts list is stored in Registry key HKEY_CURRENT_USER \ Software \ Mercury Interactive \ RecentScripts \

max_num_of_scripts

Each Vuser can apply a different weighting to iterate some action files more frequently than others.

Data File Locations

By default, data files (containing URLs, userids, etc.) created within a script

Creating LoadRunner Vuser Scripts online guide

My LoadRunner Vu Scripting notes

Within the .usr file:

Type=General-Java for "Java Vuser" and Type=Rmi-Java for "RMI-Java"

(10)

y , ( g , , ) p reside in that script's folder. I like leaving it there rather than moving it to the common root shared by all scripts because VuGen automatically copies those files when you save or import a script. Plus, changing the data structure of a common file disables previous versions of the script.

I like random access to data files because it's a easy way to test multiple values from within VuGen — I just run the script again. However, since VuGen always uses the first value when Sequential access is specified, to exercise multiple values I have to either change the data file or run the script again within the Controller.

Browsers

Browser Type Browser Version Platform

Microsoft Internet

Explorer 7.0, 6.0, 5.5, 5.01, 5.0, 4.0 HP-UX, Unix, SunOS, Win32, Windows, WinNT,WinXP Mozilla Firefox 1.5.0.6, 1.5.0.4, 1.5, 1.0.7, 1.0.6,

1.0

Netscape Navigator 6.2, 6.0, 4.76, 4.6, 4.5, 4.0

Run Results Files

By default, VuGen creates a new user named after the current user name. For example, a user named "Tester" will have run results under the C:\Documents and Settings\ folder for a user named Tester.LOADTEST. VuGen automatically sets the Windows environment variable TEMP to %USERPROFILE%\Local Settings\Temp so that results are written to that user's sub folder \Local Settings\Temp. The full path for user Tester would be

C:\Documents and Settings\Tester.LOADTEST\Local Settings\Temp

Results from each LR run is stored in its own folder under the "Results" folder. When the Controller's Result Settings are changed, an .lrr (LoadRunner Results) file is created in the directory specified in File > Save. Within this file's [Data Collection] section, FullData=1 enables viewing of whatever data was saved. If this value is FullData=0 LR will not look for run results.

When the scenario is started, it is updated with a start time in UNIX date format , such as:

[Scenario]

Start_time=1018300521

In the Controller machine's Results folder specified for a run, the

remote_results.txt (ASCII) text file lists the file path to the events (.eve) file automatically generated for each host name (ip address). Example:

[Hosts]

10.0.95.109=d:\temp\brr_BGf.453\netdir\d\ecom\ecom1_s3\res3\10.0.95.109_20.eve

KB article 11367 notes that the _t_rep.eve events file contains binary Vuser and rendezvous info. There is a localhost_1.eve host event file for each agent host. Their first line contains:

28 11 1018300521 2 4627103 22735576 5481115"

The 11 in the example above is the event code to start the scenario. The 1018300521 is the start time.

KB article 22538 notes that if this is not the same as the start time in the .lrr file, a "Fatal error" will occur when opening an Analysis file.

The vuser.cfg configuration file contain run-time settings (think time, iterations, log, web) set within VuGen.

The vuser.usp log file contain the script's run logic, including how actions sections run

The off_1.def definition file for graphs that describe online and other monitors.

The collate.txt file lists the paths to result and Analysis collation files. The output.mdb output MS-Access database file created by Analysis The offline.dat data file of sample monitor information.

The log folder contains -- when logging is enabled -- res_dir\output.txt message files generated during replay under a folder for each group which contains a folder for each Vuser in that group.

The sum_data folder contain graph summary .dat files.

If the lr_end_transaction command does not use exactly the same name as its corresponding lr_start_transaction name, all subsequent actions will be under that transaction.

If an Web SSL script works in the Controller but not vuGen, try changing the controller's Runtime Settings Preferences to "WININET replay instead of Sockets". To enable VuGen to record nca_java_action and other functions against Java objects, the application server needs to be configured to provide the necessary data. To do this, edit the startup HTML file that is called when the applet viewer begins. Modify the line:

VuGen Test Results viewing

Mercury KB article 11367

on "Manual collation of result set data" explains this in detail.

(11)

<PARAM name="serverArgs ... fndnam=APPS"> and add the Oracle key "record=names":

<PARAM name="serverArgs ... fndnam=APPS record=names">

Controller Scenarios

Scenarios are specified within the Controller

Scenarios encapsulate the Vuser Groups and scripts to be executed on load generators at run-time.

Manual scenarios can distribute the total number of Vusers among scripts based on the analyst-specified percentage (evenly among load generators).

Goal Oriented scenarios are automatically created based on a specified transaction response time or number of hits/transactions-per-second (TPS). Test analysts specify the % of Target among scripts.

Run Scenario Types

This table summarizes the typical settings for each type of run scenario

Menu Setting A. Speed B. Contention C.

Overload D. Longevity

Controller # of Iterations 1 only Several Infinite

Run Options Frequency of output:

Sample once every 1 second 10 seconds 1 minute 5 minutes Run-time

Settings Vusers 1 only max.licensed # below "knee"

Logging For

debugging No

Think Time None Randomized

Actual

Continue on error? No Yes

Network Speed Simulation Maximum No

Browser (cache) emulation No Yes

Content Checks Yes No

Schedule Ramp-up: Load all Vusers

simultaneously Yes

Initialize Before Run? No Yes No

- Interval (seconds) 4 >4 30 or

more Tools > Options >

Monitors Server Resource Monitors: DataSampling Rate 3 seconds (Default) 5 minutes

When scheduled to Run until completion, the Quantity for a Scenario is the number of vusers running one at a time.

When scheduled to Run for a period of time, the Quantity for a Scenario is the number of vusers running simultaneously.

The time specified begins after the Ramp Up period, when all vusers have entered Run state. This specified time plus the time it took to get all vusers into Run state becomes the total Elapsed Time of a time-limited run.

To run a specific number of vusers simultaneously, set the Parameter file in the script (in VuGen) to Abort after reaching the end of file.

Scenario Settings

Scenario Run Time Settings make use of Run logic scripts plus:

Pacing of how soon to start a new iteration (__ seconds after the previous iteration ends or at certain intervals).

Logging - AdvancedTrace

Think Time

Miscellaneous Continue on error? Fail open transactions on lr_error_message

Under Network Speed Simulation of bandwidth, selection of anything other than "Maximum available" requires a separate WAN Emulator license purchase to mimic WAN/Internet by slowing, dropping, and changing packets between client and server. With the license, you can choose custom, or these rated speeds:

14.4 Kbps (Analog modem) 28.8 Kbps (Analog modem) 56 Kbps (Analog modem) 64 Kbps (ISDN) 128 Kbps (Dual ISDN) 512 Kbps (DSL)

Browser Emulation: Simulate browser cache?

Internet Protocol of Proxy or use of ContentCheck application

(12)

The Controller saves these settings in the .lrr file specified in the Results Settings dialog.

Advanced Trace

If Run-Time Settings has the "Advanced Trace" checkbox selected before the script is run, these lines will appear in the output log:

UTC (GMT) start date/time : 2005-08-02 02:31:30 [MsgId: MMSG-26000] LOCAL start date/time : 2005-08-01 21:31:30 [MsgId: MMSG-26000] Local daylight-Savings-Time: Yes [MsgId: MMSG-26000]

Some of the Run-Time Settings: [MsgId: MMSG-27142] Run Mode: HTML [MsgId: MMSG-26845]

Download non-HTML resources: Yes [MsgId: MMSG-26845] Verification checks: No [MsgId: MMSG-26845]

Simulate a new user each iteration: Yes [MsgId: MMSG-26845] Non-critical item errors as warnings: Yes [MsgId: MMSG-26845] WinInet replay instead of Sockets: No [MsgId: MMSG-26845] HTTP version: 1.1 [MsgId: MMSG-26845]

Keep-Alive HTTP connections: Yes [MsgId: MMSG-26845] Max self Meta refresh updates: 2 [MsgId: MMSG-26844]

No proxy is used (direct connection to the Internet) [MsgId: MMSG-27171] DNS caching: Yes [MsgId: MMSG-26845]

Simulate browser cache: Yes [MsgId: MMSG-26845]

Cache URLs requiring content (e.g., HTMLs): Yes [MsgId: MMSG-26845] Additional URLs requiring content: None [MsgId: MMSG-26845] Check for newer versions every visit to the page: No [MsgId: MMSG-26845] Page download timeout (sec): 120 [MsgId: MMSG-26844]

Resource Page Timeout is a Warning: No [MsgId: MMSG-26845] ContentCheck enabled: Yes [MsgId: MMSG-26845]

ContentCheck script-level file: "C:\...\LrwiAedScript.xml" [MsgId: MMSG-26842] Enable Web Page Breakdown: No [MsgId: MMSG-26845]

Enable connection data points: Yes [MsgId: MMSG-26845] Process socket after reschedule: Yes [MsgId: MMSG-26845] Snapshot on error: No [MsgId: MMSG-26845]

Define each step as a transaction: No [MsgId: MMSG-26845] Read beyond Content-Length: No [MsgId: MMSG-26845] Parse HTML Content-Type: TEXT [MsgId: MMSG-26845]

Graph hits per second and HTTP status codes: Yes [MsgId: MMSG-26845] Graph response bytes per second: Yes [MsgId: MMSG-26845] Graph pages per second: No [MsgId: MMSG-26845] Web recorder version ID: 5 [MsgId: MMSG-26844]

"[MsgId: MMSG-26842]" in LR 8.0 was "[MsgId: MMSG-26844]" in LR 7.8 "[MsgId: MMSG-26844]" in LR 8.0 was "[MsgId: MMSG-26846]" in LR 7.8 "[MsgId: MMSG-26845]" in LR 8.0 was "[MsgId: MMSG-26847]" in LR 7.8

Log Files

One of the most common headaches with load testing is running of hard disk space during a long run.

If a transaction fails, search the load generator machine for log files containing text such as

xxx" ended with "Fail"

where xxx is the last few characters of the transaction name. LR vuGen stores logs (for a "null" user) in the "output.txt" file. LR Controller stores logs for each vuser within a folder hierarchy

starting from the folder specified when defining Generators.

Then under that folder the Generator creates folders with names such as "brr_rf2.63".

Under each of those folders is a netdir folder, which contains the folder specified for Results within the Controller.

When log files grow beyond a megabyte, Notepad cannot open the file. So you need a text editor program that does not try to load the entire file into memory before displaying it, such as Freeware Edit Pad Lite from gsoft or HexEdit

Efficient Search from Sowsoft works faster than Microsoft's search, and retrieves your specifications it stores in the Windows Registry.

Controller Schedules

One minor irritation with the Schedule UI is that different words are used for selections are summarized. Ramp down is not shown at all on the summary page.

Groups exists with a scenario. So "Scenario Scheduling" involves changing settings for all groups.

Mode: Scenario Duration: Load Behavior:

Scenario Scheduling __ Schedule by Scenario:

Within Duration tab: __ Run Until Completion __ Run for ________ HH:MM:SS __ Run indefinitely (forever)

Within Ramp Up tab:

__ Load all Vusers simultaneously (default) __ Start __ Vusers every ___ HH:MM:SS Within Ramp Down tab (if Run for limited duration):

__ Stop all Vusers simultaneously __ Stop __ Vusers every ___ HH:MM:SS Group Scheduling

__ Schedule by Group (for each script):

Unknown duration Defined per scenario group

__ Initialize all Vusers before Run?

One way to determine appropriate ramp up time to specify is to set vusers to start simultaneously, then look at the resulting rate Running Vusers drop off after processing (such as 10 users within a 15 second span).

(13)

Controller Online Graphs

LR allows up to 16 graphs to display in the Run tab. I like to use all 16 of them with metrics in this arrangement:

Transactions Secondary System Resources

Runtime: Running Vusers

+ # Connections Error Statistics UNIX Load Avg WinThreads

Transaction: Response Time

(sec) - UNIX CPU Util Win CPUUtil

Total Trans/Sec per Second+ SSL Hits + Pages Downloaded + Connections UNIX Paging

-Throughput (bytes) Network Delay UNIX DiskTraffic

Merging Graphs

In both the Run chart and Analysis graphs, I prefer to merge into a single graph "Response Time" and "Running Vusers" and/or "Number of Connections".

These are usually the most important relationships under study.

Per Second Graphs

I also merge "Per Second" metrics together on one graph:

"Hits per Second" — the number of hits on the Web server (y-axis) as a function of the elapsed time in the scenario (x-axis). This graph can display the whole scenario, or the last 60, 180, 600 or 3600 seconds. You can compare this graph to the Transaction Response Time graph to see how the number of hits affects transaction performance.

"HTTP Responses per Second" — the number of HTTP status codes, which indicate the status of HTTP requests, for example, "the request was successful," "the page was not found" returned from the Web server during each second of the scenario run (x-axis), grouped by status code.

"Pages Downloaded per Second" from the server during each second of the scenario run. This graph helps you evaluate the amount of load Vusers generate, in terms of the number of pages downloaded. Like throughput, downloaded pages per second is a representation of the amount of data that the Vusers received from the server at any given second.

"Pages Downloaded per Second" from the server during each second of the scenario run. This graph helps you evaluate the amount of load Vusers generate, in terms of the number of pages downloaded. Like throughput, downloaded pages per second is a representation of the amount of data that the Vusers received from the server at any given second.

Total Transaction per Second (Passed) Total Transaction per Second (Failed) Connections + SSL

LR does not remember most scenario graph settings (4 graphs is the hard coded default). So instead of building graphs from scratch, I start from opening and then changing my custom but standard scenario file.

Delete graph definitions you don't need to ever see. LR collects data for graphs even if it is not displayed.

KB 26817: By default, the Controller online monitor shows a maximum of 20 measurements for each graph. To increase it, go to the LoadRunner\dat\online_graphs directory to modify the value of MaxDispMeasurments= in the file controlling each type of graph:

Description File Name

All generalsettings.ini

System Resource Graphs online_resource_graphs.rmd Runtime Graphs online_runtime_graphs.def Transaction Graphs online_transaction_graphs.def Web Resource Graphs online_web_graphs.def Streaming Media online_web_graphs_mms.def

Default counters for the System Resource, Microsoft IIS, Microsoft ASP, or SQL Server monitors are defined in the res_mon.dft file within the LoadRunner/dat folder. Its values can be pasted from the [MonItemPlus] section within scenario .lrs files.

UNIX Resources and some other graphs are continuously updated even after the test is done. So immediately after the scenario runs, right-click on the graph to freeze the values displayed to lock in values associated with other graphs.

Installation tip: If the Web Resource Graph is blank, try re-registering .dll files by running MS-DOS Batch Files resister_controller.bat and set_mon.bat in the LoadRunner\bin folder.

Actions are executed sequentially in the order shown in Run-time Settings. However, transactions that start and stop between two observations will appear to be running simultaneously even if they were actually executed sequentially. An observation interval of 4 seconds is the most often that you can set for Controller on-line graph (to prevent too much CPU-intensive graphic refresh time from consuming the Controller machine). But Analysis reports will show more granularity than on-line graphs — down to 1 second.

(14)

Protocol Graphs & Script Prefixes

The Controller is invoked based on values in the wlrun5.ini file within the WINNT (Windows OS) folder. Services are listed

here in order of appearance in the Controller's Available Graphs pane. VuGen records general function names with prefix lr_ in C or lr. in Java for CORBA/RMI Vusers. Other prefixes:

Called Service [Graph]

Protocol/Product Templatefolder Header Notes

Custom / General C [WebJS] lrc lrun.h,

global.h

Visual Basic General-Vba

VBscript type scripts General-Vb

Javascript Vuser General-Js global.js

Java General-Java -E-Business Web Resource (eBusiness) [HTTP]/HTML, SSL, Web Services http, web, General-Js as_web.h FTP FTP mic_ftp.h (Operating)

[System Resource] Paging, Disk, Queue, Processor, Thread), Microsoft (Memory, Network, System, NTDS, Objects,Windows DHCP/IAS, UNIX, SNMP, Antara Flame Thrower, SiteScope

-

-[Network] Winsock Proxy, Network Delay Time winsock

WinSockWeb lrs.h

[Firewalls] CheckPoint Firewall-1 (no Cisco?) -

-[Web Server

Resource] Apache, iPlanet/Netscape, iPlanet (SNMP), MS-IIS -

-[Web Application

Server] (4.5-5.4 & 5.5-6.x) Ariba, ATG Dynamo, , ColdFusion, BEA WebLogic, FujitsuMS ASP, ASP.NET, Broadvision INTERSTATE, iPlanet (NAS), Oracle9iAS HTTP Server, SilverStream, WebLogic, IBM Websphere (4.x-5.x & EPM)

-

-Client/Server [Database Server Resource]

IBM [DB2_CLI], MSSQLServer 2000/ 7.5, ODBC,

Sybase CTlib, Sybase Dblib

Siebel DB2 CLI, Siebel MSSQL, Siebel Oracle

Siebel_web lrd.h lrdtypes.h

Oracle NCA Oracle_NCA orafuncs.h

[Streaming Media] Media Player Client / Windows Media Server - mic_media.h

Real Client, Real Server real lreal.h

[ERP/CRM Server

Resource] SAPGUI, SAP Portal, SAP CCMS PeopleSoft (Tuxedo) Sapgui,SAP_Web as_sap.gui.h Siebel Web Server,

Siebel Server Manager

- lrdsiebel.h Baan baan -Distributed Components [Java Performance] J2EE, CORBA-Java - -[Application

Component] Microsoft COM/DCOM, COM+ com

.NET CLR dotNet

-Enterprise Java

Beans EJB, RMI-Java -

-[Application

Deployment] Citrix ICA MetaFrame XP Citrix ctrxfuncs.h

[Middleware] IBM WebSphere MQ (WMQ)messaging (using

CommerceQuest, Inc.MQTester & MQMonitor avail. since Sep. 2003)

-

-MSMQ , Tuxedo, Jacada -

-Mailing POP3 POP3 mic_pop3.h

SMTP (Simple Mail Transfer Protocol) - mic_smtp.h

IMAP (Internet Messaging) IMAP mic_imap.h

MAPI ( MS Exchange) MAPI mic_mapo.h

(15)

-Service Summary Counter Components ASP

Requests Volume: Total count of requests spanning the elapsed time (T) over an entire run Not Found Rejected Errors (Accepted & Completed) Pipeline Queue Length:

Current (instantaneous count of) Requests

Queued (waiting) Executing Residence Time seconds

transactions spend at the server Wait time Service time Utilization percentage the server

provides services Waiting

Busy Throughput Rate of completions per second Requests/sec Transactions/sec Errors/sec (valid/sec.) g , ,

LDAP (Lightweight Directory Access Protocol) LDAP mic_mldap.h

Application

Services Tuxedo - lrt.h

MS-Content Management Systems -

-Wireless i-Mode I_Mode

VoiceXML voiceXML

WAP wap

Legacy Terminal Service

327x (IBM mainframe) UNIX RTE (Remote Terminal Emulation)

rte lrrte.h

Application Traffic Management

F5 BIG-IP -

Transactional Web Request Counters

It can be confusing to look down a list of counters. So I developed this table to visualize the difference among counters for a single service. Counters for the ASP service is typical of all other counters its aspects: Volume, Pipeline Queue Length, and Throughput Rate of completion.

Component counters on the right column should total to the value of the summary counter on the left. A total counter is broken down into detail counters. Metrics in parentheses, such as (Accepted), are not collected by the system because they are assumed and can be derived by subtracting from the total all other related counters.

ASP metrics does not include Residence time (the sum of Wait time and Service time) and Utilization.

The $800 SPECweb99 (v1.0 announced 1999) and

SPECweb99_SSL (March 2002) pre-defined workload generators benchmark the number of WWW server connections per second specific hardware

configurations can sustain require a sustained throughput of 400 and 320 Kbps in order for its measurements to be considered conforming.

An Analysis of Web Server Performance" http://www.research.ibm.com/people/i/iyengar/ton04.pdf by IBM Master Inventor Arun Iyengar

The free Mindcraft WebStone 2.5 benchmark improves on the 1995 version originally from Silicon Graphics by also simulating the activity of 100's of web clients on a computer making GET calls to CGI and server API as well as static HTML pages. Its run rules currently does not support POST, SSL, Authentication, HTTP 1.1, HTTP 1.0 keep-alives, Cookies, dynamic workloads with database access.

Sample Test Results of runs using Web Server Stress Tool from network monitoring company Paessler Web Performance

The TPC (Transaction Performance Council's) TPC-W Web eCommerce benchmark (first announced July 2000 & with v1.8 published Feb 2002) measures the number of Web Interactions processed Per Second (WIPS) from a "Web Interaction Mix" of Shopping (WIPS), browsing (WIPSb) and ordering (WIPSo) transactions simulating a retail bookstore with 14 web pages, including shopping cart functionality. The top audited price/performance result on 01/28/02 is a

TCO-based range of US$24.50 - $277.08/WIPS using IIS5 & SQL2000 within Windows 20003AS on a Dell server. Audited performance characteristics are detailed by web server, web cache, database server, and image server. The benchmark measures scalability by providing a Remote Browser Emulator (RBE) executable that (without client caching) simulates 2880 different users accessing databases at various scales (10,000 or 100,000, etc. unique product items within a schema of 8 tables) on database servers with 2 to 4 gigabytes of memory (with a 30 second non-SSL cache time-out). So TPC-W requires a network topology that supports several 100 Mbytes/sec of data. User think time is based upon a distribution with an average of 7 seconds and a maximum of 70 seconds. Article by Wayne D. Smith, Intel Corporation

Web (Apache/IIS) Monitors

Apache web servers provide a much small number of monitors than Microsoft IIS

#Busy Servers - Number of servers in the busy state. 1.

#Idle Servers - Number of servers in the idle state. 2.

Apache CPU Usage - Percentage of time the CPU is utilized by the Apache server. 3.

Hits/Sec - The HTTP request rate. 4.

KBytes Sent/Sec - The rate at which data bytes are sent from the Web server. 5.

Loadrunner obtains values for these counters from issuing http://server /server-status?auto

(16)

p p p \ \ \ p g

Counters= specifies the number of counters (5 by default).

Counter1= specifies the name of the counter as it appears in the HTML page returned from the server. If this is mispelled, LoadRunner will issue "Monitor name :Apache. Parsing error, cannot find token..."

Label1= The counter UI label. Description1= for the counter.

KeepPrevValue1=0 shows the value as is, 1 shows the rate.

This file should be replaced with apache_2.0.x.cfg if you are using Apache v2.

Transaction Response Times

End-to-end GUI response time is the total elasped "round-trip" time from when a user initiates action (such as clicking a submit button on a web browser) -- plus time for going through the network and for Middleware (such as IBM Websphere MQ or Tuxedo 6/7) and server processing -- to when a response from the web server is completely received and the user can act on the server's response:

A. GUI Client API B. External Internet WAN C. Front-facing Web servers D. Internet Firewalls & routers E. Load balancers F. Middleware (App servers) G. Database Server

To identify bottlenecks, more granular transaction metrics are needed:

Network and Server response times are measured by running non-GUI Vusers on the client machine. GUI file download response times are calculated by comparing GUI end-to-end times vs. Non-GUI total times. GUI client display (paint) times are obtained manually (with a stopwatch).

Middleware to Server response times are obtained only by running Vusers issuing the separately licensed middleware API to the app server.

Individual server response time are obtained by running Vusers on a machine directly connected to the app server (not just on the same subnet together).

Difference in Transaction Time from several runs allow different loads to be compared in a Transaction Analysis graph.

Each transaction measure performance of one or more action steps. [Workbook 3-17]

In Transaction Performance graphs, "Top time" transaction results point to bottlenecks in the system in that they, irrespective of system load -- require significantly more than the average time to complete.

Ramp-up and ramp-down by the Scheduler affect this.

Web Page Breakdown

The Transactions Per Second (passed and failed) and Transaction Response Time obtained from user-defined data points from Virtual Users are detailed by Web Page Breakdown Graphs which break down Virtual Users' client-side transaction times obtained from Web Server Resource Monitors.

(17)

Web Page Breakdown graphs are available in Analysis only if before the run, in LR8 Controller Diagnostics menu Distribution... dialog, BOTH the "Enable the following diagnostics" and the "Web page Diagnostics" checkbox are checked.

AND they are added in the Analysis program.

This explains the default order of Page Download Time Breakdown graph measurements:

Protocol Metric Measurement Description Infrastructure

Technologies HTTP/S [Client Time] the average amount of time that passes while a request is delayed on the

client machine due to browser think time or other client-related delays. This does not include time for Flash to paint graphics (which takes many seconds).

-[Connection

Time] is the time needed to establish an initial connection with the Web serverhosting the specified URL. This gives a good indicator of problems along the network. It also indicates whether the server is responsive to requests.

-[DNS Resolution Time]

time needed to resolve the DNS name to an IP address. If the hosts file contains the IP/host name pair under test, this should be very quick. Otherwise, the DNS server specified for the TCP/IP Properties is used. DNS Lookup measurement is a good indicator of problems in DNS resolution, or problems with the DNS server.

-[Error Time] the average amount of time that passes from the moment an HTTP request is sent until the moment an error message (HTTP errors only) is returned -[First Buffer

Time] time that passes between when the initial HTTP GET/PUT request until thefirst buffer (8K large) is successfully received back from the Web server. This measurement is a good indicator of Web server delay as well as network latency. (Time to First Buffer)

-FTP [FTP

Authentication time]

time taken by the FTP server to authenticate the client before it starts processing the client's commands. This measurement is applicable only to communications using FTP (not HTTP/S) protocol. So HTTP transactions would always show zero (0) for this metric.

HTTP/S [Receive Time] time that passes between when the first byte to when the last byte arrives from the server -- when downloading is considered complete. The Receive measurement is a good indicator of network quality look at the time/size ratio to calculate receive rate). This is the metric reported by LoadRunner function

longLastByteMSecs=web_get_int_property( HTTP_INFO_DOWNLOAD_TIME );

HTTPS [SSL Handshaking Time]

time taken to establish a Secure Socket Layer connection (includes the client hello, server hello, client public key transfer, server certificate transfer, and other stages).

If this value is high during high load, the web server may benefit from additional technologies such as an encryption daughter board on the web server or a load balancer device that also performs SSL encryption.

Time to First Buffer Breakdown (Over Time) Graph

The Time to First Buffer Breakdown (Over Time) graph separates server- or network-related time (in seconds).

Each column represents a different hit (resource). The Average and Maximum

LRAnalysis70.ini

The Analysis module reads and saves its setting in the LRAnalysis70.ini file with in the Windows directory (C:\Winnt or C:\Windows on Windows XP). To enable LoadRunner 7.8 Webpage Breakdown graphs to display URLs with a length greater than 25 characters, add a SURLSize entry in the [WPB] section to specify 255 (the maximum):

(18)

g , y [ ] p y ( ) [WPB]

SURLSize=255

Also, in the LoadRunner\bin\dat directory, use MS Access 2000 to open loader2.mdb or use MS Access 97 to open loader.mdb. Highlight the Breakdown_map table, select design view, and change the "Event Name" column size to 255.

Web Server Resource Monitors (Virtual Users):

The First Buffer Breakdown graph also displays Server and Network time of each Web page component's relative server and network time (in seconds) for the period of time until the first buffer is successfully received back from the Web server. If the download time for a component is high, this graph can be used to determine whether the problem is server- or network- related.

The Throughput graph shows the amount of throughput on the Web server (y axis) during each second of the scenario run (x axis).

The Hits Per Second graph shows the number of hits on the Web server (y axis) as a function of the elapsed time in the scenario (x axis).

Measurement Calculations

The less time per transaction, the greater a system's throughput, as expressed by the formula derived from Little's Law:

Server Thruput = # of real simultaneous users / ( Average Response Time + Think Time )

So when no think time is used, the number of virtual users can be calculated by this formula suggested by Menasce & Almeida:

# of real simultaneous users * [ Response Time / ( Response Time + Think Time ) ]

For example, to simulate 1,000 real users using 2 second response time and 20 second think times:

1,000 x [ 2 / ( 2 + 20 ) ] = 91

Errors

If you define a transaction within another transaction, an error will be counted twice in the Controller Scenario Status Failed Transactions statistic, one under each transaction summary.

System Load

is measured by a rate -- the total number of tasks performed during a certain period (an hour, day, week, month, quarter, year, etc.). Example: 300 transactions per second.

There can be several levels of load:

Peak number per hour or per second is typically used for system sizing. Normal load levels are used to plan on-going support requirements. Low load levels are used to plan the percentage of resources which can be taken off-line for repairs and upgrades.

Task Distribution Profiles

present a two-dimensional view of the number of tasks performed over continuous segments on a timeline.

A prioritization of metrics (Crucial, Primary, Minor) on Mercury's PTN List of Monitoring Environments

A Risk Profile may also include an estimation of risk of malfunction and likelihood of impact to the business.

Ivan Maclaine (from Qualtech Australia)

offers a concise

Introduction to LoadRunner which includes a definition of

Black & White-Box testing, a description of LR product components, and a summary of load testing methodology. Mercury summarizes its approach with technical white paper

Load Testing to Predict Web Performance in

html and 471KB Adobe pdf formats. A separate license is required for Mercury's

Network Monitor.

Measures of Variation

The average measures the central tendency in a group of numbers. For example, the average of 10, 20, and 30 is 20 . This is calculated by adding all three numbers together (10 + 20 + 30 = 60) and dividing this sum by the number of items added together (in this example, three).

Standard Deviation

Standard deviation is a statistical measure of the extent of variation in a set of data. The standard deviation tells you the extent of the spread of individual items around the average.

The number in the 90% column is shown after a run is completed in the Analysis program, not in the Controller) because it is calculated by sorting all items by value obtained during the run, then identifying the value associated the item at the top 10% of all items.

The CV (Coefficient of Variation) makes the standard deviation number

"The "User Experience, Not Metrics" 9 part white paper on Performance Engineering [Summary] by

Scott Barber of Noblestar is based on Rational's

Performance Studio, but the concepts are relevant to LoadRunner as well.

"Beyond Performance Testing" addresses the iterative process what happens after initial test results are collected, the

References

Related documents

Broadleaf detailed test result details (Appendix H) show specific measures of transactions per second (txns/sec) and actual response times against comprehensive page-level

In the following, we describe the three standardized RFID tags for maritime container: The license plate, which identifies the container, the shipment tag, which identifies

Based on prior tests of model constructs across cultural and developmental lines (Anderson &amp; Minke, 2007; Deslandes &amp; Bertrand, 2005; Green et al., 2007), we hypothesized

Nevertheless, for a balanced overall fitness plan, it’s best to do some type of athletic activity to ensure that your muscles don’t get too tight (shortened) from the slow,

Significant for West Europe has been a duality between spirit and body, causing a division between high culture and popular culture, that has been reflected in the way music and

However, a current staff member who holds an appointment at the G-6 or G-7 level may also apply to temporary positions in the Professional category up to and including the P-3

Generally, the respondents welcomed the initiative to provide guidance on the types of conduct prohibited under the Financial Services Act 2013 and Islamic Financial Services

Premium Plus – Verifone’s flagship package – includes all the services needed to receive card payments as well as many Premium level value-added services.. A Premium Plus subscriber