我的服务器的下载/上传速度太慢了(大约 50 Kb/s)!
我的配置是否遗漏了什么?
一些信息:
CentOS 版本 6.3
正常运行时间
load average: 0.17, 0.32, 0.37
记忆
free -m
total used free shared buffers cached
Mem: 24009 21988 2021 0 806 18098
-/+ buffers/cache: 3083 20926
Swap: 4095 28 4067
lshw -C network
*-network
description: Ethernet interface
product: 82574L Gigabit Network Connection
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:02:00.0
logical name: eth0
version: 00
serial: 00:25:90:70:17:4a
size: 100MB/s
capacity: 1GB/s
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=off broadcast=yes driver=e1000e driverversion=1.9.5-k duplex=full firmware=2.1-2 ip=108.175.8.123 latency=0 link=yes multicast=yes port=twisted pair speed=100MB/s
resources: irq:16 memory:fb900000-fb91ffff ioport:e000(size=32) memory:fb920000-fb923fff
ethtool
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: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: off
MDI-X: off
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000001 (1)
Link detected: yes
dmesg |grep e1000e
dmesg |grep e1000e
e1000e: Intel(R) PRO/1000 Network Driver - 1.9.5-k
e1000e: Copyright(c) 1999 - 2012 Intel Corporation.
e1000e 0000:02:00.0: Disabling ASPM L0s
e1000e 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
e1000e 0000:02:00.0: setting latency timer to 64
e1000e 0000:02:00.0: irq 33 for MSI/MSI-X
e1000e 0000:02:00.0: irq 34 for MSI/MSI-X
e1000e 0000:02:00.0: irq 35 for MSI/MSI-X
e1000e 0000:02:00.0: eth0: (PCI Express:2.5GT/s:Width x1) 00:25:90:70:17:4a
e1000e 0000:02:00.0: eth0: Intel(R) PRO/1000 Network Connection
e1000e 0000:02:00.0: eth0: MAC: 3, PHY: 8, PBA No: FFFFFF-0FF
e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
e1000e 0000:02:00.0: eth0: 10/100 speed: disabling TSO
e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
e1000e 0000:02:00.0: eth0: 10/100 speed: disabling TSO
e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
e1000e 0000:02:00.0: eth0: 10/100 speed: disabling TSO
e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
e1000e 0000:02:00.0: eth0: 10/100 speed: disabling TSO
e1000e 0000:02:00.0: eth0: 10/100 speed: disabling TSO
e1000e 0000:02:00.0: eth0: Unsupported Speed/Duplex configuration
e1000e: eth0 NIC Link is Up 10 Mbps Full Duplex, Flow Control: None
e1000e 0000:02:00.0: eth0: 10/100 speed: disabling TSO
e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
e1000e 0000:02:00.0: eth0: 10/100 speed: disabling TSO
e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
e1000e 0000:02:00.0: eth0: 10/100 speed: disabling TSO
e1000e 0000:02:00.0: Disabling ASPM L1
e1000e 0000:02:00.0: eth0: changing MTU from 1500 to 9000
e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
e1000e 0000:02:00.0: eth0: 10/100 speed: disabling TSO
e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
e1000e 0000:02:00.0: eth0: 10/100 speed: disabling TSO
e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
e1000e 0000:02:00.0: eth0: 10/100 speed: disabling TSO
答案1
您手动将速度设置为 100 MBit、全双工,而不是进行自动协商。
您的提供商可能已设置自动协商。结果是网络端的端口将降至 100 MBit 半双工。
因此,这里存在双工不匹配的情况(并且可能需要多次重新传输)。
将其设置为自动协商-然后再次查看netstat -i
和ethtool
。
答案2
这一行:
e1000e 0000:02:00.0: eth0: changing MTU from 1500 to 9000
有点令人担忧。该服务器与互联网上任何随机点之间的 MTU 几乎保证不会高于 1500,因此将其设置得更高并不是一件好事。我希望这不是故障排除步骤,因为这种配置只会损害性能。
您有时会在虚拟交换机上的 VMWare 主机中看到该设置,但这应该是物理硬件。
您可以通过 验证适配器的 MTU 设置ifconfig eth0
,它将被列出。
要在 CenOS 上将其设置回 1500,请更改/etc/sysconfig/network/ifcfg-eth0
;如果将其设置为 9000,其中将会有一条 MTU 行。