高并发測试工具webbench

2021-06-11 17:04

阅读:595

1.简单介绍

webbench最多能够模拟3万个并发连接去測试server的负载能力。编译和配置简单,仅基于TCP协议上对server进行測试。

Webbench也是开放源代码。从代码上看,每一个client都fork出一个进程进行測试。仅在TCP协议层对server測试。并未涉及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个client測试。执行命令:./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.


评论


亲,登录后才可以留言!