用AB进行负载测试...伪造的失败请求(长度) [英] Load Testing with AB ... fake failed requests (length)

查看:117
本文介绍了用AB进行负载测试...伪造的失败请求(长度)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于自身的好奇心,在我运行的服务器上进行一些负载测试:

To do some load testing, for my own curiosity, on my server I ran:

ab -kc 50 -t 200 http://localhost/index.php

这将打开50个保持活动状态的连接200秒,并用对index.php的请求来猛击我的服务器

This opens up 50 keep-alive connections for 200 seconds and just slams my server with requests for index.php

在我的结果中,我得到:

In my results, I get:

Concurrency Level:      50
Time taken for tests:   200.007 seconds
Complete requests:      33106
Failed requests:        32951
   (Connect: 0, Receive: 0, Length: 32951, Exceptions: 0)
Write errors:           0
Keep-Alive requests:    0
Total transferred:      1948268960 bytes
HTML transferred:       1938001392 bytes
Requests per second:    165.52 [#/sec] (mean)
Time per request:       302.071 [ms] (mean)
Time per request:       6.041 [ms] (mean, across all concurrent requests)
Transfer rate:          9512.69 [Kbytes/sec] received

请注意32951失败"的请求.我无法弄清楚.

Note the 32951 "failed" requests. I cannot figure this out.

在测试运行期间,尽管页面底部的页面加载时间报告为.5,而不是通常的.02,但我仍可以从家用计算机完美地访问我的网站.但是我从来没有遇到过失败的请求.

As the test was running, I was able to access my web site from my home computer perfectly, albeit page load times at the bottom of the page were reported as .5 instead of the usual .02. However I never once had a failed request.

那么,为什么AB会报告一半的连接失败?在这种情况下,长度:"是什么意思?

So why is AB reporting that half of the connections fail? And what does "Length: " mean in that context?

推荐答案

没关系. 长度失败"仅表示响应时间长度的一半左右是不同的.

Nevermind. The "length failure" merely indicates that about half the time the length of the response was different.

由于内容是动态的,所以它可能是会话标识符或类似的东西.

Since the contents are dynamic, it's probably the session identifier or something like that.

这篇关于用AB进行负载测试...伪造的失败请求(长度)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆