帮酷LOGO
0 0 评论
文章标签:Handles  WEB  concurrent  test  Server  Connections  

测试web服务器处理并发连接和大负载的能力,

ab -n 1000 -c 100 http://127.0.0.1:8000/
此命令将一次对HTTP URL handlink 100并发连接执行1000个请求,然后它将显示统计数据。
示例输出
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software:
Server Hostname: 127.0.0.1
Server Port: 8000
Document Path: /
Document Length: 12 bytes
Concurrency Level: 100
Time taken for tests: 20.948 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 113000 bytes
HTML transferred: 12000 bytes
Requests per second: 47.74 [#/sec] (mean)
Time per request: 2094.826 [ms] (mean)
Time per request: 20.948 [ms] (mean, across all concurrent requests)
Transfer rate: 5.27 [Kbytes/sec] received
Connection Times (ms)
 min mean[+/-sd] median max
Connect: 0 3 7.8 0 37
Processing: 2001 2063 94.4 2014 2353
Waiting: 1 46 64.8 9 241
Total: 2001 2066 100.4 2014 2369
Percentage of the requests served within a certain time (ms)
 50% 2014
 66% 2032
 75% 2098
 80% 2122
 90% 2228
 95% 2359
 98% 2365
 99% 2365
 100% 2369 (longest request)


文章标签:WEB  Server  test  Connections  concurrent  Handles  

Copyright © 2011 HelpLib All rights reserved.    知识分享协议 京ICP备05059198号-3  |  如果智培  |  酷兔英语