Posted on 2012-1-6 14:53 | From 51CTO Web page
Web server Set up to complete the launch, it can carry a large number of traffic, response speed, fault tolerance and other performance indicators, all these are managers most want to know and most worried. How do you know all this? Web stress testing with tools is a great way to do it. It can effectively test the running state and response time of the WEB server, etc.
Performance metrics.
First, the test environment:
Server operating system: W Indow S XP Professional Edition (32-bit/sp2/directx 9.0c)
Web Server: Apache 2.2.9
IP Address: Slightly
Stress test Tools: Web Application Stress Tool
Hardware:
L Processor: Intel Core 24 Core Q9505 @2.83ghz
L Motherboard: Fujitsu-Siemens D2817-A1 (Intel 4Series chipset-ich10do)
L Memory: 4GB (Samsung DDR2 800MHZ)
L Main Drive: Hitachi hdt721050sla360 (500G B)
L Graphics: intel® q45/q43 Express Chipset (fujitsu-siemens)
L network card: intel® 82567lm-3 gigab it netw ork Connection/fujitsu-siemens
Ii. Introduction of tools
There are many tools available for Web stress testing, such as Microsoft's Web application Stress, Linux
Under the siege, full-featured web-ct and so on, these are very good Web stress testing tools. While these
Tools give us the convenience of testing a server's ability to withstand, but they are "double-edged swords", and attackers use a random
A more comprehensive test tool to launch a catastrophic denial-of-service attack on a small Web server.
Following the author of Microsoft's Web application Stress Tool (referred to as WAST) as an example of web pressure
Force Test. This is a set of tools developed by Microsoft's Web site testers dedicated to conducting actual site stress tests.
Through this powerful stress testing tool, managers can do the site before the website actually
Real-world testing to identify potential problems in the system, and to further adjust and set up the system.
Three, tool settings
Download and install WAST, the process and its simplicity. Then run WAST to see that the interface is very concise, and before you stress test the target Web server, make the necessary settings for it first.
1. Set the number of parallel connections
Click "Defaults→settings" on the left to open the Settings panel. In Concurrent Connections, go down.
Row parallel connection settings. Stress level (threads) is the least thread, Stress multiplier is the maximum thread.
The thread here is to specify how many threads the program is requesting in the background, which is the equivalent of simulating how many clients a connection
Then, generally fill in 500~1000, because this number of threads is based on the endurance of the machine to set, if you
If you have enough confidence in the machine configuration, you can set it up a bit higher. (Fig. 1)
Figure 1
2. Set the duration
Used in "Test Run time" to specify the duration of a stress test, divided into days, hours, minutes,
Seconds several unit levels, such as we set to 1 hours. (Fig. 2)
Figure 2
3. Other Settings
"Rpquest delay" set the delay time, we set to 100~500. "Suspend" Setting settings Pending
Time, warmup time is the initialization of the test run time, cooldown time is the specified end phase of the test time.
Bandwith "Specifies a bandwidth bottleneck that allows you to simulate a modem connected from 14.4 Kbps to T1 (1.5 Mbps) Local
Network bandwidth of the area network (LAN) connection. Redirects setting redirection time, "throughput" setting
Whether the user, Password page state is saved, and so on, "name resolution" is set for name resolution. All
The above options can be set according to your own needs. (Fig. 3)
Figure 3
Iv.. Pressure test
After the setup is complete, the stress test can be performed, and the following steps are tested:
First step: Click the "New Script" button on the toolbar to click the "Nanual" button in the open panel to create a
Build a new test project. Set it in the window that opens, and in the main option, in the server, complete the test
The IP address of the server, here we fill 192.168.1.20, select the test Web connection method below, which
In the way Verb choose Get,path Select the Web page path you want to test, here fill in/index.asp
The home file, WAST can set more Path. (Fig. 4)
Figure 4
Step Two: Set the number of Stress level (threads) threads to 1000 in the "Settings" feature setting.
Once finished, the gray triangle button in the Point tool will be tested. During the test we can get the task tube from the server
CPU usage has reached 100% and the maximum loss rate is shown in Figure 5. Using commands in the CMD window
Netstat-an, you can see that the IP address of the client is very much connected on the 80 port on the server as shown in Figure 6,
And the Web site is not open, prompting too many users to connect. (Fig. 5) (Fig. 6)
Figure 5
Figure 6
Summary: Through the web stress test, the administrator of the Web server's anti-pressure capability has a general grasp, so that the root
According to the actual need can carry out the server hardware expansion, but also for the system setup, software selection, etc. provided the basis. Umbrella
, stress testing is necessary before the WEB server is officially released.
Web Server Stress Test Example detailed