web性能测试工具

相关工具:webbench 、Apache bench

压力测试相关指标

  • 吞吐量(Requests per second, RPS),某个并发用户数下,单位时间内处理的请求数。

    注:RPS是基于并发用户数的。 R P S = C o m p l e t e r e q u e s t s / T i m e t a k e n f o r t e s t s RPS = Complete\ requests / Time\ taken\ for\ tests RPS=Complete requests/Time taken for tests

  • 并发连接数(The number of concurrent connections),指的是某个时刻服务器所接受的请求数目。

  • 并发用户数(The number of concurrent users, Concurrency Level)

    注:与并发连接数的区别,一个用户可能同时产生多个会话,即连接数。

  • 用户平均请求等待时间(Time per request) T i m e p e r r e q u e s t = T i m e t a k e n f o r t e s t s / ( C o m p l e t e r e q u e s t s / C o n c u r r e n c y L e v e l ) Time \ per\ request = Time\ taken\ for\ tests / (Complete\ requests / Concurrency\ Level) Time per request=Time taken for tests/(Complete requests/Concurrency Level)

webbench

webbench的标准测试可以向我们展示服务器的两项内容:每秒钟相应请求数和每秒钟传输数据量。webbench不但能具有便准静态页面的测试能力,还能对动态页面(ASP,PHP,JAVA,CGI)进 行测试的能力。还有就是他支持对含有SSL的安全网站例如电子商务网站进行静态或动态的性能测试。Webbench最多可以模拟3万个并发连接去测试网站的负载能力。

http://home.tiscali.cz/~cz210552/webbench.html

  • webbench安装

    wget http://www.ha97.com/code/webbench-1.5.tar.gz
    tar zxvf webbench-1.5.tar.gz
    cd webbench-1.5
    make
    make install
    
  • webbench使用

    webbench -c 1000 -t 60 URL
    webbench -c 并发数 -t 运行测试时间 URL
    
  • 命令行选项:

    短参 长参数 作用
    -f –force 不需要等待服务器响应
    -r –reload 发送重新加载请求
    -t –time 运行多长时间,单位:秒"
    -p –proxy server:port 使用代理服务器来发送请求
    -c –clients 创建多少个客户端,默认1个"
    -9 –http09 使用 HTTP/0.9
    -1 –http10 使用 HTTP/1.0 协议
    -2 –http11 使用 HTTP/1.1 协议
    –get 使用 GET请求方法
    –head 使用 HEAD请求方法
    –options 使用 OPTIONS请求方法
    –trace 使用 TRACE请求方法
    -?/-h –help 打印帮助信息
    -V –version 显示版本号

Apache bench

ab命令会创建很多的并发访问线程,模拟多个访问者同时对某一URL地址进行访问。

  • 命令行选项:

    Options are:-n requests     Number of requests to perform-c concurrency  Number of multiple requests to make at a time-t timelimit    Seconds to max. to spend on benchmarkingThis implies -n 50000-s timeout      Seconds to max. wait for each responseDefault is 30 seconds-b windowsize   Size of TCP send/receive buffer, in bytes-B address      Address to bind to when making outgoing connections-p postfile     File containing data to POST. Remember also to set -T-u putfile      File containing data to PUT. Remember also to set -T-T content-type Content-type header to use for POST/PUT data, eg.'application/x-www-form-urlencoded'Default is 'text/plain'-v verbosity    How much troubleshooting info to print-w              Print out results in HTML tables-i              Use HEAD instead of GET-x attributes   String to insert as table attributes-y attributes   String to insert as tr attributes-z attributes   String to insert as td or th attributes-C attribute    Add cookie, eg. 'Apache=1234'. (repeatable)-H attribute    Add Arbitrary header line, eg. 'Accept-Encoding: gzip'Inserted after all normal header lines. (repeatable)-A attribute    Add Basic WWW Authentication, the attributesare a colon separated username and password.-P attribute    Add Basic Proxy Authentication, the attributesare a colon separated username and password.-X proxy:port   Proxyserver and port number to use-V              Print version number and exit-k              Use HTTP KeepAlive feature-d              Do not show percentiles served table.-S              Do not show confidence estimators and warnings.-q              Do not show progress when doing more than 150 requests-l              Accept variable document length (use this for dynamic pages)-g filename     Output collected data to gnuplot format file.-e filename     Output CSV file with percentages served-r              Don't exit on socket receive errors.-m method       Method name-h              Display usage information (this message)

测试一下自己的web服务器

ab -n 10000 -c 100 URL

测试10000个请求,100并发的情况,对应的服务器配置,在VBOX下6G内存+4核CPU,在本机运行测试程序,测试结果如下

Server Software:
Server Hostname:        ****
Server Port:            ****Document Path:          /
Document Length:        1131 bytesConcurrency Level:      100
Time taken for tests:   119.681 seconds
Complete requests:      10000
Failed requests:        0
Total transferred:      11890000 bytes
HTML transferred:       11310000 bytes
Requests per second:    83.56 [#/sec] (mean)
Time per request:       1196.808 [ms] (mean)
Time per request:       11.968 [ms] (mean, across all concurrent requests)
Transfer rate:          97.02 [Kbytes/sec] receivedConnection Times (ms)min  mean[+/-sd] median   max
Connect:        0   11  97.6      1    1015
Processing:     6 1176 1295.6    546    7227
Waiting:        1  814 1063.4    212    5327
Total:          7 1187 1303.6   1101    7228Percentage of the requests served within a certain time (ms)50%   110166%   126375%   148980%   223490%   322395%   422698%   526099%   5336100%   7228 (longest request)

可以看到请求最长响应时间是7.2s,failed requests为0,RPS为83.56

Web服务器性能测试工具介绍相关推荐

  1. windows web服务器性能测试工具,Web 性能测试编辑器概述

    Web 性能测试编辑器概述 02/21/2013 本文内容 在记录了 Web 性能测试之后,可以用 Web 性能测试编辑器来编辑所记录的 Web 性能测试.通常,可以使用 Web 性能测试记录器来记录 ...

  2. windows web服务器性能测试工具,网站性能Web压力测试工具webbench

    webbench最多可以模拟3万个并发连接去测试网站的负载能力,个人感觉要比Apache自带的ab压力测试工具好,安装使用也特别方便. 1.适用系统:Linux 2.编译安装: wget http:/ ...

  3. Web服务器性能测试介绍

    Web服务器性能测试介绍 一.引言 随着Internet的快速发展,Web服务器已成为Web系统的重要组成部分,同时也是影响Web系统性能的主要因素,因此Web服务器性能的好坏一直是人们关注的问题.同 ...

  4. 性能测试 理论初探(七) 性能测试工具 介绍 目前知道哪些性能工具?分别用在什么软件或平台的性能测试?服务端、web前端、移动端等 性能测试工具有哪些?

    文章目录 一.前言 二.常见性能测试工具 1.服务端性能测试工具 1.1 Jmeter 1.2 Locust 1.3 LoadRunner 1.4 LoadNinja 1.5 Jmeter + Pro ...

  5. was web 服务器性能测试,was web 服务器性能测试

    was web 服务器性能测试 内容精选 换一换 cd /home/ior-master/src/home/OpenMPI/bin/mpirun --allow-run-as-root -machin ...

  6. linux web 服务器性能,Linux系统Web服务器性能测试(2)

    2.系统内存的影响 在linux系统下,有一点需要注意:对于某些BIOS来说,如果超过64MB内存就需要在LILO.CONF中加入扩展内存的命令,否则服务器内存显示只有64MB.我们对64MB内存和1 ...

  7. linux对web后端重要吗,基于Linux的Web服务器性能测试

    摘要:Linux作为一种免费的开源操作系统,正越来越受到人们的重视.随着稳定的Linux2.4内核发布日期的临近和IntelIA-64构架的推出,Linux在服务器操作系统市场所占的份额会继续扩大,那 ...

  8. Web安全测试工具介绍

    如今,Web 技术繁荣发展的同时,也带来了前所未有的安全挑战.有数据统计,所有黑客入侵事件中,85% 以上都是针对 Web 应用漏洞发起的攻击. Web安全测试工具介绍 nikto 向目标发送探测数据 ...

  9. Web Service 性能测试工具比较

    背景 希望选择一款Web Service性能测试工具,能真实模拟大量用户访问网站时的请求,从而获取服务器当前的请求处理能力(请求数/秒). 以微信服务器为例,每个用户用独立的登录token,做各种操作 ...

最新文章

  1. 北电PBX资料_LD 17 系統結構指令設定
  2. mysql.zip要什么下载_mysql用zip安装方法是什么
  3. C++实现简单的信息管理系统
  4. TCP协议下 Socket 与 ServerSocket
  5. python Raw I/O
  6. 2020.07.08_Multi-passage BERT: A Globally Normalized BERT Model for Open-domain Question Answering
  7. 是!“不会数据分析的,全是假程序员”!HR:太真实……
  8. Windows Server入门系列之三 硬盘分区
  9. Git 使用文档( git pull/fetch )
  10. IE10 访问 ASP.NET 站点的问题
  11. Install deepin-wine QQ inside a docker image in Ubuntu 20.04
  12. 用思科模拟器对交换机进行超级终端配置和Telnet远程登录配置
  13. DeepL Pro(deepl翻译器)官方中文版V2.2.0 | 翻译软件哪个好用 | 翻译软件排行榜前十的神器
  14. 用Python读写Word文档入门
  15. win7系统中建立家庭局域网
  16. pytorch中的所有随机数(normal、rand、randn、randint、randperm) 以及 随机数种子(seed、manual_seed、initial_seed)
  17. JavaScrpit+Html实现日期时间启动、停止操作(应用场景:计时器、秒表)
  18. EVC4 安装与初步使用
  19. 机器学习案例(七):产品需求预测
  20. oracle字段长度不足位数补零

热门文章

  1. oracle数据库常用操作
  2. 注册表 关闭打印机服务器,Windows 2016 server部署打印机服务器后 重启服务器,出现“重定向的打印机”,如何来删除?...
  3. 测试开发--java
  4. python学习笔记分享(四十)网络爬虫(7)反爬虫问题,解决中文乱码,登陆和验证码处理
  5. MATLAB画旋转曲面1
  6. 2008年8月6号,晴,今天天气已经变热了。少壮不努力,老大徒悲伤。 —— 汉乐府古辞《长歌行》
  7. 查看表空间及增加表空间
  8. idea jar包在x-shell 上执行,并使用jara -jar
  9. file html5 样式,CSS小技巧之自定义个性的file表单样式
  10. 签个到,哎,下午的数值计算可以考的好点的。。。。忧桑。。。