Using JMeter for Web site performance test instances

Source: Internet
Author: User

System: The interface management system developed by oneself
System code: Https://github.com/yangjing1989/API
Two key points: simulate a large number of concurrent users & monitoring System load parameter Analysis system bottleneck
Tools: Top (H Help), Sysstat (needs to be installed on the server), Uwsgitop,jmeter
* Test environment to facilitate testing, modify Sysstat to obtain system information interval of 1 minutes (default is 10 minutes)
Vi/etc/cron.d/sysstat

First, recording and playback
1, add HTTP request default value

2. Add Recording Controller

3. Add HTTP Proxy to Workbench

4, click "Start" to start recording

5, browser settings agent

6, access to the test application, click "Stop" to end the recording
7. Remove redundant requests

8, after the login request add Cookie,cookie value set reference Browser cookie value


9, Playback View results

Second, the script parameterized
1. Add CSV Data Set Config
2. Configure the parameterized data and set the name of the parameter

3, the application of parameter values in each request, such as

Third, to determine whether the page is correct
1. Add Response Assertion

Simulation of multi-user concurrency
1. Set up multiple users in the thread group

2, top view Application server performance, found that the CPU, memory and other indicators are in the normal range. And there is no output error in JMeter.
3, increase concurrent users to 200, to see server performance, the CPU for a long time than the average response time in 90%,jmeter has more than 5 seconds, indicating that the system has reached its limit.
4, increase concurrent users to 205,jmeter has begun to appear a large number of errors.
5, the whole process found Uwsgi occupy a large number of CPU,UWSGI is my application use of the Web server. The application itself consumes a large amount of CPU, in which JMeter can see that the login interface has a longer response time than the other interfaces, and receives more than 5 times times more data from the server per second than any other interface. Indicates that the login interface needs to be optimized.

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.