Use ApacheBench test HTTP performance.

使用ab(Apache Bench)工具进行网站性能测试,案例为同时发送10个并发请求到首页并运行100次。测试结果显示,完成100次请求耗时210.46875秒,服务器平均每秒处理0.48个请求。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

abApacheBenchis Apache http performance test tools.

 

Case: Send 10 concurrency requests to open index page at same time and run 100 times.

 

Input the below command at CMD shell: ab -n 10 -c 10  http://10.136.4.22/

 

The result will be show as below:

C:/Program Files/Apache Software Foundation/Apache2.2/bin>ab -n 100 -c 10 http://10.136.4.22/

This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0

Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/

Copyright 2006 The Apache Software Foundation, http://www.apache.org/

 

Benchmarking 10.136.4.22 (be patient).....done

 

Server Software:

Server Hostname:        10.136.4.22

Server Port :            80

 

Document Path:          /

Document Length:        1614 bytes

 

Concurrency Level:      10

Time taken for tests:   210.46875 seconds

Complete requests:      100

Failed requests:        8

   (Connect: 8, Length: 0, Exceptions: 0)

Write errors:           0

Total transferred:      165500 bytes

HTML transferred:       161400 bytes

Requests per second:    0.48 [#/sec] (mean)

Time per request:       21004.688 [ms] (mean)

Time per request:       2100.469 [ms] (mean, across all concurrent requests)

Transfer rate:          0.77 [Kbytes/sec] received

 

Connection Times (ms)

              min  mean[+/-sd] median   max

Connect:        0  419 1273.0      0    8937

Processing:    31 18870 26075.4   3016   66078

Waiting:       31 8580 17128.0   3015   63093

Total:         31 19290 26039.3   3031   66093

 

Percentage of the requests served within a certain time (ms)

  50%   3031

  66%   6015

  75%  54000

  80%  54015

  90%  65968

  95%  65984

  98%  66000

  99%  66093

 100%  66093 (longest request)

 

Conclusion:

From the result, you can find: It cost 210.46875 seconds to run 100 times 10 concurrency request.

The server can process 048 requests per second.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值