LoadRunner doing performance testing from design to analysis execution

Source: Internet
Author: User

Project Introduction: Like Baidu know system similar system performance Test , is the company's own products.

A summary of the recent performance tests for this system is summarized below:

System function Introduction:

Front-desk users can ask questions about different areas according to their needs, including anonymous and logged-in users questions.

Administrators of different areas in the background to answer, delete and audit questions, the Super Administrator of all regional information can be counted.

Test tools:

Mi Company's stress test tool LoadRunner

Version: 8.1

license:10000

Protocol: Http/web Protocol

Design performance test scenarios and scenarios based on requirements

The scene is simply designed as follows:

1. Reception Post

Open the first page;

Record the time it took to enter the first page

Enter user name and password to login;

Record the time spent in landing;

Edit a post and send it;

Record the time of posting;

Repeat 3-6 steps for 15 minutes.

2. Answering questions in the background

Open the background landing page;

Record the time it takes to enter the page;

Enter user name and password to login;

Record the time spent in landing;

Send answer question information;

Record the time taken to answer the question;

Repeat 3-6 steps for 15 minutes.

3. Background Audit issues

......

4. Background removal issues

......

  

Hardware environment:

Load balancing and HA, local area network (presses and servers on the same switch)

Performance Index:

No clear performance indicators, focus on monitoring the server does not appear 500 errors, as well as CPU, memory, IO and other resource usage, as well as the number of concurrent, TPS, success rate, etc. according to the test situation to tune, satisfied. (unlike other Web performance tests that provide clear metrics such as response time, etc.)

Test Script Modification Principles:

Front desk post:

1. Annotate think time

2. The front desk requires a different area to post a question, so there is a corresponding area in the database, and allows the same IP to submit multiple questions

A Due to the existence of the region such as 500, and the foreground requires concurrent questioning is 2000 concurrency, so that the one by one correspondence will make the parameter is insufficient, can be parameterized, the existence of the region information to copy. The parameter selection is set to unique, once, so that a questioner is allowed for a region.

B To ask for a problem, the simplest way is to choose the unique number,update value on select once when making the parameter, the data is already big enough, do not worry about insufficient parameters and error.

3. Request development Comment out verification code, or universal Verification code

Background reply:

1. Annotate think time

2. Background allows multiple IE login

A Due to the existence of the region such as 500, requires the landing and the reply is 2000 concurrent, so that one by one corresponding relationship will make the parameter is insufficient, you can do parameterization, the existence of the region information to copy. The parameter selection is set to unique, once. Note that the password and user name are exactly matched.

B Run multiple answers to the same question.

C Check points such as: Web_global_verification ("text= welcome You", last);

D One problem corresponds to a user's attention to parameterized settings.

Perform the test and analyze the tuning:

The information to resolve the error in the test:

1. Failed to connect to server "domain name:": [10065] No Route to Host

Solve:

There are two kinds of error messages, one is the switch jam, one is the server network congestion or the CPU is unable to respond (the network card interrupt processing is not over).

From the server side check whether the iptables is turned on and see how much/proc/sys/net/ipv4/ip_conntrack_max is.

2. TTP status-code=500 (Internal Server Error)

Solve:

A This problem, developers are tuning from the program and the environment.

B It is recommended to optimize SQL by grabbing a packet to discover that there are a number of repeated executions of SQL statements.

C Optimize the JVM. Machine configuration: 4G of memory, 32 threads concurrency capability

-xmx3800m-xms3800m-xmn2g-xss128k-xx:+useparallelgc-xx:parallelgcthreads=20

3. HTTP status-code=504 (Gateway time-out)

Solve:

502 Bad Gateway server as a gateway or proxy, the server returned an illegal reply in order to complete the request to access the next server.

504Gateway Timeout is used by a server acting as a proxy or gateway, indicating that a reply cannot be received from a remote server in a timely manner.

FIX: You can start multiple Tomcat services, and a Tomcat service may not support that much concurrency. (in general, services like IBM 's high-provisioning one Tomcat can support 2000 concurrency.) (We don't have the right to let the staff of the deployment environment help you adjust.) )

4. Step download timeout (seconds) have expired when downloading Non-resource (s)

Solve:

You can modify the configuration parameters (tomcat), or you can adjust the time-out on the program.

such as <connector port= "8080"

maxthreads= "minsparethreads=" maxsparethreads= "75"

Enablelookups= "false" redirectport= "8443" acceptcount= "100"

debug= "0" connectiontimeout= "20000"

Disableuploadtimeout= "true"/>

Of course, you can also adjust the configuration of LR, but it's best not.

5. Abnormal termination, caused by mdrv process termination

Solve:

Boldly tried to modify the HTTP.LRP information in the D:\Program Files\mercury\loadrunner\dat\protocols in LR and add a new one under [Vugen] maxthreadperprocess= The number of VUser to set.

  Test results:

Front desk post:

Scene Design: Perform 2000 concurrent anonymous to different zone posts, every 15 seconds 50 users, 2000 users all arrived, continuous execution for 10 minutes.

Concurrency number Question Response time Success rate Number of requests processed per second by the server Throughput (Mbps)
2000

Background reply:

Scene Design: Perform 400 concurrent replies to different posts in the same area, 20 users every 10 seconds, 400 users all arrive, and continue to execute for 10 minutes.

Concurrency number Response time of replies Success rate Number of requests processed per second by the server Throughput (Mbps)
400

Note: The response time is in units of: seconds

The results of this test are quite satisfactory and are still being tuned further.

LoadRunner doing performance testing from design to analysis execution

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.