Gentoo Archives: gentoo-user

From: William Kenworthy <billk@×××××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] network transfer speed
Date: Fri, 15 Jan 2021 23:40:44
Message-Id: 04985a43-7d9e-5417-fbf9-6b13560b347a@iinet.net.au
In Reply to: Re: [gentoo-user] network transfer speed by thelma@sys-concept.com
1 On 16/1/21 6:56 am, thelma@×××××××××××.com wrote:
2 > On 1/15/21 1:11 AM, Raffaele BELARDI wrote:
3 >>> -----Original Message-----
4 >>> From: thelma@×××××××××××.com <thelma@×××××××××××.com>
5 >>> Sent: Friday, January 15, 2021 07:57
6 >>> To: Gentoo mailing list <gentoo-user@l.g.o>
7 >>> Subject: [gentoo-user] network transfer speed
8 >>>
9 >>>
10 >>> On both of my systems the network card speed is showing 1000
11 >>> cat /sys/class/net/enp4s0/speed 1000
12 >>>
13 >>> but when I do rsync larage file I only see about: 20 to 22MB/s On my home
14 >>> network I get about 110MB/s between PC's
15 >>>
16 >>> Both PC's have SSD and the swith is Gigabit (I think).
17 >>> How to find a the bottleneck?
18 >> If the PCs attached to the switch show 1000 then the switch _is_ gigabit.
19 >>
20 >> On my 1Gb home network I have an FTP transfer speed between Gentoo PCs A and B of almost 900Mbps, the other way round is almost half of that. One difference between the two systems is the disk, A uses SATA-2 disk while B has SATA-3.
21 >>
22 >> Does the 'B' in 110MB/s stand for byte? If so you have 880Mbps which is not bad, the problem probably lies somewhere else. Otherwise you could check the switch error count (if you have a managed switch) or the network card error count, just to ensure you don't have a cabling/connector problem.
23 >>
24 >> Have you tried other transfer methods just for comparison? I think FTP is still the fastest way to transfer files, though insecure or inconvenient as it might be. I have no experience with rsync.
25 >>
26 >> raffaele
27 > On a remote network I run ethtool on both cards and I got both 1000Mb/s speed
28 >
29 > 1.)
30 > ethtool net0
31 > Settings for net0:
32 > Supported ports: [ TP MII ]
33 > Supported link modes: 10baseT/Half 10baseT/Full
34 > 100baseT/Half 100baseT/Full
35 > 1000baseT/Half 1000baseT/Full
36 > Supported pause frame use: No
37 > Supports auto-negotiation: Yes
38 > Advertised link modes: 10baseT/Half 10baseT/Full
39 > 100baseT/Half 100baseT/Full
40 > 1000baseT/Half 1000baseT/Full
41 > Advertised pause frame use: Symmetric Receive-only
42 > Advertised auto-negotiation: Yes
43 > Link partner advertised link modes: 10baseT/Half 10baseT/Full
44 > 100baseT/Half 100baseT/Full
45 > 1000baseT/Full
46 > Link partner advertised pause frame use: Symmetric
47 > Link partner advertised auto-negotiation: Yes
48 > Speed: 1000Mb/s
49 > Duplex: Full
50 > Port: MII
51 > PHYAD: 0
52 > Transceiver: internal
53 > Auto-negotiation: on
54 > MDI-X: on (auto)
55 >
56 > 2.)
57 > ethtool enp4s0
58 > Settings for enp4s0:
59 > Supported ports: [ TP ]
60 > Supported link modes: 10baseT/Half 10baseT/Full
61 > 100baseT/Half 100baseT/Full
62 > 1000baseT/Full
63 > Supported pause frame use: Symmetric
64 > Supports auto-negotiation: Yes
65 > Advertised link modes: 10baseT/Half 10baseT/Full
66 > 100baseT/Half 100baseT/Full
67 > 1000baseT/Full
68 > Advertised pause frame use: Symmetric
69 > Advertised auto-negotiation: Yes
70 > Speed: 1000Mb/s
71 > Duplex: Full
72 > Port: Twisted Pair
73 > PHYAD: 1
74 > Transceiver: internal
75 > Auto-negotiation: on
76 > MDI-X: on (auto)
77 >
78 What brand/type of interface (Realtek, int/ext USB ?)  There is an
79 obscure bug that drops throughput to ~1/3 in Realtek RTL8153 chip on
80 USB2 and the r8152 kernel driver.  Some interfaces (e.g., most raspberry
81 pi) connect via internal USB with its own throughput problems.  Probably
82 not the problem in this case but worth mentioning.
83
84 Rsync is not a good tool for measuring throughput as its optimisations
85 are problematic - and this can show up when comparing local to remote
86 tests.  If on a file system it will always transfer the whole file (and
87 it considers a network filesystem local) while on a network it will use
88 the transfer algorithm which can vary depending on commandline switches
89 used and where the remote file lives, and this can change between tests
90 depending on conditions.  Whole files have little overhead, whereas the
91 algorithm overhead can actually be much slower (hence why it tries to do
92 it this way) Try and use a largish file created with /dev/random and dd
93 as well as a simple netcat type transfer mechanism to measure.  Note
94 that encryption can severely limit transfers due to cpu limiting if on a
95 low powered system and rsync over ssh uses encrytion.  And if a secure
96 VPN is in the mix its orders of magnitude worse.  Also note that
97 something like an inline IDS on a link can drop throughput by 50% or
98 more (measured on an older enterprise Cisco device) which further
99 complicates local/remote via internet comparisons.
100
101
102 Good luck in finding the problem - its really not simple and easy.
103
104 BillK

Replies

Subject Author
Re: [gentoo-user] network transfer speed Manuel McLure <manuel@××××××.org>