0

这只是简单的返回hello world,一个线程的
是哪里有问题?
还有就是如果每人每秒有一个请求,那是不是代表同时在线人数可以达到3353

网上说的基本都有好几千
图片描述

这是我的测试结果

ab -n 100000 -c 25 http://127.0.0.1:5001/
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requests


Server Software:        TornadoServer/4.2.1
Server Hostname:        127.0.0.1
Server Port:            5001

Document Path:          /
Document Length:        5 bytes

Concurrency Level:      25
Time taken for tests:   231.277 seconds
Complete requests:      100000
Failed requests:        0
Total transferred:      19900000 bytes
HTML transferred:       500000 bytes
Requests per second:    432.38 [#/sec] (mean)
Time per request:       57.819 [ms] (mean)
Time per request:       2.313 [ms] (mean, across all concurrent requests)
Transfer rate:          84.03 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   25 612.9      0   19618
Processing:     1   33  31.8     27     460
Waiting:        1   33  31.6     27     459
Total:          1   58 613.1     28   19635

Percentage of the requests served within a certain time (ms)
  50%     28
  66%     30
  75%     33
  80%     35
  90%     38
  95%     43
  98%     74
  99%    258
 100%  19635 (longest request)
sft 416
2015-10-23 提问
3 个回答
0

已采纳

-n 表示请求次数()
-c 表示模拟的用户个数

并发数= (-n) / 完成所有请求所用的时间

AB返回结果主要关注『Requests per second』,即系统QPS,每秒钟能处理多少个请求

你的400+还算比较正常,一般单机单节点的tornado系统也就这样了

0

你的才400多

0

一般可以达到20000qps,只是helloword的话

撰写答案

推广链接