Web测试工具 http_load 一个httpd 压力测试工具
2016-01-15 17:03
961 查看
Web测试工具 http_load 一个httpd 压力测试工具
linux版到http://www.acme.com/software/http_load/ 下载http_load ,安装直接make;make instlall 就行。
windows版请到http://pan.baidu.com/s/1qW6xk2C下载
参数说明:
-parallel 简写-p :含义是并发的用户进程数。
-fetches 简写-f :含义是总计的访问次数
-rate 简写-p :含义是每秒的访问频率
-seconds 简写-s :含义是总计的访问时间
urls.txt 是一个url 列表,每个url 单独的一行。当然也可以直接跟一个url 而不是url 列表文件。
实例:
http_load -rate 5 -seconds 10 urls
49 fetches, 2 max parallel, 289884 bytes, in 10.0148 seconds
5916 mean bytes/connection
4.89274 fetches/sec, 28945.5 bytes/sec
msecs/connect: 28.8932 mean, 44.243 max, 24.488 min
msecs/first-response: 63.5362 mean, 81.624 max, 57.803 min
HTTP response codes:
code 200 -- 49
分析:
1.49 fetches, 2 max parallel, 289884 bytes, in 10.0148 seconds
说明在上面的测试中运行了49个请求,最大的并发进程数是2,总计传输的数据是289884bytes,运行的时间是10.0148秒
2.5916 mean bytes/connection
说明每一连接平均传输的数据量289884/49=5916
3.4.89274 fetches/sec, 28945.5 bytes/sec
说明每秒的响应请求为4.89274,每秒传递的数据为28945.5 bytes/sec
4.msecs/connect: 28.8932 mean, 44.243 max, 24.488 min
说明每连接的平均响应时间是28.8932 msecs,最大的响应时间44.243 msecs,最小的响应时间24.488 msecs
5.msecs/first-response: 63.5362 mean, 81.624 max, 57.803 min
6、HTTP response codes: code 200 -- 49
说明打开响应页面的类型,如果403的类型过多,那可能要注意是否系统遇到了瓶颈。
特殊说明:这里,我们一般会关注到的指标是fetches/sec、msecs/connect
他们分别对应的常用性能指标参数Qpt-每秒响应用户数和response time,每连接响应用户时间。测试的结果主要也是看这两个值。当然仅有这两个指标并不能完成对性能的分析,我们还需要对服务器的cpu、men进行分析,才能得出结论
如果你需要测试https,你必须将 Makefile中
# CONFIGURE: If you want to compile in support for https, uncomment these
# definitions. You will need to have already built OpenSSL, available at
# http://www.openssl.org/ Make sure the SSL_TREE definition points to the
# tree with your OpenSSL installation - depending on how you installed it,
# it may be in /usr/local instead of /usr/local/ssl.
SSL_TREE = /usr
SSL_DEFS = -DUSE_SSL
SSL_INC = -I$(SSL_TREE)/include
SSL_LIBS = -L$(SSL_TREE)/lib -lssl -lcrypto
由于使用到openssl,你必须安装openssl和相应的开发环境
apt-get install openssl
apt-get install libssl-dev
find -name ssl.h
/usr/include/openssl/ssl.h
所以上面红色字体部分必须修改
linux版到http://www.acme.com/software/http_load/ 下载http_load ,安装直接make;make instlall 就行。
windows版请到http://pan.baidu.com/s/1qW6xk2C下载
参数说明:
-parallel 简写-p :含义是并发的用户进程数。
-fetches 简写-f :含义是总计的访问次数
-rate 简写-p :含义是每秒的访问频率
-seconds 简写-s :含义是总计的访问时间
urls.txt 是一个url 列表,每个url 单独的一行。当然也可以直接跟一个url 而不是url 列表文件。
实例:
http_load -rate 5 -seconds 10 urls
49 fetches, 2 max parallel, 289884 bytes, in 10.0148 seconds
5916 mean bytes/connection
4.89274 fetches/sec, 28945.5 bytes/sec
msecs/connect: 28.8932 mean, 44.243 max, 24.488 min
msecs/first-response: 63.5362 mean, 81.624 max, 57.803 min
HTTP response codes:
code 200 -- 49
分析:
1.49 fetches, 2 max parallel, 289884 bytes, in 10.0148 seconds
说明在上面的测试中运行了49个请求,最大的并发进程数是2,总计传输的数据是289884bytes,运行的时间是10.0148秒
2.5916 mean bytes/connection
说明每一连接平均传输的数据量289884/49=5916
3.4.89274 fetches/sec, 28945.5 bytes/sec
说明每秒的响应请求为4.89274,每秒传递的数据为28945.5 bytes/sec
4.msecs/connect: 28.8932 mean, 44.243 max, 24.488 min
说明每连接的平均响应时间是28.8932 msecs,最大的响应时间44.243 msecs,最小的响应时间24.488 msecs
5.msecs/first-response: 63.5362 mean, 81.624 max, 57.803 min
6、HTTP response codes: code 200 -- 49
说明打开响应页面的类型,如果403的类型过多,那可能要注意是否系统遇到了瓶颈。
特殊说明:这里,我们一般会关注到的指标是fetches/sec、msecs/connect
他们分别对应的常用性能指标参数Qpt-每秒响应用户数和response time,每连接响应用户时间。测试的结果主要也是看这两个值。当然仅有这两个指标并不能完成对性能的分析,我们还需要对服务器的cpu、men进行分析,才能得出结论
如果你需要测试https,你必须将 Makefile中
# CONFIGURE: If you want to compile in support for https, uncomment these
# definitions. You will need to have already built OpenSSL, available at
# http://www.openssl.org/ Make sure the SSL_TREE definition points to the
# tree with your OpenSSL installation - depending on how you installed it,
# it may be in /usr/local instead of /usr/local/ssl.
SSL_TREE = /usr
SSL_DEFS = -DUSE_SSL
SSL_INC = -I$(SSL_TREE)/include
SSL_LIBS = -L$(SSL_TREE)/lib -lssl -lcrypto
由于使用到openssl,你必须安装openssl和相应的开发环境
apt-get install openssl
apt-get install libssl-dev
find -name ssl.h
/usr/include/openssl/ssl.h
所以上面红色字体部分必须修改
相关文章推荐
- python发HTTP post请求上传文件
- The type org.apache.http.HttpEntity cannot be resolved.错误的解决
- Android实现网络多线程断点续传下载
- OkHttp的使用
- 图像处理与机器视觉网络资源收罗——倾心大放送
- TCP套接字和UDP套接字可以共用相同端口号
- wildfly9 配置SSL单向认证/https
- TCP的三次握手
- HttpURLConnectionImpl cannot be cast to javax.net.ssl.HttpsURLConnection
- Exception in thread "http-8080-3" java.lang.OutOfMemoryError: PermGen space
- 基于神经网络的图像检索 Neural Codes for Image Retrieval
- 网络编程
- tcpdump使用技巧
- Android HttpsURLConnection get、post 访问网络
- 证券数据爬取
- HttpClient使用详解
- 关于Linux内核网络架构书籍收集
- Android 使用Xutils报的一个Http类API过时问题
- linux 网络编程(加部分原创)
- 160115http通迅失败 报 Application Transport Security has blocked a cleartext HTTP (http://)