Chinaunix首页 | 论坛 | 博客
  • 博客访问: 477287
  • 博文数量: 125
  • 博客积分: 3178
  • 博客等级: 中校
  • 技术积分: 1329
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-19 08:20
文章分类

全部博文(125)

文章存档

2014年(2)

2013年(2)

2012年(3)

2011年(3)

2009年(2)

2008年(17)

2007年(52)

2006年(44)

我的朋友

分类: LINUX

2007-10-20 14:20:01

ABOUT SIEGE
Siege is an http regression testing and benchmarking utility. It was designed to let web developers measure the performance of their code under duress, to see how it will stand up to load on the internet. Siege supports basic authentication, cookies, HTTP and HTTPS protocols. It allows the user hit a web server with a configurable number of concurrent simulated users. Those users place the webserver "under siege."

PLATFORM SUPPORT
Siege was written on GNU/Linux and has been successfully ported to AIX, BSD, HP-UX and Solaris. It should compile on most System V UNIX variants and on most newer BSD systems. Because Siege relies on POSIX.1b features not supported by Microsoft, it will not run on Windows. Of course you can use Siege to test a Windows HTTP server.




安装:
#./configure
# make
#make install

#siege -help 帮助
使用样例:
任务列表:文件
siege -c 100 -r 100-f
参数说明:
-c 100 并发100个用户
-r 100 重复循环100次
-f 任务列表:URL列表
-t 2H 或 -t 120M 或者说-t 7200S 运行时间

输出样例:

** Siege 2.66
** Preparing 100 concurrent users for battle. 这次“战斗”准备了100个并发用户
The server is now under siege.. done. 服务在“围攻”测试中:
Transactions: 100 hits 完成40次处理
Availability: 80.00 % 成功率
Elapsed time: 50.67 secs 总共用时
Data transferred: 9077341 bytes 共数据传输:9077341字节
Response time: 5.6 secs 相应用时10.6秒:显示网络连接的速度
Transaction rate: 10.22 trans/sec 平均每秒完成5.22次处理:表示服务器后台处理的速度
Throughput: 114385.92 bytes/sec 平均每秒传送数据:114385.92字节
Concurrency: 50.59 最高并发数 8.59
Successful transactions: 88 成功处理次数
Failed transactions: 12 失败处理次数

注意:由于速度很快,可能会达不到并发速度很高就已经完成。Response time显示的是测试机器和被测试服务器之间网络链接状况。Transaction rate则表示服务器端任务处理的完成速度。

辅助工具:
增量压力测试:

为了方便增量压力测试,siege还包含了一些辅助工具:
bombardment (1)
是一个辅助工具:用于按照增量用户压力测试:
使用样例:
bombardment urlfile.txt 5 3 4 1
初始化URL列表:urlfile.txt
初始化为:5个用户
每次增加:3个用户
运行:4次
每个客户端之间的延迟为:1秒

输出成CSV格式:
siege2csv.pl (1)
siege2csv.pl将bombardment的输出变成CSV格式:
Time Data Transferred Response Time Transaction Rate Throughput Concurrency Code 200 (note that this is horribly broken.)
242 60.22 603064 0.02 4.02 10014.35 0.08
605 59.98 1507660 0.01 10.09 25136.05 0.12
938 59.98 2337496 0.02 15.64 38971.26 0.26
1157 60 2883244 0.04 19.28 48054.07 0.78


阅读(1512) | 评论(0) | 转发(0) |
0

上一篇:下一代网络

下一篇:webload

给主人留下些什么吧!~~