您的位置:首页 > 运维架构 > 网站架构

网站压力测试工具webbench简介、安装、使用

2013-04-15 20:54 901 查看
安装webbench[root@lnmp webbench-1.5]# make [root@lnmp webbench-1.5]# make install

webbench [option]... URL -f|--force Don't wait for reply from server. -r|--reload Send reload request - Pragma: no-cache. -t|--time <sec> Run benchmark for <sec> seconds. Default 30.-p|--proxy <server:port> Use proxy server for request. -c|--clients <n> Run <n> HTTP clients at once. Default one.-9|--http09 Use HTTP/0.9 style requests. -1|--http10 Use HTTP/1.0 protocol. -2|--http11 Use HTTP/1.1 protocol. --get Use GET request method. --head Use HEAD request method. --options Use OPTIONS request method. --trace Use TRACE request method. -?|-h|--help This information. -V|--version Display program version.
测试结果[root@lnmp ~]# webbench -c 100 -t 30 http://192.168.30.110/index.phpWebbench - Simple Web Benchmark 1.5Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://192.168.30.110/index.php100 clients, running 30 sec.
Speed=14772 pages/min, 12939751 bytes/sec.Requests: 7386 susceed, 0 failed.
-c 指定连接的用户数-t 指定连接的时间(s)根据请求requests可以看到效果
查看负载top - 00:34:43 up 19 min, 1 user, load average: 0.00, 0.00, 0.00Tasks: 75 total, 1 running, 74 sleeping, 0 stopped, 0 zombieCpu(s): 0.3%us, 0.0%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%stMem: 236536k total, 173644k used, 62892k free, 10228k buffersSwap: 2031608k total, 604k used, 2031004k free, 77744k cached
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息