Problem Description: LoadRunner as the industry's most popular performance testing tool, the application has been very extensive. LoadRunner How to analyze performance data, this is every performance testers are very concerned about the topic. But this topic is affected by the specific business and environment is not very good answer, so narrow the scope. How do I use LoadRunner to analyze the resource occupancy rate (CPU, memory, hard disk)?
Wonderful answer:
The situation is more complicated, if you are interested, you can write a very thick book on this question.
1. System classification
1.1. Windows
1.2. Unix/linux
2. Core classifications
1.1. Single Core CPU
1.2. Multi-core CPU
3. Application classification
3.1. Java applications
3.2. dotnet Application
3.3. Other applications
4. Disk classification
5. Platform classification
5.1. Middleware Platform
5.2. Database platform
5.3. Other middleware platforms
6. Combining the above analysis, I believe there will be many permutations and combinations. Because of the complexity of parameter combination and application, it is difficult to generalize the high and low standard of performance. Only the case, according to the situation analysis.
Memory: Memory usage may be the most important factor in system performance. If the System "page Exchange" is frequent, it indicates that there is not enough memory. The page exchange is the process of moving fixed sized code and blocks of data from RAM to disk using units called pages to free up memory space. Although some page exchanges allow Windows 2000 to use more memory than actual, it is also acceptable, but frequent paging will degrade system performance. Reducing page switching will significantly improve system response speed. To monitor for a low memory condition, start with the following object counters:
Available Mbytes: The number of physical memory available. If the value of the available MBytes is small (4 MB or less), the total memory may be insufficient on the computer or the program is not releasing memory.
Page/sec: Indicates the number of pages removed from disk due to a hardware page error, or the number of pages written to disk to free working set space due to a page fault. Generally if the pages/sec continues above hundreds of, you should further study the paging activity. It may be necessary to increase the memory to reduce the need for page change (you can multiply this number by 4 K to get the resulting hard drive data flow). A large pages/sec value does not necessarily indicate a memory problem, but may be the result of running a program that uses memory-mapped files.
Page Read/sec: A hard failure of pages, a subset of PAGE/SEC, the number of times a page file must be read in order to parse a reference to memory. The threshold value is >5. The lower the better. A large value indicates that disk reads rather than cached reads.
Because too many page exchanges use a large amount of hard disk space, it is possible that the paging memory is not enough to be confused with the disk bottle path that causes the paging to be exchanged. Therefore, you must track the following disk usage counters and memory counters when studying the cause of a page exchange that is less than obvious in memory:
Physical Disk% Disk Time
Physical Disk Avg.Disk Queue Length
For example, include Page reads/sec and% Disk time and Avg.Disk Queue Length. If the page read operation rate is very low and the value of% Disk Time and Avg.Disk Queue length is high, there may be a disk bottle path. However, if the queue length increases while the page read rate does not decrease, there is not enough memory.
To determine the effect of excessive paging on disk activity, increase the value of the physical disk Avg.Disk Sec/transfer and memory pages/sec counters by several times. If the count of these counters exceeds 0.1, then the paging will cost more than 10% of the disk access time. If this happens for a long time, you may need more memory.
Page Faults/sec: The number of soft page failures per second (including some that can be satisfied directly in memory and some that need to be read from the hard disk) is more page/sec than just indicating that the data cannot be used immediately in the specified working set of memory.
Cache Bytes: File system cache, which by default is 50% of available physical memory. If IIS5.0 runs out of memory, it automatically collates the cache. Need to pay attention to the trend change of this counter
If you suspect a memory leak, monitor the memory Available Bytes and memory committed Bytes to observe the memory behavior and monitor the processprivate Bytes of processes that you think might be leaking memory, Processworking Set and ProcessHandle Count. If you suspect that the kernel-mode process is causing the leak, you should also monitor MemoryPool nonpaged Bytes, Memory Pool Nonpaged Allocs, and process (process_name) Pool Nonpaged Bytes.
Pages per second: The number of pages retrieved every second. This number should be less than one page per second.
Process:
%processor Time: The number of processor hours consumed by the processor. If the server style= "COLOR: #000000" href= "http://server.it168.com/" target=_blank> server is dedicated to SQL Server, the maximum acceptable limit is 80-85%
Page Faults/sec: Compares a process-generated paging fault with a system-generated error to determine the impact of this process on system page failures.
Work set: The most recent memory page used by the processing thread, reflecting the number of pages of memory used by each process. If the server has enough free memory, the page will be left in the working set, and the page will be cleared out of the working set when free memory is less than a specific threshold value.
Inetinforivate Bytes: The current number of bytes allocated by this process that cannot be shared with other processes. If system performance decreases over time, this counter can be the best indicator of memory leaks.
Processor: Monitoring the processor and system object counters can provide valuable information about the use of handlers to help you decide if there is a bottleneck.
%processor time: If the value lasts more than 95%, the bottleneck is CPU. Consider adding a processor or switching to a faster processor.
%user time: CPU-consuming database operations, such as sorting, executing aggregate functions, etc. If the value is high, consider adding an index to reduce the value by using simple table joins, and horizontally dividing the large table.
%privileged time: (CPU kernel times) is the percentage of time spent processing thread execution code in privileged mode. If the value of the parameter and the "hysical Disk" parameter values are high, it indicates that I/O is problematic. Consider replacing a faster hard drive system. Setting up tempdb in RAM, reducing max async io, and "Max lazy writer IO" will reduce the value.
In addition, the server Work Queues Queue Length counter, which tracks the current length of the server work queue for the computer, shows the processor bottleneck. A queue length of longer than 4 indicates a possible processor congestion. This counter is a value for a specific time, not an average for a period of time.
% DPC Time: the lower the better. In a multiprocessor system, if this value is greater than 50% and processor:% Processor time is very high, adding a NIC may improve performance and provide a network that is not saturated.
Thread
Contextswitches/sec: (instantiating Inetinfo and dllhost processes) if you decide to increase the size of the thread byte pool, you should monitor the three counters (including one above). Increasing the number of threads may increase the number of context switches, so that performance does not rise but decreases. If the context switching values for 10 instances are very high, you should reduce the size of the thread byte pool.
Physical Disk:
%disk Time%: Refers to the percentage of times that the selected disk drive is busy servicing a read or write request.
If the three counters are large, then the hard drive is not a bottleneck. If only%disk time is large and the other two are moderate, the hard drive may be a bottleneck. Before logging the counter, run Diskperf-yd in the Windows 2000 Command Line window. If the value lasts more than 80%, it could be a memory leak.
Avg.Disk Queue Length: The average number of read and write requests that are queued for the selected disk at the instance interval. This value should be no more than 1.5~2 times the number of disks. To improve performance, you can increase the disk. Note: A RAID disk actually has more than one disk.
Average Disk read/write Queue Length: means the average number of read (write) requests (queues).
Disk Reads (writes)/s: Number of disks read and written per second on the physical disk. In addition, it should be less than the maximum capacity of the disk device.
Average Disksec/read: Refers to the average amount of time required to read data on this disk in seconds.
Average disk Sec/transfer: Refers to the average amount of time required to write data on this disk in seconds.
Network Interface:
Bytes Total/sec: The rate at which bytes are sent and received, including frame characters. To determine whether the network connection speed is a bottleneck, you can compare the value of this counter with the bandwidth of the current network.