Maison > Questions et réponses > le corps du texte
Server Software: Muduo
Server Hostname: 192.168.2.103
Server Port: 8000
Document Path: /hello
Document Length: 14 bytes
Concurrency Level: 10000
Time taken for tests: 19.022 seconds
Complete requests: 999992
Failed requests: 1584
(Connect: 0, Receive: 528, Length: 528, Exceptions: 528)
Keep-Alive requests: 999464
Total transferred: 117936752 bytes
HTML transferred: 13992496 bytes
Requests per second: 52570.01 [#/sec] (mean)
Time per request: 190.223 [ms] (mean)
Time per request: 0.019 [ms] (mean, across all concurrent requests)
Transfer rate: 6054.67 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 25 466.3 0 17044
Processing: 18 138 574.7 34 17208
Waiting: 0 136 563.8 34 17208
Total: 18 163 772.0 34 17294
Percentage of the requests served within a certain time (ms)
50% 34
66% 34
75% 34
80% 34
90% 35
95% 674
98% 1692
99% 2878
100% 17294 (longest request)
打开文件数目,这些内核参数已经调了。
另外,ab最大的并发度是20000,
我用weighttp最大调到40000,再往上,客户机就端口(1024~61000)就有问题了.
哪些单机十万 百万的 并发度时怎么测的?
怪我咯2017-04-17 15:55:21
如果你要测吞吐量,单机就可以(单机是说C/S都在同一个机器上),他自己是这么说的
在同一台机器测试吞吐量的原因:
现在的 CPU 很快,即便是单线程单 TCP 连接也能把 Gigabit 以太网的带宽跑满。如果用两台机器,所有的吞吐
量测试结果都将是 100 MiB/s,失去了对比的意义。(或许可以对比哪个库占的 CPU 少。)
在同一台机器上测试,可以在 CPU 资源相同的情况下,单纯对比网络库的效率。也就是说单线程下,服务端和客户端各占满 1 个 CPU,比较哪个库的吞吐量高。
如果单机上的性能测试还可以(需要通过你自己横向比较),说明库在这一块没有瓶颈,剩下的就是一些优化(应用/系统/网络).
如果你要测并发,你需要准备若干客户机来堆连接数,测试方法见 这里.但我觉得你这个100M的网本身就是个瓶颈.