首页 技术 正文
技术 2022年11月20日
0 收藏 827 点赞 4,503 浏览 1840 个字

优点:参数少;缺点:url.txt文件要求较高,不如siege方便

http_load是ACME实验室开发的,这个工具以并发方式运行,用以测试web服务器的吞吐量与负载。它不同于其它压力测试工具的是,它能以单一的进程运行,一般不会使客户机down掉。同时在unix下,除了http它也可以用来测试https类型的请求。官方地址:http://www.acme.com/software/http_load/

安装:
tar zxvf http_load-12mar2006.tar
cd http_load-12mar2006
make && make install                          /*make
install之间是有空格的,同时make install需要root权限*/

参数说明:
XXXXXXXXXXXXX:~/http_load-12mar2006$
http_load –help
usage:  http_load [-checksum] [-throttle]
[-proxy host:port] [-verbose] [-timeout secs] [-sip sip_file]
            -parallel N | -rate N
[-jitter]

-fetches N | -seconds N

url_file            /*需要访问的URL文本文件,文件格式是每行一个URL,URL最好超过50-100个测试效果比较好*/
One start specifier, either -parallel or -rate, is required.                              /*使用的时候 –parallel与-rate二选一*/
One end specifier, either -fetches or -seconds, is required.                         /*使用的时候 –feches与-second二选一*/

-parallel 简写-p :并发的用户进程数      /*http_load –p
500 –s 300 user.txt,并发500个进程,跑300秒*/

-rate 简写-r :每秒的访问频率                /*比如http_load –r 5 –s 10 url.txt,说的是每秒的访问频率是5次,共跑10秒*/

-fetches 简写-f :总计的访问次数          /*使用fetches能让客户端保证确定请求数的全部处理,更容易让被测服务器受到压力 */

-seconds简写-s :总计的访问时间

基本使用:

XXXXXXXXXXXXX:~/http_load-12mar2006$ http_load -p 10 -s 5 urls.txt     /*并发10个进程,访问5秒。Urls.txt内的文件格式为每行1个url地址。*/

操作结果:(测试的url.txt内的网址均为:http://www.test.com/index.html)

13995 fetches, 10
max parallel, 21948 bytes, in 5 seconds                          /*共运行了13995个请求,最大并发进程数是10,总传输数据是21948个字节,运行时间5秒*/

1.56827 mean bytes/connection                    /*21948字节/13995请求 = 每个连接平均传输的数据量是1.56827个字节*/

2799 fetches/sec, 4389.6 bytes/sec             /*服务器每秒能够响应的查询次数是2799个(13995/5),每秒传递的数据是4389.6 bytes*/

msecs/connect: 1.74836 mean, 3.757 max, 1.439 min                   /*每个连接的平均访问时间是1.748毫秒*/

msecs/first-response:
1.79729 mean, 5.463 max, 1.484 min      /**/

HTTP response
codes:

code 200 — 236

讨论/疑问:

  • 测试结果里的msecs/connect与msecs/first-response的差别在于?

其它参考链接:http://qa.blog.163.com/blog/static/19014700220121030101533936/

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,000
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,512
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,358
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,141
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,771
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,849