标签: apachebench

无法让 ab 测试与 gzip 一起使用

这是我的 nginx gzip 配置:

 gzip on;
     gzip_vary on;
     gzip_proxied any;
     gzip_comp_level 4;
     gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
Run Code Online (Sandbox Code Playgroud)

我同意它适用于所有确认我的网站是 service gzip 我是简单的 html 文件的 gzip 测试网站,它的内容类型是 Content-Type:text/html; charset=UTF-8

我没有 gzip 的页面内容是 300kb,使用 gzip 应该是 20kb 尝试运行所有选项,例如:

ab  -r -n 200 -c 10 -k -H "Accept-Encoding: gzip, deflate" http://example.com
ab  -r -n 200 -c 10 -k -H "Accept-Encoding: gzip" http://example.com
ab  -H "Accept-Encoding: gzip" -n 200 -c 10 -k  http://example.com
ab  -H "Accept-Encoding: gzip, deflate" -n 200 -c …
Run Code Online (Sandbox Code Playgroud)

nginx stress-testing apachebench

4
推荐指数
1
解决办法
479
查看次数

在 Windows 10 上安装 Apachebench

晚上好。

谁能帮我获取适用于 Windows 10-64 位 API 测试的 Apache bench 软件的安装文件?我对可以从谷歌下载哪个文件感到困惑,因为存在很多链接。

我对这个工具很陌生。因此,如果有关于如何使用该软件的信息,请向我提供一些用户指南。

最好的问候,戈文德

apachebench

4
推荐指数
1
解决办法
1万
查看次数

表现不佳

我正在为我的硕士论文进行性能测试,而且我的Symfony2简单应用程序的性能非常差.它是简单的应用程序,一个查询和一些数学.

命令测试结果:

ab -c10 -t60 http://sf2.cities.localhost/app.php

Server Software:        Apache/2.2.20
Server Hostname:        sf2.cities.localhost
Server Port:            80

Document Path:          /app.php
Document Length:        2035 bytes

Concurrency Level:      10
Time taken for tests:   60.162 seconds
Complete requests:      217
Failed requests:        68
   (Connect: 0, Receive: 0, Length: 68, Exceptions: 0)
Write errors:           0
Non-2xx responses:      68
Total transferred:      393876 bytes
HTML transferred:       321102 bytes
Requests per second:    3.61 [#/sec] (mean)
Time per request:       2772.458 [ms] (mean)
Time per request:       277.246 [ms] (mean, across all concurrent …
Run Code Online (Sandbox Code Playgroud)

php benchmarking apache2 apachebench symfony

3
推荐指数
1
解决办法
802
查看次数

如何为apachebench添加http代理(ab)

我想抓取ab发送或接收的HTTP数据包.

所以我在shell命令中添加了一个http_proxy:

$ export http_proxy=127.0.0.1:8888
Run Code Online (Sandbox Code Playgroud)

然后我执行ab命令:

$ ab -c 1 -n 1 http://localhost/
Run Code Online (Sandbox Code Playgroud)

最后,我的代理(127.0.0.1:8888)无法从ab获取http数据包.

有没有办法让ab通过http_proxy访问http?

这是我的环境:Mac OSX 10.10.3

proxy apachebench

3
推荐指数
1
解决办法
4056
查看次数

基准测试工具

我无法确定哪个是更好的基准测试工具 - 它是apachebench工具还是httperf?请帮我决定哪一个是最适合用于对Web应用程序进行基准测试的工具.

against apachebench httperf

2
推荐指数
1
解决办法
2313
查看次数

在负载均衡的Tornado站点上使用apache基准测试获取失败的请求但没有记录

也许这是一个关于ab的问题,而不是关于龙卷风的问题,但有些事情没有意义.

我像这样运行基准测试:

$ ab -n 100 http://localdomainname/ # 2 tornados being 1 nginx
 ...
Concurrency Level:      1
Time taken for tests:   0.162 seconds
Complete requests:      100
Failed requests:        17
   (Connect: 0, Receive: 0, Length: 17, Exceptions: 0)
Write errors:           0
Run Code Online (Sandbox Code Playgroud)

因此,根据100个请求中的17个失败.

在运行benchamark之前,我重置日志文件并再次查看它们:

$ wc -l /tmp/gkc.access.log 
100 /tmp/gkc.access.log
$ cat /tmp/gkc.access.log | grep ' 200 ' | wc -l
100
Run Code Online (Sandbox Code Playgroud)

所以,据Nginx说,没有请求失败!为什么说ab中的17个失败了?

(顺便说一下,100个中只有17个只是一个例子.它上下起伏但从未出现过0,我期待)

UPDATE

在没有触及Tornado + Nginx设置的情况下使用httperf进行测试后,我得到了0个失败的请求.

benchmarking tornado apachebench

2
推荐指数
1
解决办法
8290
查看次数

有人可以解释这些apache替补结果,有什么突出的东西吗?

在此输入图像描述

下面是一个带有50个并发线程的10K请求的apache bench运行.

我需要帮助理解结果,结果中是否有任何突出的结果可能指向阻塞并限制每秒更多的请求?

我正在查看连接时间部分,并看到"等待"和"处理".它显示等待的平均时间是208,连接的平均时间是0,处理是208 ..总计是208.有人可以向我解释,因为它对我没有多大意义.

tcp scalability http apachebench server

2
推荐指数
1
解决办法
1264
查看次数

如何使用GNUPlot从ApacheBench输出文件中绘制响应时间的直方图?

我正在针对我正在构建的网站运行一些基准测试,并希望生成响应时间的图表.这是我的ApacheBench用法:

> ab -n 100 -c 10 -g foo.tsv http://foo/
Run Code Online (Sandbox Code Playgroud)

这给了我一个TSV文件,其数据如下:

starttime                   seconds         ctime    dtime  ttime   wait
Tue Dec 03 16:24:53 2013    1386087893      2        413    415     367
Tue Dec 03 16:24:49 2013    1386087889      1        468    469     452
Tue Dec 03 16:24:54 2013    1386087894      9        479    488     446
Tue Dec 03 16:24:49 2013    1386087889      1        497    498     437
Tue Dec 03 16:24:54 2013    1386087894      33       465    498     458
Tue Dec 03 16:24:53 2013    1386087893      1        507    508     506
Tue Dec 03 …
Run Code Online (Sandbox Code Playgroud)

gnuplot histogram apachebench

2
推荐指数
1
解决办法
3476
查看次数

推荐的Netty性能测试工具

用于测试Netty HTTP服务器的推荐性能测试工具是什么?以下是我们与JMeter和AB面临的一些问题.我们是否拥有Netty社区推荐的基于Netty的性能测试工具.

JMeter:当并发性超过500时,结果不一致并且表现不佳.

AB:仅支持HTTP 1.0

http jmeter apachebench netty

2
推荐指数
1
解决办法
973
查看次数

如何安装 Alpine Apache Benchmark?

当我运行时apk add --update ab出现错误:

bash-4.3# apk add --update ab
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  ab (missing):
    required by: world[ab]
bash-4.3# apk add ab
ERROR: unsatisfiable constraints:
  ab (missing):
    required by: world[ab]
Run Code Online (Sandbox Code Playgroud)

apachebench alpine-linux

2
推荐指数
1
解决办法
2107
查看次数

Apache 基准测试 multipart/form-data

我正面临 ap​​ache 基准测试文件的一个奇怪问题。

我需要强调一个处理文件上传的功能。所以,我用谷歌搜索,找到了一篇描述如何正确构建帖子文件的帖子。其内容如下:

--1234567
Content-Disposition: form-data; name="user_id"

3
--1234567
Content-Disposition: form-data; name="file"; filename="cf_login.png"
Content-Type: image/png

[base64 encoded file content]
--1234567--
Run Code Online (Sandbox Code Playgroud)

ab 线是这样的:

$ ab -c 1 -n 5 -v 4 -T 'multipart/form-data; boundary=1234567' -p post_file.txt http://localhost:3000/files
Run Code Online (Sandbox Code Playgroud)

当 ab 发出请求时,生成的标头如下:

INFO: POST header == 
---
POST /files.json/ HTTP/1.0
Content-length: 229
Content-type: multipart/form-data; boundary=simpleboundary
Host: localhost:3000
User-Agent: ApacheBench/2.3
Accept: */*


---
LOG: header received:
HTTP/1.1 500 Internal Server Error 
Content-Type: text/html; charset=utf-8
Content-Length: 13265
X-Request-Id: 9ad57d19cd71886a1bb817d00fac651b
X-Runtime: 0.015504
Server: WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) …
Run Code Online (Sandbox Code Playgroud)

performance benchmarking ruby-on-rails apachebench

1
推荐指数
1
解决办法
3865
查看次数