运行Ubuntu 9.10的Linux服务器上的网络性能速度出现问题。在1000mbit / s的有线以太网连接上,所有类型的流量的传输速度约为1.5MB / s。最近,该服务器已比samba达到55MB / s。我尚未更改硬件或网络设置。我会定期运行更新,并且这台计算机上正在运行Ubuntu仓库中的最新版本。
硬件设置
台式机Windows PC-1000交换机-1000交换机-Linux服务器
所有交换机都是netgear,并且它们的连接均显示绿灯,表示连接速度为1000mbit / s。当连接速度仅为100mbit / s时,指示灯为黄色。其他诊断信息:
root@server:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:6e:3e:ae:36
inet addr:192.168.1.30 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:6eff:fe3e:ae36/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:28678 errors:0 dropped:0 overruns:0 frame:0
TX packets:73531 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2109780 (2.1 MB) TX bytes:111039729 (111.0 MB)
Interrupt:22
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:113 errors:0 dropped:0 overruns:0 frame:0
TX packets:113 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:23469 (23.4 KB) TX bytes:23469 (23.4 KB)
root@server:~# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pg
Wake-on: g
Current message level: 0x00000037 (55)
Link detected: yes
root@server:~# mii-tool
eth0: negotiated 1000baseT-FD flow-control, link ok
服务器认为其连接速度为1000mbit / s。我已经通过使用Samba复制文件测试了传输速度。我还使用服务器上的netcat(nc目标10000 <aBigFile)将其转移到Windows(nc -l -p 10000),并看到了类似水平的性能下降。
我使用hdparm测试了硬盘的速度,并得到:
root@server:~# hdparm -tT /dev/md0
/dev/md0:
Timing cached reads: 1436 MB in 2.00 seconds = 718.01 MB/sec
Timing buffered disk reads: 444 MB in 3.02 seconds = 147.24 MB/sec
使用DD读取相同文件进行传输会产生以下结果:
paul@server:/home/share/Series/New$ dd if=aBigFile of=/dev/null
3200369+1 records in
3200369+1 records out
1638589012 bytes (1.6 GB) copied, 12.7091 s, 129 MB/s
我很沮丧 是什么原因导致较差的网络性能(比网络的性能低2个数量级)?