标签:
1.简介
webbench最多可以模拟3万个并发连接去测试服务器的负载能力,编译和配置简单,仅基于TCP协议上对服务器进行测试。Webbench也是开放源码,从代码上看,每个客户端都fork出一个进程进行测试,仅在TCP协议层对服务器测试,并未涉及HTTP协议。
2.安装
源码下载: http://blog.s135.com/soft/linux/webbench/webbench-1.5.tar.gz
tar zxvf webbench-1.5.tar.gz
cd webbench-1.5
make
注:如果安装过程中出现/bin/sh: ctags: command not found
则需安装ctags,下载地址:wget http://prdownloads.sourceforge.net/ctags/ctags-5.8.tar.gz
3.测试
1分钟1000个客户端测试,运行命令:./webbench -c 1000 -t 60
4.测试报告
[root@nmsuser webbench-1.5]# ./webbench -c 200 http://172.31.186.100:8080/Map/index.jsp
Webbench - Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://172.31.186.100:8080/Map/index.jsp
200 clients, running 30 sec.
Speed=246578 pages/min, 27904904 bytes/sec.
Requests: 123079 susceed, 210 failed.
[root@nmsuser webbench-1.5]# ./webbench -c 200 http://172.31.186.100:8080/Map/index.jsp
Webbench - Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://172.31.186.100:8080/Map/index.jsp
200 clients, running 30 sec.
Speed=246578 pages/min, 27904904 bytes/sec.
Requests: 123079 susceed, 210 failed.
标签:
原文地址:http://my.oschina.net/Majw/blog/499303