The specific instance teaches you how to perform LoadRunner result analysis, and the instance loadrunner

Source: Internet
Author: User

The specific instance teaches you how to perform LoadRunner result analysis, and the instance loadrunner

The most important and difficult part of LoadRunner is the analysis of test results. the remaining recording and pressurization test settings can be easily mastered through several operations. for Results Analysis, I used images and text as an example. I hope the examples can help you more. this example mainly describes how multiple users take over tasks at the same time, test the system response capability, and determine the system bottleneck. the response time requested by the customer is within 5 S for one person to take over.

2. system resources:

2.1 hardware environment:

CPU: bensi 2.8E

Hard Disk: 100 GB

Network: 100 Mbps

2.2 software environment:

Windows XP

Server: tomcat Service

Browser: IE6.0

System Structure: B/S structure

3. Add monitoring resources

The example below describes some of the resource parameters that are most commonly used in our normal tests. In addition, some special resources are not described here for the time being. I will add them later.

Mercury Loadrunner Analysis is the most commonly used five types of resources.

1. Vuser

2. Transactions

3. Web Resources

4. Web Page Breakdown

5. System Resources

Select "Add graph" or "New graph" in Analysis to view these resources. There are other resources without data, which we didn't display.

  

If you want to view more resources, you can set the display only graphs containing data in the lower left corner to not select. Then select the corresponding vertex "open graph.

When you open Analysis, You can first see the Summary Report. The test Analysis Summary is displayed here. Everything is available, but we don't need to take a closer look at it. The following describes the meaning of this section:

Duration (Duration): Understand the Duration of the test process. testers should have a general understanding of the total number of system tasks in this period. to determine the test duration when more tasks are added next time.

Statistics Summary (statistical Summary): I just want to know about the test data, which does not play a major role in our specific analysis.

Transaction Summary: Understand the Average response time (Average) in seconds.

The rest can be ignored. It is not very important.
[Note] 51Testing authorizes IT168 to repost the content exclusively. No one or organization may copy, repost or image the content of this article without explicit written consent. Otherwise, it will be held legally liable.

Content navigation

4. Analysis Points

In the recording script, we usually use the set point. Now that we use the set point, we need to know when the Vuser is set on this point, what is the process of release. in this case, you need to observe the Vuser-Rendezvous diagram.

  

Figure 1

It can be seen that 30 users are concentrated at the start point at about 3 points and 50 points, lasting more than 3 points, and users are released at 7 points and 30 points, there were 18 users at and 5 Users at, and the entire process lasted for 12 points.

  

Figure 2

Figure 2 above shows a comparison between the collection point and the average transaction response time.

Note: After analysis is enabled, the system LR defaults to the two curves that are not in the same graph. You need to set them by yourself. The specific steps are as follows:

Click on the graph. Right-click merge graphs and select graph.3 to be used for comparison in select graph to merge:

  

Figure 3

In Figure 2, the deeper colors show the average response time, and the lighter colors indicate the set point. When the Vuser stays at the set point for 1 minute, the average response time is displayed as the maximum value, it can be seen that user concurrency is a great test on the system performance. next, let's take a look at the transaction-related parameter analysis. next, let's look at a picture.

  

Figure 4

This figure contains two data graphs: Average Transaction Response Time and Running Vuser. we can see that Vuser_init_Transaction (system logon) has no impact on the system. When the number of vusers reaches 15, the average transaction response time increases significantly, that is to say, when the system reaches the optimal performance, 14 Users are allowed to process transactions simultaneously. If the number of vusers reaches 30, the system has a maximum response time, the maximum response time is one minute later. After the system is stable, the Transaction Response Time starts to decrease, indicating that some users have completed the operation. at the same time, we can also see that we want to control the Transaction Response time within 10 S. the number of vusers cannot exceed 2. it seems that it is difficult to meet user needs.

When you do one thing, your superiors may ask you how you are doing. You may say that you have finished half of the work. How long have you spent on this half of the work? Therefore, we need to know the percentage of transactions completed within a given Time range based on the following figure (Transaction Response Time (Percentile)

  

In the circle shown in the figure, the response time of 10% of transactions is about 80 S. 80 S is not a small number for the user, and only 10% transactions, sweat. what do you think is the system performance!

In actual work, not everything can be completed in a short period of time. For those things that require time, we need to allocate appropriate time for processing, if the time distribution is uneven, some things consume longer time and some things consume shorter time, but we know for ourselves. LR also provides us with such a function, so that we can understand the maximum transaction response time? To determine how much we will pay for this system to improve it.

Transaction Response Time (Distribution)-Transaction Response Time (Distribution)

Shows the distribution of execution time in the solution. If the acceptable minimum and maximum transaction performance time is defined, you can use this figure to determine whether the server performance is within the acceptable range.

  

Obviously, the response time of most transactions is 60-140 S. In the projects I tested, the maximum response time that most customers can accept is about 20 S. S! Few people will spend so much time waiting for the appearance of the page!

By observing the above data tables, we can easily see that the system is not ideal in this environment. In the world, if something happens, then why does it lead to poor system performance? Let's perform further analysis.

The reasons for poor system performance are as follows. sometimes I have to admit that the LR feature is really powerful, which is why I like it. first, let's look at a page subdivision chart.

  

An application is composed of many components. If the overall system performance is poor, we will thoroughly analyze it. the figure shows all the web pages involved during the test. the download time of each page is displayed in the web page breakdown. click "web page breakdown" in the lower left corner to show all the attributes including the css style sheet, js script, and jsp page on each page.

Select page to breakdown.

  

See figure.

After selecting http: // 192.168.0.135: 8888/usertasks from Select Page To Breakdown, you can see the two components that belong To it below, in the First line, the Connection and First Buffer occupy the whole time, so the time consumed is here. We need to start from here to solve the problem.

  

  

It is also possible that the client has the longest time in your program. or others, these will be analyzed based on your own test results. let's take a look at the CPU and memory. hard Disk bottleneck analysis method:

First, we need to monitor the CPU, memory, and hard disk resources. Obtain the following parameters to provide analysis basis.
% Processor time (processor_total): number of processors consumed by the server. If the server is dedicated to SQL server, the maximum acceptable upper limit is 80%-85%, which is the common CPU usage.

% User time (processor_total): Indicates CPU-consuming database operations, such as sorting and executing aggregate functions. If the value is very high, you can consider increasing the index and try to reduce the value by using simple table join and horizontal table segmentation methods.

% DPC time (processor_total): the lower the better. In a multi-Processor system, if the value is greater than 50% and Processor: % Processor Time is very high, adding a NIC may improve performance and the network provided is not saturated.

% Disk time (physicaldisk_total): the percentage of time the selected Disk drive was busy providing services for read or write requests. If all three counters are large, the hard disk is not the bottleneck. If only % Disk Time is large and both are moderate, the hard Disk may be a bottleneck. Before recording this counter, run diskperf-yD in the command line window of Windows 2000. If the value exceeds 80%, the memory may leak.

Availiable bytes (memory): number of physical memories used. If the Available Mbytes value is small (4 MB or smaller), it indicates that the total memory on the computer may be insufficient or a program has not released the memory.

Context switch/sec (system): (instantiate inetinfo and dllhost processes) if you decide to increase the size of the thread's byte pool, you should monitor these three counters (including the one above ). Increasing the number of threads may increase the number of context switches, so that the performance will not increase but decrease. If the context switching value of the ten instances is very high, the size of the thread byte pool should be reduced.

% Disk reads/sec (physicaldisk_total): number of Hard Disk bytes read per second.

% Disk write/sec (physicaldisk_total): number of Hard Disk bytes written per second.

Page faults/sec: Compare Page faults generated by a process with those generated by the system to determine the impact of the process on system Page faults.

Pages per second: the number of Pages retrieved per second. This number should be less than one Working set per second: The Memory Page recently used by the thread, reflecting the number of memory pages used by each process. If the server has enough idle memory, the page will be left in the work set. When the free memory is less than a specific threshold, the page will be cleared from the working set.

Avg. disk queue length: the average number of Read and Write requests (queued for the selected disk in the instance interval. This value should not exceed 1.5 of the number of disks ~ 2 times. To improve performance, you can add disks. Note: A Raid Disk actually has multiple disks.

Average disk read/write queue length: the Average Disk reads/(writes)/s of read (write) requests (queues): The number of disk reads and writes per second on the Disk. The sum of the two should be smaller than the maximum capacity of the disk device.

Average disk sec/read: the Average time required to read data on this disk in seconds. Average disk sec/transfer: the Average time required to write data to this disk in seconds.

Bytes total/sec: the speed at which Bytes are sent and received, including frame characters. Determine whether the network connection speed is a bottleneck. You can use this counter value to compare the current network bandwidth with Page read/sec: the number of physical database Page reads per second. This statistics shows the total number of physical pages read between all databases. Because of the high overhead of physical I/O, you can minimize the overhead by using larger data caching, smart indexing, more efficient queries, or changing database design.

Page write/sec: (write Page/second) Number of pages written by the physical database per second.

Content navigation

1. Identify Application Problems

If the system causes a large number of context switches due to low application code efficiency or system structure design defects (context switches/sec displays too many context switches) this will occupy a large amount of system resources. If the system's throughput is reduced and the CPU usage is high, and the switching level is above 15000, it means that the number of context switches is too high.

  

As shown in the figure, context switches/sec does not change much, and the slope of the throughout curve is high. At this time, contextswitches/sec has exceeded 15000. The program still needs to be further optimized.

2. Determine the CPU bottleneck

If the length of the queue displayed by processor queue length remains unchanged (> = 2) and the processor utilization % Processortime exceeds 90%, there may be a processor bottleneck. if the length of the processor queue is found to exceed 2, but the processor utilization is always very low, it may be better to solve the problem of processor congestion. Here, the processor is generally not a bottleneck.

  

% Processor time average is greater than 95, processor queue length is greater than 2. You can determine the CPU bottleneck. At this time, the CPU is no longer able to meet the program needs. expansion is urgently needed.

3. Determine Memory leakage

Memory problems mainly check whether there is a memory leak in the application. If there is a memory leak, the values of the process \ private bytes counter and the process \ working set counter will usually increase, at the same time, the value of avaiable bytes is reduced. memory leakage should be tested through a long period of time to study and analyze the test of application response when all memory is exhausted.

  

The figure shows that the program does not have memory leakage. memory leakage often occurs when the service is running for a long time. Some programs have not released the memory, and the memory is slowly exhausted. it also reminds everyone to pay attention to the system stability test.

Attachment:

CPU information:

Processor \ % Processor Time to obtain the Processor usage.

You can also choose to monitor Processor \ % User Time and % Privileged Time for detailed information.

The Server Work Queues \ Queue Length counter displays a processor bottleneck. If the queue length is greater than 4, processor congestion may occur.

System \ Processor Queue Length is used for Bottleneck detection by using Process \ % Processor Time and Process \ Working Set

Total Time of all threads in the Process \ % Processor Time Process on each Processor.

Hard Disk information:

Physical Disk \ % Disk Time

Physical Disk \ Avg. Disk Queue Length

For example, Page Reads/sec, % Disk Time, And Avg. Disk Queue Length. If the page reading speed is very low and the value of % Disk Time and Avg. Disk Queue Length is very high, there may be Disk bottle diameter. However, if the length of the queue increases while the page read rate does not decrease, the memory is insufficient.

Physical Disk \ % Disk Time

Physical Disk \ Avg. Disk Queue Length

For example, Page Reads/sec, % Disk Time, And Avg. Disk Queue Length. If the page reading speed is very low and the value of % Disk Time and Avg. Disk Queue Length is very high, there may be Disk bottle diameter. However, if the length of the queue increases while the page read rate does not decrease, the memory is insufficient.

Observe the value of the Processor \ Interrupts/sec counter, which measures the speed of service requests from input/output (I/O) devices. If the value of this counter increases significantly, but the system activity does not increase accordingly, it indicates that there is a hardware problem.

Physical Disk \ Disk Reads/sec and Disk Writes/sec

Physical Disk \ Current Disk Queue Length

Physical Disk \ % Disk Time

LogicalDisk \ % Free Space

When testing disk performance, record the performance data to another disk or computer so that the data does not interfere with the disk you are testing.

Additional counters that may be observed include Physical Disk \ Avg. Disk sec/Transfer, Avg. DiskBytes/Transfer, and Disk Bytes/sec.

Avg. Disk sec/Transfer counters reflect the time used by the Disk to complete the request. A high value indicates that the disk controller keeps retrying the disk because of the failure. These faults increase the average disk transfer time. For most disks, the average transfer time of a higher disk is greater than 0.3 seconds.

You can also view Avg. Disk Bytes/Transfer values. A value greater than 20 KB indicates that the disk drive is normally running well. If the application is accessing the disk, a low value is generated. For example, applications that randomly access a Disk increase the average Disk sec/Transfer time, because random Transfer requires an increase in the search time.

Disk Bytes/sec provides the throughput of the Disk system.

Determine the balance of workload to balance the load on the network server, you need to know the degree of server disk drive busy. Use the Physical Disk \ % Disk Time counter to display the percentage of drive activity Time. If % Disk Time is high (more than 90%), check the Physical Disk \ Current Disk Queue Length counter to check the number of system requests waiting for Disk access. The number of waiting for I/O requests should be no greater than 1.5 to 2 times the number of main axes that constitute the physical disk.

Although cheap Disk redundancy array (RAID) devices usually have multiple spindle, most disks have one spindle. The hardware RAID device is displayed as a physical disk in the System Monitor, and the RAID device created through the software is displayed as multiple drives (instances ). You can monitor the Physical Disk counters for each Physical drive (rather than RAID), or use the _ Total instance to monitor data on all computer drives.

Use the Current Disk Queue Length and % Disk Time counters to detect Disk Subsystem bottlenecks. If the Current Disk Queue Length and % Disk Time values are always high, consider upgrading the Disk drive or moving some files to another Disk or server.


How to analyze LoadRunner results

From the overall graph. context switches/sec does not change much, the slope of the throughout curve is high, and the contextswitches/sec has exceeded 15000. the program still needs to be further optimized. 2. determine the CPU bottleneck. If the length of the processor queue is not changed (> = 2) and the processor utilization % Processortime exceeds 90%, there may be a processor bottleneck. if the length of the processor queue is found to exceed 2, but the processor utilization is always very low, it may be better to solve the problem of processor congestion. Here, the processor is generally not a bottleneck.
% Processor time average is greater than 95, processor queue length is greater than 2. you can determine the CPU bottleneck. at this time, the CPU can no longer meet the program needs. scaling badly needed. 3. to determine the memory leakage problem, the main purpose is to check whether the application has a memory leak. If a memory leak occurs, the values of the process \ private bytes counter and the process \ working set counter tend to increase, at the same time, the value of avaiable bytes is reduced. memory leakage should be tested through a long period of time to study and analyze the test of application response when all memory is exhausted.
The figure shows that the program does not have memory leakage. memory leakage often occurs when the service is running for a long time. Some programs have not released the memory, and the memory is slowly exhausted. it also reminds everyone to pay attention to the system stability test. attachment: CPU information: Processor \ % Processor Time to obtain the CPU usage. You can also choose to monitor Processor \ % User Time and % Privileged Time for detailed information. The Server Work Queues \ Queue Length counter displays a processor bottleneck. If the queue length is greater than 4, processor congestion may occur. System \ Processor Queue Length is used for Bottleneck detection by using Process \ % Processor Time and Process \ Working Set Process \ % Processor Time total Time of all threads on each Processor. Hard Disk information: Physical Disk \ % Disk Time Physical Disk \ Avg. Disk Queue Length, for example, Page Reads/sec, % Disk Time, And Avg. Disk Queue Length. If the page reading speed is very low and the value of % Disk Time and Avg. Disk Queue Length is very high, there may be Disk bottle diameter. However, if the length of the queue increases while the page read rate does not decrease, the memory is insufficient. Physical Disk \ % Disk Time Physical Disk \ Avg. Disk Queue Length, for example, Page Reads/sec, % Disk Time, And Avg. Disk Queue Length. If the page reading speed is very low and the value of % Disk Time and Avg. Disk Queue Length is very high, there may be Disk bottle diameter. However, if the length of the queue increases while the page read rate does not decrease, the memory is insufficient. Observe the value of the Processor \ Interrupts/sec counter. The measurement of this counter comes from the input.

How to analyze LoadRunner results

Page 1st: Analysis gathering point page 2nd: identifying Application Problems text Tag: Test tool performance test LoadRunner [IT168 technical documentation] 1. the most important and difficult part of LoadRunner is the analysis of test results. the remaining recording and pressurization test settings can be easily mastered through several operations. for Results Analysis, I used images and text as an example. I hope the examples can help you more. this example mainly describes how multiple users take over tasks at the same time, test the system response capability, and determine the system bottleneck. the response time requested by the customer is within 5 S for one person to take over. 2. system Resources: 2.1 hardware environment: CPU: pensi 2.8E hard drive: 100G network environment: 100 Mbps 2.2 software environment: Operating System: English windowsXP server: tomcat service Browser: IE6.0 system structure: b/S structure 3. the following example describes how to add monitoring resources. Resource parameters. Some special resources are not explained here for the time being. I will add them later. Mercury Loadrunner Analysis is the most commonly used five types of resources. 1. vuser 2. transactions 3. web Resources 4. web Page Breakdown 5. select "Add graph" or "New graph" in Analysis to view these Resources. there are other resources without data, so we didn't display them.
Statistics Summary (statistical Summary): I just want to know about the test data, which does not play a major role in our specific analysis. transaction Summary: Understand the Average response time (Average) in seconds. the rest can be ignored. not very important.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.