door10000 发表于 2014-10-22 21:14

apache的压力测试

$ ab -n 60000 -c 194 http://192.168.1.252/index.html
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.252 (be patient)
apr_socket_recv: Connection reset by peer (54)
Total of 360 requests completed
$ ab -n 60000 -c 194 http://192.168.1.252/index.html
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.252 (be patient)
apr_socket_recv: Connection reset by peer (54)
Total of 499 requests completed
$ ab -n 60000 -c 194 http://192.168.1.252/index.html
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.252 (be patient)
Send request failed!
apr_socket_recv: Connection reset by peer (54)
Total of 3498 requests completed
$ ab -n 60000 -c 194 http://192.168.1.252/index.html
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.252 (be patient)
Completed 6000 requests
Completed 12000 requests
Completed 18000 requests
Completed 24000 requests
Completed 30000 requests
Completed 36000 requests
Completed 42000 requests
Completed 48000 requests
Completed 54000 requests
Completed 60000 requests
Finished 60000 requests


Server Software:      Apache/2.4.10
Server Hostname:      192.168.1.252
Server Port:            80

Document Path:          /index.html
Document Length:      45 bytes

Concurrency Level:      194
Time taken for tests:   5.220 seconds
Complete requests:      60000
Failed requests:      1
   (Connect: 1, Receive: 0, Length: 0, Exceptions: 0)
Total transferred:      17520000 bytes
HTML transferred:       2700000 bytes
Requests per second:    11494.96 [#/sec] (mean)
Time per request:       16.877 (mean)
Time per request:       0.087 (mean, across all concurrent requests)
Transfer rate:          3277.86 received

Connection Times (ms)
            minmean[+/-sd] median   max
Connect:      0    2   1.1      2      12
Processing:   3   15   1.2   15      26
Waiting:      2   14   1.4   14      25
Total:          6   17   0.8   17      26

Percentage of the requests served within a certain time (ms)
50%   17
66%   17
75%   17
80%   17
90%   17
95%   18
98%   18
99%   19
100%   26 (longest request)
60000次请求194的并发用了这么久.

door10000 发表于 2014-10-22 21:16

这货跟哪些东西有关联?网卡,缓存,总线,处理器?

lsstarboy 发表于 2014-10-23 09:15

你的html文件太小了,增加html文件的内容,你会发现每秒钟仍然能1万多次,这已经很不错了。这货跟网卡和硬盘关系最大,静态网页可以试一下nginx,网卡不是很差的话,能跑满百兆或千兆。
页: [1]
查看完整版本: apache的压力测试