支持https的压力测试工具

测试了linux下的几种压力测试工具,发现有些不支持https,先简单总结如下:

一、apache的ab工具

/home/webadm/bin/ab -c 50 -n 10000 https://2hei.net/mt/index.html
SSL not compiled in; no https support
看样子是说SSL没有编译进来,所以不支持https

二、apache的flood工具

http://httpd.apache.org/test/flood/

wget http://www.apache.org/dist/httpd/flood/flood-0.4.tar.gz

如果要支持https的话,需要添加如下的编译参数:–with-apr –with-apr-util –enable-ssl
具体代码也可以从svn获取。
不过我在编译的时候遇到一些问题,apr-util包在make的时候总是报错!

三、web-bench工具

http://freshmeat.net/projects/web-bench/

./webbench -c 20 -t 10 https://2hei.net/mt/index.html
Webbench – Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.

Only HTTP protocol is directly supported, set –proxy for others.
明确提示了提示不支持https哦!

四、http_load工具,曾经的最爱,http测试的结果还很令人满意。

http://acme.com/software/http_load/
./http_load -rate 5 -seconds 10 urls
./http_load: unknown protocol – https://2hei.net/mt/index.html
吼吼,看来之前常用的http_load也不支持https

五、siege工具

http://www.joedog.org/index/siege-home

编译使之支持https
./configure –prefix=/home/2hei.net/siege –with-ssl=/usr/include/openssl

基本用法:
./siege
SIEGE 2.69
Usage: siege [options]
       siege [options] URL
       siege -g URL
Options:
  -V, –version           VERSION, prints version number to screen.
  -h, –help              HELP, prints this section.
  -C, –config            CONFIGURATION, show the current configuration.
  -v, –verbose           VERBOSE, prints notification to screen.
  -g, –get               GET, pull down headers from the server and display HTTP
                          transaction. Great for web application debugging.
  -c, –concurrent=NUM    CONCURRENT users, default is 10
  -u, –url=”URL”         Deprecated. Set URL as the last argument.
  -i, –internet          INTERNET user simulation, hits the URLs randomly.
  -b, –benchmark         BENCHMARK, signifies no delay for time testing.
  -t, –time=NUMm         TIME based testing where “m” is the modifier S, M, or H
                          no space between NUM and “m”, ex: –time=1H, one hour test.
  -r, –reps=NUM          REPS, number of times to run the test, default is 25
  -f, –file=FILE         FILE, change the configuration file to file.
  -R, –rc=FILE           RC, change the siegerc file to file.  Overrides
                          the SIEGERC environmental variable.
  -l, –log               LOG, logs the transaction to PREFIX/var/siege.log
  -m, –mark=”text”       MARK, mark the log file with a string separator.
  -d, –delay=NUM         Time DELAY, random delay between 1 and num designed
                          to simulate human activity. Default value is 3
  -H, –header=”text”     Add a header to request (can be many)
  -A, –user-agent=”text” Sets User-Agent in request

siege -c 20 -r 2 -f url
-c 20 并发20个用户
-r 2 重复循环2次
-f url 任务列表:URL列表

结论相当凑合,纵欲找到可以支持https压力测试的工具了。

六、httperf工具,来自hp的工具,不过已经n年没有更新了。

wget ftp://ftp.hpl.hp.com/pub/httperf/httperf-0.9.0.tar.gz

$ mkdir build
        $ cd build
        $ SRCDIR/configure
        $ make
        $ make install

工具使用方法:
/usr/local/bin/httperf –help
Usage: httperf [-hdvV] [--add-header S] [--burst-length N] [--client N/N]
        [--close-with-reset] [--debug N] [--failure-status N]
        [--help] [--hog] [--http-version S] [--max-connections N]
        [--max-piped-calls N] [--method S] [--no-host-hdr]
        [--num-calls N] [--num-conns N] [–period [d|u|e]T1[,T2]]
        [--port N] [–print-reply [header|body]] [–print-request [header|body]]
        [--rate X] [--recv-buffer N] [--retry-on-failure] [--send-buffer N]
        [--server S] [--server-name S] [--session-cookies]
        [--ssl] [--ssl-ciphers L] [--ssl-no-reuse]
        [--think-timeout X] [--timeout X] [--uri S] [--verbose] [--version]
        [--wlog y|n,file] [--wsess N,N,X] [--wsesslog N,X,file]
        [--wset N,X]
如:
/usr/local/bin/httperf –server www.2hei.net \
   –port 443 –uri /mt/index.html \
   –rate 15 –num-conn 1000 \
   –num-call 1 –timeout 5

发现会有如下错误:
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE
以下是解决办法:
#
Edit /etc/security/limits.conf and add the line * hard nofile 65535 (or
instead of * you can put the username of the user for whom you want to
change the limit)
# Edit /usr/include/bits/typesizes.h and change
#define __FD_SET_SIZE 1024 to #define __FD_SET_SIZE 65535 (in
/usr/include/sys/select.h FD_SETSIZE is defined as __FD_SETSIZE)
重新编译即可。

实例测试如下:
/usr/local/bin/httperf –client=0/1 –ssl –server=www.2hei.net –port=443 –uri=/mt/index.html –rate=1 –num-conns=1000 –rate=50 –num-calls=1 –hog
httperf –hog –client=0/1 –server=www.2hei.net –port=443 –uri=/mt/index.html –rate=50 –send-buffer=4096 –rec
v-buffer=16384 –ssl –num-conns=1000 –num-calls=1
Maximum connect burst length: 1

Total: connections 1000 requests 1000 replies 1000 test-duration 33.758 s

Connection rate: 29.6 conn/s (33.8 ms/conn, <=394 concurrent connections)
Connection time [ms]: min 73.1 avg 6513.5 max 22013.1 median 5371.5 stddev 4176.3
Connection time [ms]: connect 5670.7
Connection length [replies/conn]: 1.000

Request rate: 29.6 req/s (33.8 ms/req)
Request size [B]: 80.0

Reply rate [replies/s]: min 26.6 avg 31.3 max 33.6 stddev 2.4 (6 samples)
Reply time [ms]: response 842.7 transfer 0.0
Reply size [B]: header 331.0 content 163.0 footer 2.0 (total 496.0)
Reply status: 1xx=0 2xx=1000 3xx=0 4xx=0 5xx=0

CPU time [s]: user 9.91 system 23.11 (user 29.4% system 68.5% total 97.8%)
Net I/O: 16.6 KB/s (0.1*10^6 bps)

Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0

支持https的压力测试工具的更多相关文章

  1. DNS压力测试工具dnsperf简介

    dnsperf是我最近写的一个开源的DNS压力测试工具,用户可以用它来对DNS服务器或者Local DNS做压力测试.dnsperf目前的实现是单进程模式,通过epoll非阻塞地处理网络事件. dns ...

  2. WEB压力测试工具Pylot试用

    Pylot介绍 转载自[http://www.freehao123.com/pylot-web/] 为了能够准确地评估网站服务器对网络流量的承受能力,我们一般会采取模拟网站用户访问,通过不断地增加并发 ...

  3. 十个免费的Web压力测试工具

    两天,jnj在本站发布了<如何在低速率网络中测试 Web 应用>,那是测试网络不好的情况.而下面是十个免费的可以用来进行Web的负载/压力测试的工具,这样,你就可以知道你的服务器以及你的W ...

  4. MQTT压力测试工具之JMeter插件教程

    基于Jmeter的MQTT测试插件-上 1. Jmeter插件简介 Apache JMeter是Apache组织开发的基于Java的压力测试工具.下载 用于对软件做压力测试,它最初被设计用于Web应用 ...

  5. web压力测试工具(小而精)

    实际的测试过程中,我们一般都是采用A.B两台机器,一台跑Web服务,另外一台跑ab测试.也有的情况是单机对单机可能测不出结果,那就要采用很多台机器同是跑AB去请求一台机器进行测试,根据多台机器反馈的结 ...

  6. Gatling新一代压力测试工具,新一代服务器性能测试工具Gatling

    Gatling新一代压力测试工具新一代服务器性能测试工具Gatlinghttp://www.infoq.com/cn/articles/new-generation-server-testing-to ...

  7. Mysql 压力测试工具 mysqlslap

    转载至文章作者:杜亦舒 链接:https://www.sdk.cn/news/4512 来源:SDK.cn 摘要:mysqlslap 是 Mysql 自带的压力测试工具,可以模拟出大量客户端同时操作数 ...

  8. Jmeter使用指南----压力测试工具

    来源: https://blog.csdn.net/u012111923/article/details/80705141 https://www.cnblogs.com/st-leslie/p/51 ...

  9. 十个免费的 Web 压力测试工具

    本文列举了是十个免费工具,可以用来进行Web的负载/压力测试的.这样你就可以知道你的服务器以及你的WEB应用能够扛得住多少的并发量,以及网站性能. 0. Grinder –  Grinder是一个开源 ...

随机推荐

  1. Android 展示键盘时候布局被修改的问题

    解决方法,在mainfest.xml中,对那个Activity加: <activity android:name=".activity.HomeActivity"androi ...

  2. 独木舟上的旅行--nyoj题目71

    独木舟上的旅行 时间限制:3000 ms  |  内存限制:65535 KB 难度:2   描述 进行一次独木舟的旅行活动,独木舟可以在港口租到,并且之间没有区别.一条独木舟最多只能乘坐两个人,且乘客 ...

  3. PHP单例模式编写

    今天来点基础的设计模式: 如何利用单例模式实现一个数据库中间层 class Db{ static private $_instance; //当前数据库连接实例 static public funct ...

  4. 如何不让oracle使用linux的swap分区

    经常看到swap分区被使用,被缓存的内容本来是为了增加命中率,结果去不断换入换出,导致本地磁盘IO增加,影响访问速度.所以在内存充足的情况下,如果我们觉得不需要使用swap分区的时候,那就要想办法尽量 ...

  5. Linux id 命令 - 显示用户id和组id信息

    要登入一台计算机,我们需要一个用户名.用户名是一个可以被计算机识别的身份.基于此,计算机会对使用这个用户名的登陆的人应用一系列的规则.在Linux系统下,我们可以使用 id 命令. 什么是 id 命令 ...

  6. ShareSDK QQ分享失败的坑

    QQ分享的话,有标题和内容字符数限制,QQ好友的话限制的很小,标题30字符,内容40字符.分享之前限制一下.

  7. SEO,你敢说你会吗?

    SEO从何開始学起?SEO基础知识我们须要掌握哪些?SEO是什么?SEO究竟要怎么做?这些问题无时无刻不在困惑着我们.就我个人一些小观点来谈谈一个站点优化的大致步骤. SEO初期阶段 空间域名:空间跟 ...

  8. vs2010编译live555源码

    最近加入了公司的C++视频小组,利用中秋这个假期将研究了一些live555的源码,现在先将如何编译使用vs2010编译live555,整理出来,对以后分析代码有很大帮助. 1.下载live555源码, ...

  9. 修改Chrome的User Agent的方法 真实有效

    如何修改Chrome的User Agent: 通过网络上查找,修改Chrome的Usre Agent有3种方式,但有的方式是不起作用的. 给Chrome添加启动参数(有作用) 通过扩展-User-Ag ...

  10. VMware虚拟机与主机联通及配置上网

    vmware版本:10.0.0 build-1295980,安装redhat enterprise linux 5.8 一.物理机与虚拟机联通,但不联网 1.虚拟网络VMnet1设置: 此时,物理主机 ...