服务器性能测试 ab

本文介绍如何使用ApacheBench(ab)进行网站压力测试。通过实际案例演示了安装ab工具、配置并发请求及请求数量等参数的过程,并展示了测试结果的各项指标。

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

ab 是 apache benchmark test 


如何使用它?


sudo apt-get install apache2-utils


 ab -c 10 -n 100 'dev-www.rakuten.co.id/cart'
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 dev-www.rakuten.co.id (be patient).....done




Server Software:        nginx/1.1.19
Server Hostname:        dev-www.rakuten.co.id
Server Port:            80


Document Path:          /cart
Document Length:        79518 bytes


Concurrency Level:      10
Time taken for tests:   19.243 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      8013200 bytes
HTML transferred:       7951800 bytes
Requests per second:    5.20 [#/sec] (mean)
Time per request:       1924.335 [ms] (mean)
Time per request:       192.433 [ms] (mean, across all concurrent requests)
Transfer rate:          406.65 [Kbytes/sec] received


Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   1.8      0       7
Processing:   250 1906 191.8   1900    2146
Waiting:      245 1744 175.0   1739    2013
Total:        251 1907 192.5   1900    2153


Percentage of the requests served within a certain time (ms)
  50%   1900
  66%   1909
  75%   1966
  80%   1966
  90%   2015
  95%   2153
  98%   2153
  99%   2153
 100%   2153 (longest request)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值