Http_load a performance measurement tool based on the Linux platform. To test the throughput and load of the Web server, test the performance of the Web page. Tools are simple, lightweight, and easy to test, but only available on Linux systems, and only Web services can be tested. The database cannot be tested. The following is a virtual machine to test the Nginx performance, testing just write a method is not a production environment.
1. Download and install Http_load
[Email protected] home]# wget http://www.acme.com/software/http_load/http_load-14aug2014.tar.gz
[Email protected] home]# tar xvf http_load-14aug2014.tar.gz
[Email protected] home]# CD http_load-14aug2014
[[email protected] http_load-14aug2014]# make && make install
[email protected] http_load-14aug2014]# LL
Total Dosage 128
-rw-r--r--. 1 root root 51 October 9 18:15 1.txt
-r--r--r--. 1 root root 97 July 2001 FILES
-rwxr-xr-x. 1 root root 24400 October 9 18:00 http_load
-r--r--r--. 1 root root 5414 May 2005 Http_load.1
-r--r--r--. 1 root root 47394 August 10:48 http_load.c
-rw-r--r--. 1 root root 1682 August 03:13 Makefile
-r-xr-xr-x. 1 root root 1178 September make_test_files
-r--r--r--. 1 root root 2397 August 3 02:04 port.h
-r--r--r--. 1 root root 1035 March 2006 README
-r--r--r--. 1 root root 7362 July 08:25 timers.c
-r--r--r--. 1 root root 3832 July 08:09 timers.h
-rw-r--r--. 1 root root 4760 October 9 18:00 TIMERS.O
-r--r--r--. 1 root root 163 August 06:53 Version.h
[Email protected] http_load-14aug2014]#
2. Write the address you want to test into a file
[Email protected] http_load-14aug2014]# vim 1.txt
http://192.168.1.179/test.php--Can write multiple
http://192.168.1.179
3. Address in the test file
Parameter description:
-fetches abbreviated-F: Meaning total number of accesses
-rate Shorthand-r: meaning the frequency of visits per second
-seconds shorthand-S: meaning Total access time
-parallel abbreviation-P: Number of concurrently accessed threads
URLs are a list of URLs, one row for each URL. Can be a single page
start testing
[[email protected] http_load-14aug2014]# ./http_load -P 10-s 5 1.txt
2059 fetches, max parallel, 5.44223e+07 bytes, in 5.00237 seconds
26431.4 mean Byt ES/CONNECTION
411.605 fetches/sec, 1.08793e+07 bytes/sec
msecs/connect:0.078831 mean, 0.874 max, 0.028 min
msecs/first-response:6.322 Mean, 3003.78 Max, 0.071 min
http Response codes:
code--2059
[[email Protected] http_load-14aug2014]#
Analysis results
2059 fetches, max parallel, 5.44223e+07 bytes, in 5.00237 seconds
Total Request Connection 2,059 times, maximum concurrent thread 10, last 5.00237 seconds, overall transfer rate is 5.44223e+07 bytes
26431.4 mean Bytes/connection
Average data volume per request connection (5.44223E+07÷41)
411.605 fetches/sec, 1.08793e+07 bytes/sec
411.605  /milliseconds
msecs/connect:0.078831 mean, 0.874 max, 0.028 min
average response time per connection: 0.078831  264.607 MS, max time: 0.028 milliseconds
msecs/ first-response:6.322 mean, 3003.78 max, 0.071 min
Average return time per connection:6.322 MS, max time:3003.78 MS, minimum time:0.071 ms
Code 200--2059
HTTP return code: 200, altogether 2,059 times.
This article is from the "XFICC" blog, make sure to keep this source http://xficc.blog.51cto.com/1189288/1562349
Http_load of Nginx Performance testing tools