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