正在调查apache基准测试失败的请求 [英] investigating apache benchmark failed request

查看:92
本文介绍了正在调查apache基准测试失败的请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚从今天开始使用AB.阅读几本关于AB的新教程,并考虑尝试对我的网站进行负载测试.

I am just start using AB just today. Read couple of AB tutorial on new and thought give it a try for load testing my site.

使用几次后,我收到了大量失败的请求.您能否解释失败请求的含义?我该如何对此问题进行更多调查?

After using it couple of time I got huge number of failed request. Can you explain what is mean by a failed request? How can I investigate more for this issue?

样品AB结果:

-jailshell-3.2$ ab -n500 -c10 http://www.tweeting.tv/index.php
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking www.tweeting.tv (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Finished 500 requests


Server Software:        Apache
Server Hostname:        www.tweeting.tv
Server Port:            80

Document Path:          /index.php
Document Length:        242861 bytes

Concurrency Level:      10
Time taken for tests:   97.846330 seconds
Complete requests:      500
Failed requests:        481
   (Connect: 0, Length: 481, Exceptions: 0)
Write errors:           0
Non-2xx responses:      2
Total transferred:      121214449 bytes
HTML transferred:       121003283 bytes
Requests per second:    5.11 [#/sec] (mean)
Time per request:       1956.927 [ms] (mean)
Time per request:       195.693 [ms] (mean, across all concurrent requests)
Transfer rate:          1209.78 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0 1503 1675.5      1    9036
Processing:   130  393 285.1    319    2382
Waiting:       92  244 226.3    192    2180
Total:        153 1896 1726.2   1121   10374

Percentage of the requests served within a certain time (ms)
  50%   1121
  66%   3308
  75%   3355
  80%   3375
  90%   3451
  95%   3603
  98%   4163
  99%   9315
 100%  10374 (longest request)

我正在使用Hostgator Linux共享服务器.

N.B. I am using Hostgator Linux shared server.

推荐答案

这是动态页面的问题,它的发生是因为不同请求的Content-Length可能不同.在此类页面上使用ab时,您需要使用-l选项.

This is an issue with dynamic pages, it happens because the Content-Length can vary between the requests. When using ab with such pages you need to use the -l option.

-l              Accept variable document length (use this for dynamic pages)

这篇关于正在调查apache基准测试失败的请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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