Analysis of performance test results in software testing

Source: Internet
Author: User
Tags cpu usage oracle database

Analysis principle:
Specific issues specific analysis (this is due to different application systems, different test purposes, different performance concerns)

Find bottlenecks in the following order, from easy to difficult.

Server hardware bottleneck-〉 network bottleneck (for LAN, can not be considered)-〉 server operating system bottleneck (parameter configuration)-〉 middleware bottleneck (parameter configuration, database, Web server, etc.)-〉 application bottlenecks (SQL statements, database design, business logic, algorithms, etc.)

Note: The above process is not required in each analysis, to determine the depth of the analysis according to the purpose and requirements of the test. For some low requirements, we analyze the application system in the future of large load pressure (concurrent user number, data volume), the system hardware bottleneck is enough.

Piecewise exclusion is effective.

Sources of information analysis:

1 According to the scene during the operation of error message

2 The monitoring data collected according to the test results

A Error prompt Analysis

Analysis Example:

1) error:failed to connect to server "Payment.baihe.com″: [10060] Connection

Error:timed out Error:server ' User.baihe.com″has shut down the connection prematurely

Analysis:

A, Application services die.

(Small User: a procedural problem.) Problems with the database on the program)

B, application services Not dead

(Apply service parameter setup issues)

Example: In many client connections WebLogic application servers are denied, and there is no error on the server side, it is possible that the Acceptbacklog attribute value of the server element in WebLogic is set too low. If you receive a connection refused message when you connect, you should increase the value by 25% each time

C, the connection to the database

(1, the performance parameters of the application service may be too small 2, the maximum number of connections to the database startup (related to the memory of the hardware))

2) error:page download timeout (seconds) has expired

Analysis: May be due to the following causes

A, the application service parameter setting is too big to cause the server bottleneck

B, too many pictures on the page

C, check the field too much when the program is working on the table

Two Monitoring Index data analysis

1. Maximum number of concurrent users:

The maximum number of concurrent users that the application system can withstand under the current environment (Hardware environment, network environment, software Environment (parameter configuration)).
In a scenario run, if a business operation with greater than 3 users fails, or if a server shutdown occurs, the system cannot withstand the load pressure of the current concurrent user in the current environment, and the maximum number of concurrent users is the number of concurrent users that did not appear in the previous situation.

If the maximum number of concurrent users reached the performance requirements, and the server resources in good condition, business operation response time has reached the user requirements, then OK. Otherwise, the reason is further analyzed according to the resource situation of each server and the response time of business operation.

2. Business Operation Response Time:

The analysis scenario run should start with an average transaction response time chart and a transactional energy summary graph. Use the transactional summary diagram to determine which transactions are responding over a long period of time during scenario execution.

Subdivide the transaction and analyze the performance of each page component. See which page components are causing the too long transaction response time. Whether the problem is related to the network or server.

If the server is taking too long, use the appropriate server diagram to determine the problem server metrics and find out why the server's performance is down. If your network is taking too long, use the Network Monitor diagram to identify network problems that are causing performance bottlenecks

2-5-10 principle: Simply put, when users are able to get a response within 2 seconds, they will feel the response of the system is very fast, and when the user gets a response between 2-5 seconds, the response speed of the system can be felt, and when the user gets a response within 5-10 seconds,

It feels the system is slow to respond, but it is acceptable, and when the user is still unable to respond after 10 seconds, the system sucks, or the system loses its response, chooses to leave the Web site, or initiates a second request.

3. Server Resource monitoring metrics:

Memory:

1 The index memory paging rate (paging rate) in UNIX resource monitoring, if the value is occasionally higher, indicates that the thread is competing for memory. If it continues to be high, memory may be a bottleneck. It is also possible that the memory access hit rate is low.

2 in Windows Resource monitoring, if the value of the Process/private bytes counter and the Process/working set counter continues to rise over a long period of time, and the value of the Memory/available bytes counter continues to decrease, There is likely to be a memory leak.

Memory resources are a symptom of system performance bottlenecks:

A very high rate of page change (Gao pageout rate);

The process enters an inactive state;

All disks in the swap area have a high number of activities;

High CPU utilization of global system;

Not enough memory error (out of memory errors)

Processor:

1 CPU Usage (CPU Utilization) in UNIX resource monitoring (similar to Windows operating system)

If the value persists over 95%, the bottleneck is the CPU. Consider adding a processor or switching to a faster processor. If the server is dedicated to SQL Server, the maximum acceptable limit is 80-85%

The range of reasonable use ranges from 60% to 70%.

2 in Windows Resource monitoring, if the system/processor Queue length is greater than 2 and the processor utilization (Processor time) is low, there is a processor blockage.

CPU resources are a symptom of system performance bottlenecks:

Slow response times (slow response time)

CPU idle time is 0 (zero percent idle CPU)

Excessive user CPU time (high percent user CPU)

Excessive CPU time (high percent system CPU)

Long running process queues (large run queue size sustained over time)

Disk I/O:

1 for UNIX resource monitoring (similar to Windows operating system), the metric disk exchange rate (diskette rate), if the value of the parameter has been high, indicates I/O is problematic. Consider replacing a faster hard drive system.

2 in Windows Resource Monitoring, disk bottle diameters may exist if the value of disk Time and Avg.Disk Queue length is high and page reads/sec page read operation rate is very low.

I/O resources are a symptom of system performance bottlenecks:

Excessive disk utilization (high diskette utilization)

Too long disk wait queue (large diskette queue Length)

The percentage of time waiting for disk I/O is too high (large percentage of times waiting for disk I/O)

Too high physical I/O Rate: large physical I/O rate (not sufficient in itself)

Low cache Hit rate (lower buffer cache hit ratio (not sufficient in itself))

Run the process queue too long, but the CPU is idle (large run queue with idle CPU)

4. Database server:

SQL Server database:

1 SQL Server Resource Monitoring index cache click rate (Cache Hit Ratio), the higher the value the better. If you continue below 80%, you should consider adding more memory.

2 If the full scans/sec (all Table Scan/sec) counter displays a value that is higher than 1 or 2, you should analyze your query to determine if a full table scan is really required and whether the SQL query can be optimized.

3) # of DEADLOCKS/SEC (number of deadlocks/sec): Deadlocks are very detrimental to application scalability and can lead to poor user experience. The value of this counter must be 0.

4 Lock Requests/sec (Lock request/sec), the value of this counter can be reduced by optimizing the query to reduce the number of reads.

Oracle Database:

1 If free memory is close to 0 and the hit rate of the library cache or data dictionary is less than 0.90, you need to increase the size of the shared_pool_size.

2 if the cache hit rate of the data is less than 0.90, you need to increase the value of the Db_block_buffers parameter (unit: block).

3 If the value of the log buffer request is larger, the value of the Log_buffer parameter should be increased.

4 If the memory sort hit rate is less than 0.95, you should increase the sort_area_size to avoid disk sorting.

Related Article

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.