在发布此文之前,我阅读了许多关于网络速度低于规格的帖子/页面/博客。因此,我购买了新的 CAT6 UTP 电缆,并在网络上的每个设备之间进行了测试。
现在,除了我自己构建的 Linux NAS 之外,所有设备之间的速度都稳定在 110mb/s 左右。它始终以 40mb/s 的速度复制文件。我用短电缆、长电缆、专用 1gbit 交换机(而不是我的千兆路由器进行路由)进行了测试,结果始终相同。我测试了通过网络从 SSD 复制到 SSD、从 SSD 复制到 HDD,没有区别(NAS 同时具有 SSD 和 HDD)。我尝试了 SFTP、SMB、FTP,也没有区别。在所有测试中,NAS 的负载都保持很小。
现在我怀疑是 NAS 硬件和/或 Linux 驱动程序、配置。我该如何调试?
[更新]
通过网络复制文件时,1 个核心达到最大值。munin 中的负载似乎很小,为 0.6,但这只是 5 分钟内的平均值。那么 CPU 是瓶颈吗?
[更新 2]
所以就我而言,驱动程序有点帮助,但最终我的瓶颈是协议+cpu的组合。只有 HTTP 能够最大化连接,而 sftp 和 smb 受到 cpu 的限制,也许一些调整可以减少它们的 cpu 使用率。
规格:
OS: Debian 8
Board: ASRock N3150B-ITX Intel N3150 mITX
CPU: Intel(R) Celeron(R) CPU N3150 @ 1.60GHz
RAM: 8 GB
HDD: 2 x WD Red WD40EFRX 4TB
SSD: 1 x Kingston SSDNow V300 120GB MLC
详细规格
处理器
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 76
Model name: Intel(R) Celeron(R) CPU N3150 @ 1.60GHz
Stepping: 3
CPU MHz: 481.933
CPU max MHz: 2080,0000
CPU min MHz: 480,0000
BogoMIPS: 3202.01
Virtualization: VT-x
L1d cache: 24K
L1i cache: 32K
L2 cache: 1024K
NUMA node0 CPU(s): 0-3
瘦身
description: Computer
width: 64 bits
capabilities: smbios-2.8 vsyscall32
*-core
description: Motherboard
physical id: 0
*-memory
description: System memory
physical id: 0
size: 7472MiB
*-cpu
product: Intel(R) Celeron(R) CPU N3150 @ 1.60GHz
vendor: Intel Corp.
physical id: 1
bus info: cpu@0
size: 479MHz
capacity: 2080MHz
width: 64 bits
capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp x86-64 constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes rdrand lahf_lm 3dnowprefetch epb tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms dtherm ida arat cpufreq
*-pci
description: Host bridge
product: Intel Corporation
vendor: Intel Corporation
physical id: 100
bus info: pci@0000:00:00.0
version: 21
width: 32 bits
clock: 33MHz
configuration: driver=iosf_mbi_pci
resources: irq:0
*-display
description: VGA compatible controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 21
width: 64 bits
clock: 33MHz
capabilities: pm msi vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:121 memory:90000000-90ffffff memory:80000000-8fffffff ioport:f000(size=64) memory:c0000-dffff
*-storage
description: SATA controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 13
bus info: pci@0000:00:13.0
version: 21
width: 32 bits
clock: 66MHz
capabilities: storage msi pm ahci_1.0 bus_master cap_list
configuration: driver=ahci latency=0
resources: irq:118 ioport:f060(size=32) memory:91415000-914157ff
*-usb
description: USB controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 14
bus info: pci@0000:00:14.0
version: 21
width: 64 bits
clock: 33MHz
capabilities: pm msi xhci bus_master cap_list
configuration: driver=xhci_hcd latency=0
resources: irq:117 memory:91400000-9140ffff
*-usbhost:0
product: xHCI Host Controller
vendor: Linux 4.8.0-0.bpo.2-amd64 xhci-hcd
physical id: 0
bus info: usb@1
logical name: usb1
version: 4.08
capabilities: usb-2.00
configuration: driver=hub slots=7 speed=480Mbit/s
*-usb
description: USB hub
product: USB2.0 Hub
vendor: Genesys Logic, Inc.
physical id: 5
bus info: usb@1:5
version: 88.31
capabilities: usb-2.00
configuration: driver=hub maxpower=100mA slots=4 speed=480Mbit/s
*-usbhost:1
product: xHCI Host Controller
vendor: Linux 4.8.0-0.bpo.2-amd64 xhci-hcd
physical id: 1
bus info: usb@2
logical name: usb2
version: 4.08
capabilities: usb-3.00
configuration: driver=hub slots=6 speed=5000Mbit/s
*-generic UNCLAIMED
description: Encryption controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 1a
bus info: pci@0000:00:1a.0
version: 21
width: 32 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list
configuration: latency=0
resources: memory:91100000-911fffff memory:91000000-910fffff
*-multimedia
description: Audio device
product: Intel Corporation
vendor: Intel Corporation
physical id: 1b
bus info: pci@0000:00:1b.0
version: 21
width: 64 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list
configuration: driver=snd_hda_intel latency=0
resources: irq:122 memory:91410000-91413fff
*-pci:0
description: PCI bridge
product: Intel Corporation
vendor: Intel Corporation
physical id: 1c
bus info: pci@0000:00:1c.0
version: 21
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:115 ioport:e000(size=4096) memory:91300000-913fffff
*-storage
description: SATA controller
product: 88SE9128 PCIe SATA 6 Gb/s RAID controller
vendor: Marvell Technology Group Ltd.
physical id: 0
bus info: pci@0000:01:00.0
version: 20
width: 32 bits
clock: 33MHz
capabilities: storage pm msi pciexpress ahci_1.0 bus_master cap_list rom
configuration: driver=ahci latency=0
resources: irq:120 ioport:e050(size=8) ioport:e040(size=4) ioport:e030(size=8) ioport:e020(size=4) ioport:e000(size=32) memory:91310000-913107ff memory:91300000-9130ffff
*-pci:1
description: PCI bridge
product: Intel Corporation
vendor: Intel Corporation
physical id: 1c.1
bus info: pci@0000:00:1c.1
version: 21
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:116 ioport:d000(size=4096) memory:91200000-912fffff
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:02:00.0
logical name: eth0
version: 11
serial: d0:50:99:78:03:d2
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168g-2_0.0.1 02/06/13 ip=192.168.0.100 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
resources: irq:119 ioport:d000(size=256) memory:91204000-91204fff memory:91200000-91203fff
*-isa
description: ISA bridge
product: Intel Corporation
vendor: Intel Corporation
physical id: 1f
bus info: pci@0000:00:1f.0
version: 21
width: 32 bits
clock: 33MHz
capabilities: isa bus_master cap_list
configuration: driver=lpc_ich latency=0
resources: irq:0
*-serial
description: SMBus
product: Intel Corporation
vendor: Intel Corporation
physical id: 1f.3
bus info: pci@0000:00:1f.3
version: 21
width: 32 bits
clock: 33MHz
capabilities: pm cap_list
configuration: driver=i801_smbus latency=0
resources: irq:18 memory:91414000-9141401f ioport:f040(size=32)
*-scsi:0
physical id: 2
logical name: scsi0
capabilities: emulated
*-disk
description: ATA Disk
product: KINGSTON SV300S3
physical id: 0.0.0
bus info: scsi@0:0.0.0
logical name: /dev/sda
version: BBF0
serial: 50026B7854011055
size: 111GiB (120GB)
capabilities: gpt-1.00 partitioned partitioned:gpt
configuration: ansiversion=5 guid=bd0d92d8-3872-4af8-bd37-6e144769d696 logicalsectorsize=512 sectorsize=512
*-volume:0
description: Windows FAT volume
vendor: mkfs.fat
physical id: 1
bus info: scsi@0:0.0.0,1
logical name: /dev/sda1
logical name: /boot/efi
version: FAT32
serial: a00b-19c0
size: 510MiB
capacity: 511MiB
capabilities: boot fat initialized
configuration: FATs=2 filesystem=fat mount.fstype=vfat mount.options=rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro state=mounted
*-volume:1
description: EXT4 volume
vendor: Linux
physical id: 2
bus info: scsi@0:0.0.0,2
logical name: /dev/sda2
logical name: /
version: 1.0
serial: 3c53dc3f-51e0-4967-810a-46642c6dba53
size: 103GiB
capabilities: journaled extended_attributes large_files huge_files dir_nlink recover extents ext4 ext2 initialized
configuration: created=2017-01-03 17:06:08 filesystem=ext4 lastmountpoint=/ modified=2017-02-08 22:31:35 mount.fstype=ext4 mount.options=rw,relatime,errors=remount-ro,data=ordered mounted=2017-02-08 22:31:36 state=mounted
*-volume:2
description: Linux swap volume
vendor: Linux
physical id: 3
bus info: scsi@0:0.0.0,3
logical name: /dev/sda3
version: 1
serial: 3e37cb96-5f81-48d1-be5b-ca47292b232f
size: 7665MiB
capacity: 7666MiB
capabilities: nofs swap initialized
configuration: filesystem=swap pagesize=4095
*-scsi:1
physical id: 3
logical name: scsi2
capabilities: emulated
*-disk
description: ATA Disk
product: WDC WD40EFRX-68N
vendor: Western Digital
physical id: 0.0.0
bus info: scsi@2:0.0.0
logical name: /dev/sdb
version: 0A82
serial: WD-WCC7K7HFN3K7
size: 3726GiB (4TB)
configuration: ansiversion=5 logicalsectorsize=512 sectorsize=4096
*-scsi:2
physical id: 4
logical name: scsi3
capabilities: emulated
*-disk
description: ATA Disk
product: WDC WD40EFRX-68N
vendor: Western Digital
physical id: 0.0.0
bus info: scsi@3:0.0.0
logical name: /dev/sdc
version: 0A82
serial: WD-WCC7K1XSZYZ6
size: 3726GiB (4TB)
configuration: ansiversion=5 logicalsectorsize=512 sectorsize=4096
*-scsi:3
physical id: 5
logical name: scsi9
capabilities: emulated
*-processor UNCLAIMED
description: SCSI Processor
physical id: 0.0.0
bus info: scsi@9:0.0.0
*-network:0
description: Ethernet interface
physical id: 1
logical name: vethBC83V0
serial: fe:72:5a:77:15:f2
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
*-network:1
description: Ethernet interface
physical id: 2
logical name: veth4IKF6U
serial: fe:a4:7f:d9:88:e8
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
*-network:2
description: Ethernet interface
physical id: 3
logical name: veth6FWFI5
serial: fe:26:a4:3e:ec:22
size: 10Gbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full link=yes multicast=yes port=twisted pair speed=10Gbit/s
*-network:3 DISABLED
description: Ethernet interface
physical id: 4
logical name: lxc-nic
serial: 52:54:00:c6:f0:23
size: 10Mbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=tun driverversion=1.6 duplex=full link=no multicast=yes port=twisted pair speed=10Mbit/s
hwinfo --short
cpu:
Intel(R) Celeron(R) CPU N3150 @ 1.60GHz, 480 MHz
Intel(R) Celeron(R) CPU N3150 @ 1.60GHz, 480 MHz
Intel(R) Celeron(R) CPU N3150 @ 1.60GHz, 480 MHz
Intel(R) Celeron(R) CPU N3150 @ 1.60GHz, 480 MHz
graphics card:
Intel VGA compatible controller
sound:
Intel Audio device
storage:
Intel SATA controller
Marvell 88SE9128 PCIe SATA 6 Gb/s RAID controller
network:
eth0 Realtek RTL8111/8168 PCI Express Gigabit Ethernet controller
network interface:
veth6FWFI5 Ethernet network interface
lxc Ethernet network interface
eth0 Ethernet network interface
vethBC83V0 Ethernet network interface
lxc-nic Ethernet network interface
lo Loopback network interface
veth4IKF6U Ethernet network interface
disk:
/dev/sdb WDC WD40EFRX-68N
/dev/sdc WDC WD40EFRX-68N
/dev/sda KINGSTON SV300S3
partition:
/dev/sda1 Partition
/dev/sda2 Partition
/dev/sda3 Partition
usb controller:
Intel USB Controller
bios:
BIOS
bridge:
Intel Host bridge
Intel PCI bridge
Intel PCI bridge
Intel ISA bridge
hub:
Linux 4.8.0-0.bpo.2-amd64 xhci-hcd xHCI Host Controller
Genesys Logic USB2.0 Hub
Linux 4.8.0-0.bpo.2-amd64 xhci-hcd xHCI Host Controller
memory:
Main Memory
unknown:
FPU
DMA controller
PIC
Keyboard controller
/dev/lp0 Parallel controller
PS/2 Controller
Intel SMBus
Intel Encryption controller
/dev/ttyS0 16550A
/dev/ttyS1 16550A
/dev/sg3 Marvell 91xx Config
串行通信
00:00.0 Host bridge: Intel Corporation Device 2280 (rev 21)
00:02.0 VGA compatible controller: Intel Corporation Device 22b1 (rev 21)
00:13.0 SATA controller: Intel Corporation Device 22a3 (rev 21)
00:14.0 USB controller: Intel Corporation Device 22b5 (rev 21)
00:1a.0 Encryption controller: Intel Corporation Device 2298 (rev 21)
00:1b.0 Audio device: Intel Corporation Device 2284 (rev 21)
00:1c.0 PCI bridge: Intel Corporation Device 22c8 (rev 21)
00:1c.1 PCI bridge: Intel Corporation Device 22ca (rev 21)
00:1f.0 ISA bridge: Intel Corporation Device 229c (rev 21)
00:1f.3 SMBus: Intel Corporation Device 2292 (rev 21)
01:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9128 PCIe SATA 6 Gb/s RAID controller (rev 20)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 11)
知识产权
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether d0:50:99:78:03:d2 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.100/24 brd 192.168.0.255 scope global eth0
valid_lft forever preferred_lft forever
5: lxc: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 52:54:00:c6:f0:23 brd ff:ff:ff:ff:ff:ff
inet 10.11.0.1/24 brd 10.11.0.255 scope global lxc
valid_lft forever preferred_lft forever
6: lxc-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master lxc state DOWN group default qlen 1000
link/ether 52:54:00:c6:f0:23 brd ff:ff:ff:ff:ff:ff
12: veth6FWFI5@if11: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master lxc state UP group default qlen 1000
link/ether fe:26:a4:3e:ec:22 brd ff:ff:ff:ff:ff:ff
inet6 fe80::fc26:a4ff:fe3e:ec22/64 scope link
valid_lft forever preferred_lft forever
16: veth4IKF6U@if15: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master lxc state UP group default qlen 1000
link/ether fe:a4:7f:d9:88:e8 brd ff:ff:ff:ff:ff:ff
inet6 fe80::fca4:7fff:fed9:88e8/64 scope link
valid_lft forever preferred_lft forever
38: vethBC83V0@if37: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master lxc state UP group default qlen 1000
link/ether fe:72:5a:77:15:f2 brd ff:ff:ff:ff:ff:ff
inet6 fe80::fc72:5aff:fe77:15f2/64 scope link
valid_lft forever preferred_lft forever
ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: yes
iptables
iptables -L -n -v --line-numbers
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 1280K 89M fail2ban-ssh tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 22
2 0 0 ACCEPT udp -- lxc * 0.0.0.0/0 0.0.0.0/0 udp dpt:53
3 0 0 ACCEPT tcp -- lxc * 0.0.0.0/0 0.0.0.0/0 tcp dpt:53
4 0 0 ACCEPT udp -- lxc * 0.0.0.0/0 0.0.0.0/0 udp dpt:67
5 0 0 ACCEPT tcp -- lxc * 0.0.0.0/0 0.0.0.0/0 tcp dpt:67
6 615K 107M ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
7 0 0 REJECT all -- !lo * 0.0.0.0/0 127.0.0.0/8 reject-with icmp-port-unreachable
8 7065K 1431M ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
9 40 2560 ACCEPT tcp -- * * 0.0.0.0/0 192.168.0.100 state NEW tcp dpt:22
10 27 1724 ACCEPT tcp -- * * 0.0.0.0/0 192.168.0.100 state NEW tcp dpt:80
11 15377 923K ACCEPT tcp -- * * 10.11.0.10 10.11.0.1 state NEW tcp dpt:4949
12 340K 65M ACCEPT udp -- * * 192.168.0.0/24 0.0.0.0/0 state NEW udp dpt:5353
13 0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.0.100 state NEW tcp dpt:3689
14 0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.0.100 state NEW tcp dpt:6600
15 5 412 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8
16 309K 77M LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 5/min burst 5 LOG flags 0 level 7 prefix "iptables denied: "
17 441K 97M DROP all -- * * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 429 38624 ACCEPT tcp -- * * 0.0.0.0/0 10.11.0.20 state NEW tcp dpt:445
2 7 444 ACCEPT tcp -- * * 0.0.0.0/0 10.11.0.20 state NEW tcp dpt:139
3 0 0 ACCEPT udp -- * * 0.0.0.0/0 10.11.0.20 state NEW udp dpt:138
4 2 156 ACCEPT udp -- * * 0.0.0.0/0 10.11.0.20 state NEW udp dpt:137
5 243M 228G ACCEPT all -- * lxc 0.0.0.0/0 10.11.0.0/24 ctstate RELATED,ESTABLISHED
6 84M 341G ACCEPT all -- lxc * 10.11.0.0/24 0.0.0.0/0
7 0 0 ACCEPT all -- lxc lxc 0.0.0.0/0 0.0.0.0/0
8 0 0 REJECT all -- * lxc 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
9 0 0 REJECT all -- lxc * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
10 0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 0 0 ACCEPT udp -- * lxc 0.0.0.0/0 0.0.0.0/0 udp dpt:68
2 12M 9842M ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain fail2ban-ssh (1 references)
num pkts bytes target prot opt in out source destination
1 1280K 89M RETURN all -- * * 0.0.0.0/0 0.0.0.0/0
答案1
更新
看来我的以下假设是有道理的:这里您将找到最新的指南,介绍如何通过安装适当的驱动程序来纠正 8168 行为,以及如何在内核升级/重启后使它们保持不变。
协议
使用 SFTP 等协议意味着要添加加密和压缩。压缩文件意味着占用大量 CPU,但会增加网络带宽。而这本身在较慢的 CPU 上会受到 CPU 负载的影响。因此,您需要在两者之间取得平衡。
相关设置与SSH和 SCP。你想尝试不同的密码,因为每个实现都依赖于机器。
此外,短延迟、大带宽连接的网络配置与相反的情况不同。Linux 具有自动调整功能,但您的情况可能仍超出其限制;这里您将找到更多信息(以及调整位置)。我记得看到过一个脚本,声称通过在两台主机(一台处于服务器模式,一台处于客户端模式)之间传输大文件来进行自动调整,但要做到这一点,您需要两台 Linux 主机。而且,重要的是,与 Linux SFTP 主机通信的最佳设置对于与 Windows 7 的 Samba 连接来说可能非常糟糕, 等等。
最有可能的是,您必须在各种需求之间找到一个折衷方案。
原始答案
network: eth0 Realtek RTL8111/8168 PCI Express Gigabit Ethernet controller ... driver=r8169
您可能正在使用性能不佳的驱动程序,它没有利用 Realtek 功能(例如校验和卸载),从而导致 CPU 负载过大。
这里有关于如何强行安装 r8168 驱动程序的说明:
您可以从官方 Ubuntu 存储库安装带有 r8168 驱动程序的 dkms 包。
您需要卸载已手动安装的驱动程序,然后在终端中运行:
sudo apt-get install r8168-dkms
每次升级内核时,dkms 包都会重建内核模块(驱动程序)。
Ubuntu 14.04 的存储库包含 dkms r8168 版本 8.037.00-1。
它可能工作正常。但如果你确实需要最新的驱动程序,你可以通过以下方式安装它:
wget http://mirrors.kernel.org/ubuntu/pool/universe/r/r8168/r8168-dkms_8.040.00-1_all.deb sudo dpkg -i r8168-dkms_8.040.00-1_all.deb
这将安装您现在使用的相同版本,但支持 dkms。
您还可以激活大帧支持(现在您的标准 MTU 为 1500)。对于大文件传输,高达 9000 的 MTU 可能会产生更好的效果,只要司机和所有相关方同样支持。