JMeter to the HTTP request stress test, concurrency test

Source: Internet
Author: User

Recently the company needs to develop a simple registration system for extranet users to provide registration services, because our company is a start-up micro-company, developers are just graduating, development experience is quite short.

The experience of the server performance test is much less negligible. Forced to let us try to understand the knowledge of testing.

First of all, our requirements are as follows:

Server hardware: (only one)

System: Windows 2003

Webserver:tomcat 7.0

jdk:7.0

Cpu:8 Core 2.9GHz two X

Memory: 16G

Registration Application System: only need to provide an interface to register and retrieve the registration number.

We need to: test how many HTTP requests the server can tolerate at the same time.

Through a variety of Baidu after the discovery LoadRunner is good, but the use of a short period of time more difficult to get started, and then found the JMeter.

First, run JMeter:

First download a jmeter on the Internet, I downloaded the 2.3.4 version, the same as other versions

After extracting a file in tgz format, and then continue to unzip to get a folder such as:

Open folder run Jmeter.bat in the bin directory to enter the JMeter main interface,

If the running Jmeter.bat error does not open normally, it is necessary to check whether the machine has installed JDK, if you can ensure that the JDK installed and configured environment variables, you can try to run directly

Bin directory Apachejmeter.jar, I can not open jmeter.bat the hint I can't create a Java virtual machine, but run Apachejmeter.jar normal access to the main interface, not

You can try this method if you can work properly.

Second, create a group of threads

Third, set thread group parameters

Iv. Creating an HTTP request

V. Configuring HTTP Requests

Vi. Adding a run result analysis listener

Vii. Aggregated reports

Viii. Graphical Results

Ix. Summary

After we have set the parameters as above, we have carried on the concurrency test of the application (the test machine and the same intranet segment of the server were kept in the test), and for the first time we simulated 100 user concurrent requests (the request needs to be queried

A data table with 1000 data is executed for 10 minutes, the offset remains below 100, the second simulates 200 users, the offset remains below 100, and the offset remains at around 350 when the third user simulates 100 users.

And the server CPU is in good condition, the usage rate has remained at about 20%, the highest not more than 25%. Why the server CPU usage is not high, and the offset will be more and more high, I guess it might be with Tomcat

No optimization is involved. Finally, we think that the concurrency of the application is probably between 350-400.

JMeter to the HTTP request stress test, concurrency test

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.