billfeller.github.io icon indicating copy to clipboard operation
billfeller.github.io copied to clipboard

ab压力测试

Open billfeller opened this issue 10 years ago • 0 comments

环境配置: 系统:CentOS release 5.8 (Final) CPU:8核 Intel(R) Xeon(R) CPU E5-2430 0 @ 2.20GHz 内存:32GB 网卡:1000 Mbps

C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin>ab.exe -n 1000 - c 10 -C "WAP[revision]=touch" -C "WAP[hd]=1" -C "WAP_product_preheating_referer= http%3A%2F%2Fm.vip.com%2Fpreheating-brand-301810-0-0-0-0-0-1-40.html" -C "m_vipr uid=58788556" -C "WAP_preheat_brand_return_url=a%3A0%3A%7B%7D" -C "WAP%5BremindS how%5D=1" -C "m_vip_province=104104" -C "WAP[p_area]=%25E5%25B9%25BF%25E4%25B8%2 59C" -C "WAP[p_wh]=VIP_NH" -C "WAP[hide_wh_tip]=1" -C "time_offset=3" -C "wap_so urce=wap" -C "warehouse=VIP_NH" -C "WAP_cart_history=1" -C "WAP_ID=9ff2476288ee0 4fcbffe2785f51b603b3b5ebdbe" -C "m_new_index=1" -C "WAP[show]=1" -C "WAP[brd_lst _addtocart]=308297" -C "WAP_brand_return_url=a%3A5%3A%7Bi%3A0%3Bs%3A69%3A%22http %3A%2F%2Fweibo.com%2Fbillfeller%2Fprofile%3Frightmod%3D1%26wvr%3D6%26mod%3Dperso nnumber%22%3Bi%3A1%3Bs%3A27%3A%22http%3A%2F%2Fm.vip.com%2Findex.html%22%3Bi%3A2% 3Bs%3A17%3A%22http%3A%2F%2Fm.vip.com%2F%22%3Bi%3A3%3Bs%3A100%3A%22http%3A%2F%2Fm .vip.com%2Findex.php%3Fm%3Dspecial%26p%3D%2Fte%2Fpermanent%2Fs8900_nh_index.php% 26h%3Dmzt.vip.com%26wapid%3Dmzt_8900%22%3Bi%3A4%3Bs%3A17%3A%22http%3A%2F%2Fm.vip .com%2F%22%3B%7D" -C "WAP[back_act]=%2Fproduct-308297-40225817.html" -C "WAP_rec _product_id=40225817" -C "WAP_rec_brand_id=308297" -C "WAP_referer_url=http%3A%2 F%2Fm.vip.com%2Fbrand-308297-0-0-0-1-0-1-20.html" -C "mars_pid=116" -C "mars_cid =1418638667918_e0a48b526d042c1c682e5c440b10d3b0" -C "mars_sid=6ec2bbb831359468f4 64ba2ae0a63d39" -C "visit_id=4C43ACFB3D5E82D9D4552BB098E43692" -C "WAP_u_new=new " -C "m_vipruid=58788556" -C "wap_consumer=C12" "http://m.vip.com/ajaxapi-addPro ductIdToBH.html?s=1418696408150&productId=40225817" 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 m.vip.com (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: nginx/1.2.4 Server Hostname: m.vip.com Server Port: 80

Document Path: /ajaxapi-addProductIdToBH.html?s=1418696408150&productId =40225817 Document Length: 40 bytes

Concurrency Level: 10 Time taken for tests: 29.207 seconds Complete requests: 1000 Failed requests: 2 (Connect: 0, Receive: 0, Length: 2, Exceptions: 0) Write errors: 0 Non-2xx responses: 2 Total transferred: 985882 bytes HTML transferred: 40240 bytes Requests per second: 34.24 [#/sec] (mean) Time per request: 292.071 [ms] (mean) Time per request: 29.207 [ms] (mean, across all concurrent requests) Transfer rate: 32.96 [Kbytes/sec] received

Connection Times (ms) min mean[+/-sd] median max Connect: 0 1 2.8 0 31 Processing: 63 279 673.3 118 8996 Waiting: 63 273 673.5 114 8996 Total: 63 280 673.3 118 8996

Percentage of the requests served within a certain time (ms) 50% 118 66% 132 75% 140 80% 146 90% 168 95% 2098 98% 2139 99% 3109 100% 8996 (longest request)

其中,各个参数表示:

  • Server Software: Web服务器版本信息(若Web服务器设置不显示则为空)
  • Server Hostname: Web服务器地址
  • Server Port: Web服务器端口
  • Document Path: 请求路径
  • Document Length: 测试请求响应长度
  • Concurrency Level: 并发数
  • Time taken for tests: 本次压力测试所花费的总时间数
  • Complete requests: 成功的请求数
  • Failed requests: 失败的请求数
  • Write errors: 写入失败的次数
  • Total transferred: 本次压力测试的总数据传输量(包括响应头和响应体)
  • HTML transferred: 本次压力测试的总数据传输量(仅计算响应体)
  • Requests per second: 平均每秒可响应多少请求
  • Time per request: 平均每個请求所花费的时间(单位: 毫秒)
  • Time per request: 平均每個请求所花费的时间,跨所有同时连接数的平均值(单位: 豪秒)
  • Transfer rate: 从ab到Web Server之間的网络传输速度

billfeller avatar Dec 16 '14 02:12 billfeller