服务器维护,服务器代维,安全设置,漏洞扫描,入侵检测服务

运维之家

 找回密码
 注册
搜索
查看: 4653|回复: 0

linux 下常用的3款压力测试工具

[复制链接]
dirtysea 发表于 2011-11-19 14:57:03 | 显示全部楼层 |阅读模式
1.Siege
一款开源的压力测试工具,可以根据配置对一个WEB站点进行多用户的并发访问,记录每个用户所有请求过程的相应时间,并在一定数量的并发访问下重复进行。
wget ftp://ftp.joedog.org/pub/siege/siege-latest.tar.gz
# tar -zxf siege-latest.tar.gz
**解压目录:
# cd siege-2.65/
安装:
#./configure ; make
#make install
使用
siege -c 200 -r 10 www.abc.com
-c是并发量,-r是重复次数。
Transactions:                   2000 hits   //完成2000次处理
Availability:                 100.00 % //成功率
Elapsed time:                  13.97 secs //总共用时
Data transferred:              11.37 MB //共数据传输
Response time:                  0.22 secs //显示网络连接的速度
Transaction rate:             143.16 trans/sec //均每秒完成143.16次处理
Throughput:                     0.81 MB/sec //平均每秒传送数据
Concurrency:                   31.56 //实际最高并发数
Successful transactions:        2000 //成功处理次数
Failed transactions:               0  //失败处理次数
Longest transaction:            6.31 //每次传输所花最长时间
Shortest transaction:           0.03 //每次传输所花最短时间

2.webbench
获取并安装
wget http://home.tiscali.cz:8080/~cz2 ... webbench-1.5.tar.gz
tar zxvf webbench-1.5.tar.gz
cd webbench-1.5
make && make install
如果找不到源就网上搜个吧
使用:
webbench -c 500 -t 30 http://www.abc.com
参数说明:-c表示并发数,-t表示时间(秒)
4测试结果示例:
Webbench - Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://www.taoav.com
500 clients, running 30 sec.
Speed=3230 pages/min, 11614212 bytes/sec.
Requests: 1615 susceed, 0 failed.
3.ab
apache自带测试工具,在apache2的bin目录里
测试例子: ab -n 10000 -c 100 -t 10 http://www.abc.com
参数: -n 表示请求总数, -c 表示并发数. -t 表示请求时间限制
以下为结果
Server Software: Apache/2.0.53
Server Hostname: www.taoav.com
Server Port: 80
Document Path: /index.php
Document Length: 17998 bytes
Concurrency Level: 100
Time taken for tests: 660.930623 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 181850000 bytes
HTML transferred: 179980000 bytes
Requests per second: 15.13 (mean)
Time per request: 6609.306 (mean)
Time per request: 66.093 (mean, across all concurrent requests)
Transfer rate: 268.69 received
Connection Times (ms)
min mean median max
Connect: 0 15 117.6 0 1730
Processing: 436 6564 1142.2 6517 15395
Waiting: 340 4164 1512.2 3906 14973
Total: 436 6579 1143.4 6526 15395
Percentage of the requests served within a certain time (ms)
50% 6526
66% 6972
75% 7262
80% 7377
90% 7755
95% 8295
98% 8683
99% 9815
100% 15395 (longest request)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|手机版|Archiver|运维之家

GMT+8, 2024-3-29 07:58 , Processed in 0.189404 second(s), 14 queries .

Powered by Dirtysea

© 2008-2020 Dirtysea.com.

快速回复 返回顶部 返回列表