@
Mithril 我使用 ab 进行了压力测试。测试的机器,ab -c 250 -n 10000,-c 再高我的测试机器会报错,结论是:
Concurrency Level: 250
Time taken for tests: 129.699 seconds
Complete requests: 10000
Failed requests: 3948
(Connect: 0, Receive: 0, Length: 3948, Exceptions: 0)
Total transferred: 165345667 bytes
HTML transferred: 160705667 bytes
Requests per second: 77.10 [#/sec] (mean)
Time per request: 3242.487 [ms] (mean)
Time per request: 12.970 [ms] (mean, across all concurrent requests)
Transfer rate: 1244.96 [Kbytes/sec] received
在被测试机器上使用 netstat -n | awk '/^tcp/ {++state[$NF]} END {for(key in state) print key,"t",state[key]}' 查看连接数:
netstat -n | awk '/^tcp/ {++state[$NF]} END {for(key in state) print key,"t",state[key]}'
ESTABLISHED t 246
TIME_WAIT t 4522
其中,ESTABLISHED 稳定在 240 - 250 之间,TIME_WAIT 是逐步上升的。
所以,win10 机器只有一张网卡,虚拟机使用 HyperV 虚拟交换机的外部网络创建了一个虚拟网卡。在 win10 的 hyperv 上创建的虚拟机,貌似是不受 win10 TCP incoming 限制的?