linux - 用ab对muduo网络库进行了测试,百兆网络,最大传输速度到了6054.67 [Kbytes/sec] 能到10M/s 吗?
ringa_lee
ringa_lee 2017-04-17 15:53:21
0
1
569
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)就有问题了.
哪些单机十万 百万的 并发度时怎么测的?

ringa_lee
ringa_lee

ringa_lee

reply all(1)
刘奇

If you want to measure throughput, you can use a single machine (single machine means that C/S is on the same machine), he said so himself

Reason for testing throughput on the same machine:

  • Today’s CPUs are so fast that even a single-threaded single TCP connection can fully utilize the bandwidth of Gigabit Ethernet. If two machines are used, all throughput

  • The mass test results will all be 100 MiB/s, which loses the meaning of comparison. (Perhaps you can compare which library takes up less CPU.)
    Testing on the same machine, you can simply compare the efficiency of the network library when the CPU resources are the same. That is to say, under a single thread, the server and the client each occupy 1 CPU, and which library has the higher throughput is compared.

If the performance test on a single machine is okay (you need to compare it horizontally by yourself), it means that the library has no bottleneck in this area, and the rest is some optimization (application/system/network).

If you want to test concurrency, you need to prepare a number of clients to stack the number of connections. See the test method here. But I think your 100M network itself is a bottleneck.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template