performance - apache bench 中连接、处理、等待的定义

标签 performance apache benchmarking

当我运行 apache bench 时,我得到如下结果:

Command: abs.exe -v 3 -n 10 -c 1 https://mysite
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:      203  213   8.1    219     219
Processing:    78  177  88.1    172     359
Waiting:       78  169  84.6    156     344
Total:        281  389  86.7    391     564

我似乎找不到连接、处理和等待的定义。这些数字是什么意思?

最佳答案

通过查看源代码,我们发现这些时间点:

apr_time_t start,           /* Start of connection */
           connect,         /* Connected, start writing */
           endwrite,        /* Request written */
           beginread,       /* First byte of input */
           done;            /* Connection closed */

当请求完成时,一些计时存储为:

        s->starttime = c->start;
        s->ctime     = ap_max(0, c->connect - c->start);
        s->time      = ap_max(0, c->done - c->start);
        s->waittime  = ap_max(0, c->beginread - c->endwrite);

“处理时间”稍后计算为

s->time - s->ctime;

因此,如果我们将其转换为时间线:

t1: Start of connection
t2: Connected, start writing
t3: Request written
t4: First byte of input
t5: Connection closed

那么定义将是:

Connect:      t1-t2   Most typically the network latency
Processing:   t2-t5   Time to receive full response after connection was opened
Waiting:      t3-t4   Time-to-first-byte after the request was sent
Total time:   t1-t5

关于performance - apache bench 中连接、处理、等待的定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2820306/

相关文章:

c++ - 有没有办法并行化下三角矩阵求解器?

python - 按元素有效地分组数组

linux - 如何设置 Web 服务器显示 URL 而不是 IP 地址?

javascript - 从 http ://localhost:8080 请求时不允许 Apache 服务器方法

performance - Tensorflow GPU 利用率仅为 60% (GTX 1070)

python - 如何在这个素数筛子的 for 循环中花费更少的时间?

mysql - xampp 无法连接到本地主机

.net - 有没有人运行性能基准比较 LINQ

algorithm - ElasticFusion Slam 算法在 TUM RGB-D 基准测试中使用位姿图运行

svn-bench 和 fsfs-stats 二进制使用情况