2017-02-18 258 views
0

我遇到了一個很奇怪的問題。 我有2臺服務器,一臺運行redhat Linux服務器7 64位,另一臺運行Windows Server 2012 64位。這兩個服務器的硬件規格是完全一致:iperf3 Windows帶寬比linux慢很多

Xeon 2.6Ghz CPU x 2, total 32 logical core 
96GB ddr4 memory 
1Gb dual port network card 
2TB hard disk, the RAID configuration is also same. 

當我兩個機器上運行iperf3,結果是非常不同的。 在Linux上,結果是:**

$iperf3 -s 

$iperf3 -c localhost 
Connecting to host localhost, port 5201 
[ 4] local ::1 port 46996 connected to ::1 port 5201 
[ ID] Interval   Transfer  Bandwidth  Retr Cwnd 
[ 4] 0.00-1.00 sec 4.29 GBytes 36.9 Gbits/sec 0 703 KBytes 
[ 4] 1.00-2.00 sec 4.75 GBytes 40.8 Gbits/sec 0 703 KBytes 
[ 4] 2.00-3.00 sec 4.66 GBytes 40.0 Gbits/sec 0 767 KBytes 
[ 4] 3.00-4.00 sec 4.67 GBytes 40.1 Gbits/sec 0 767 KBytes 
[ 4] 4.00-5.00 sec 4.49 GBytes 38.6 Gbits/sec 0 1.37 MBytes 
[ 4] 5.00-6.00 sec 4.57 GBytes 39.3 Gbits/sec 0 1.37 MBytes 
[ 4] 6.00-7.00 sec 4.54 GBytes 39.0 Gbits/sec 0 1.37 MBytes 
[ 4] 7.00-8.00 sec 4.68 GBytes 40.2 Gbits/sec 0 1.37 MBytes 
[ 4] 8.00-9.00 sec 4.75 GBytes 40.8 Gbits/sec 0 1.37 MBytes 
[ 4] 9.00-10.00 sec 4.60 GBytes 39.6 Gbits/sec 0 1.37 MBytes 
- - - - - - - - - - - - - - - - - - - - - - - - - 
[ ID] Interval   Transfer  Bandwidth  Retr 
[ 4] 0.00-10.00 sec 46.0 GBytes 39.5 Gbits/sec 0    sender 
[ 4] 0.00-10.00 sec 46.0 GBytes 39.5 Gbits/sec     receiver 

在Windows結果:**

iperf3.exe -s 

iperf3.exe -c localhost 
Connecting to host localhost, port 5201 
[ 4] local ::1 port 11042 connected to ::1 port 5201 
[ ID] Interval   Transfer  Bandwidth 
[ 4] 0.00-1.00 sec 477 MBytes 4.00 Gbits/sec 
[ 4] 1.00-2.00 sec 486 MBytes 4.08 Gbits/sec 
[ 4] 2.00-3.00 sec 555 MBytes 4.66 Gbits/sec 
[ 4] 3.00-4.00 sec 569 MBytes 4.77 Gbits/sec 
[ 4] 4.00-5.00 sec 571 MBytes 4.79 Gbits/sec 
[ 4] 5.00-6.00 sec 584 MBytes 4.90 Gbits/sec 
[ 4] 6.00-7.00 sec 590 MBytes 4.95 Gbits/sec 
[ 4] 7.00-8.00 sec 590 MBytes 4.95 Gbits/sec 
[ 4] 8.00-9.00 sec 599 MBytes 5.03 Gbits/sec 
[ 4] 9.00-10.00 sec 598 MBytes 5.01 Gbits/sec 
- - - - - - - - - - - - - - - - - - - - - - - - - 
[ ID] Interval   Transfer  Bandwidth 
[ 4] 0.00-10.00 sec 5.49 GBytes 4.71 Gbits/sec     sender 
[ 4] 0.00-10.00 sec 5.49 GBytes 4.71 Gbits/sec     receiver 

iperf Done. 

爲什麼選擇Windows是如此之慢?有沒有人有同樣的問題?
如何提高Windows帶寬性能?

這種行爲極其影響我的項目,使用相同的套接字代碼,Windows的吞吐量僅爲Linux的1/3。

非常感謝。

+1

這與編程無關。也許你應該在超級用戶社區中提出這個問題。 –

+0

您是否嘗試過使用Linux啓動Windows機器?即使不應該存在硬件差異,也許會有這種差異。 – deltab

+0

Linux和Windows在每臺服務器上運行,測試在本地主機上運行,​​Linux和Windows未連接。 –

回答

0

請嘗試增加TCP窗口大小8.00 KByte(默認)至少64k。請參閱下面的文章:

https://arstechnica.com/civis/viewtopic.php?t=1113215

希望它能幫助。

+0

我已經嘗試在Windows註冊表中增加TCP窗口大小,但在重新啓動後,結果仍然相同。 TCP窗口大小是否影響本地主機測試? –

+0

如果它沒有解決你的問題,你爲什麼接受這個答案? – T3rm1