Http_load is a performance testing tool based on the linux platform. It is very small and only kb. It runs in Parallel Multiplexing mode and can test the web server throughput and load.
1. Get http_load
The official website of httpd_load is: http://www.acme.com/software/http_load/, and the vpslearner directly crashes (the file is from the official website)
wget -c http://soft.kwx.gd/tools/http_load-12mar2006.tar.gz
Ii. decompress and compile http_load
Yum-y install gcc GCC-c ++ # install the gcc editor tar xzvf http_load-12mar2006.tar.gz # unzip the http_load compressed package cd http_load-12mar2006 # enter the http_load directory mkdir/usr/local/man # create directory make && make install # compile and install
Iii. Usage
1. Switch to the http_load directory before each use.
cd http_load-12mar2006
Because we installed it in the/root (account root directory) by default, before using it, run the above command in SSH to switch to this directory.
2. Understand parameters and files
ParametersFull nameMeaning-p-parallel number of concurrent user processes. -F-fetches total access times-r-rate indicates the Access frequency per second-s-seconds consecutive access times: url website connection address or url File
Where "url" is one of the files in the http_load-12mar2006 directory, before using, create a blank file named url in the http_load-12mar2006, create a file in Winscp or use the vi command.
Enter the address you want to test in "url", for example:
Save the file.
3. Start testing
./Http_load-p 1021-s 10 url # The url is the file you just created.
Run the preceding commands by Using SSH, and send 1021 threads to www. kwx. gd for 10 consecutive seconds.
Iv. analysis results
41 fetches, 1020 max parallel, 851898 bytes, in 10.0008 seconds # A total of 41 request connections, a maximum of 1020 concurrent threads, lasting within 10.0008 seconds, the total transmission rate is 851898 bytes 20778 mean bytes/connection # The average data volume of each request connection (851898 bytes 41) 4.09969 fetches/sec, 85183.3 bytes/sec # The number of response requests per second is 4.09969, the data transmitted per second is 85183.3 btyes/millisecond msecs/connect: 264.607 mean, 269.482 max, 262.187 min # average response time for each connection: 264.607 ms, maximum time: 269.482 ms, minimum time: 262.187 Ms msecs/first-response: 1949.27 mean, 5394.21 max , 380.501 min # average return time for each connection: 1949.27 ms, maximum time: 5394.21 ms, minimum time: 380.501 Ms HTTP response codes: code 200 -- 41 # HTTP return code: 200, A total of 41 times.
The test results mainly refer to the fetches/sec, msecs/connect values, that is, the number of queries that the server can respond to per second to measure the performance. Of course, the pure value judgment is not accurate, for more information, see CPU and memory consumption.