r8169 and slow network speed

Kernels & Hardware, configuring network, installing services

r8169 and slow network speed

Postby Ichino » 2019-09-26 09:34

Hi community,
I have a problem with network configuration in Debian 10 stable.
In Debian, the download speed is around 1.5 mb/s, other OS gives around 40/50 mb/s
Upload speed is totally fine.

Code: Select all
$ lspci |grep -i ethernet
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)

Code: Select all
    $ sudo ethtool -i enp1s0
    [sudo] password for ju:
    driver: r8169
version:
firmware-version: rtl8168h-2_0.0.2 02/26/15
expansion-rom-version:
bus-info: 0000:01:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no

Code: Select all
$ sudo ethtool  enp1s0
    Settings for enp1s0:
   Supported ports: [ TP AUI BNC MII FIBRE ]
   Supported link modes:   10baseT/Half 10baseT/Full
                           100baseT/Half 100baseT/Full
                           1000baseT/Full
   Supported pause frame use: Symmetric Receive-only
   Supports auto-negotiation: Yes
   Supported FEC modes: Not reported
   Advertised link modes:  10baseT/Half 10baseT/Full
                           100baseT/Half 100baseT/Full
                           1000baseT/Full
   Advertised pause frame use: Symmetric Receive-only
   Advertised auto-negotiation: Yes
   Advertised FEC modes: Not reported
   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
   Link partner advertised FEC modes: Not reported
   Speed: 1000Mb/s
   Duplex: Full
   Port: MII
   PHYAD: 0
   Transceiver: internal
   Auto-negotiation: on
   Supports Wake-on: pumbg
   Wake-on: d
   Current message level: 0x00000033 (51)
                drv probe ifdown ifup
   Link detected: yes


I tried switching the driver (r8169 -> r8168) without improvement.

Code: Select all
$ ip -s link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        RX: bytes  packets  errors  dropped overrun mcast   
        13422179   105621   0       0       0       0       
        TX: bytes  packets  errors  dropped carrier collsns
        13422179   105621   0       0       0       0       
    2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
        link/ether 54:bf:64:87:a7:23 brd ff:ff:ff:ff:ff:ff
        RX: bytes  packets  errors  dropped overrun mcast   
        618841842  623332   0       0       0       8243   
        TX: bytes  packets  errors  dropped carrier collsns
        1033279718 1624347  0       0       0       0


There is no write speed issue when I copy/paste a file locally, and no difference between protocols

Any advice where to look at?
User avatar
Ichino
 
Posts: 15
Joined: 2019-09-10 08:42
Location: Freising

Re: r8169 and slow network speed

Postby L_V » 2019-09-26 19:00

+ for investigation:

Code: Select all
sudo modinfo r8169 | grep ^fi

ls /lib/firmware/rtl_nic/

apt policy firmware-realtek
L_V
 
Posts: 1270
Joined: 2007-03-19 09:04

Re: r8169 and slow network speed

Postby Ichino » 2019-09-27 06:23

Here it is
Code: Select all
sudo modinfo r8169 | grep ^fi
filename:       /lib/modules/4.19.0-6-amd64/kernel/drivers/net/ethernet/realtek/r8169.ko
firmware:       rtl_nic/rtl8107e-2.fw
firmware:       rtl_nic/rtl8107e-1.fw
firmware:       rtl_nic/rtl8168h-2.fw
firmware:       rtl_nic/rtl8168h-1.fw
firmware:       rtl_nic/rtl8168g-3.fw
firmware:       rtl_nic/rtl8168g-2.fw
firmware:       rtl_nic/rtl8106e-2.fw
firmware:       rtl_nic/rtl8106e-1.fw
firmware:       rtl_nic/rtl8411-2.fw
firmware:       rtl_nic/rtl8411-1.fw
firmware:       rtl_nic/rtl8402-1.fw
firmware:       rtl_nic/rtl8168f-2.fw
firmware:       rtl_nic/rtl8168f-1.fw
firmware:       rtl_nic/rtl8105e-1.fw
firmware:       rtl_nic/rtl8168e-3.fw
firmware:       rtl_nic/rtl8168e-2.fw
firmware:       rtl_nic/rtl8168e-1.fw
firmware:       rtl_nic/rtl8168d-2.fw
firmware:       rtl_nic/rtl8168d-1.fw

Code: Select all
ls /lib/firmware/rtl_nic/
rtl8105e-1.fw  rtl8107e-1.fw  rtl8168d-2.fw  rtl8168e-3.fw  rtl8168g-1.fw  rtl8168h-1.fw  rtl8411-1.fw
rtl8106e-1.fw  rtl8107e-2.fw  rtl8168e-1.fw  rtl8168f-1.fw  rtl8168g-2.fw  rtl8168h-2.fw  rtl8411-2.fw
rtl8106e-2.fw  rtl8168d-1.fw  rtl8168e-2.fw  rtl8168f-2.fw  rtl8168g-3.fw  rtl8402-1.fw

Code: Select all
apt policy firmware-realtek
firmware-realtek:
  Installed: 20190114-2
  Candidate: 20190114-2
  Version table:
 *** 20190114-2 500
        500 http://debian.mirror.lrz.de/debian buster/non-free amd64 Packages
        100 /var/lib/dpkg/status
User avatar
Ichino
 
Posts: 15
Joined: 2019-09-10 08:42
Location: Freising

Re: r8169 and slow network speed

Postby L_V » 2019-09-27 08:56

I don't have any problem with this one:
Code: Select all
lspci -k | egrep -iA2 ethernet
> Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
> Subsystem: Micro-Star International Co., Ltd. [MSI] RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
> Kernel driver in use: r8169
> Kernel modules: r8169

The difference is you have a controller "(rev 15)".

How do you estimate download speed ?
+
Code: Select all
lsmod |grep 81
dpkg -l r8168-dkms
L_V
 
Posts: 1270
Joined: 2007-03-19 09:04

Re: r8169 and slow network speed

Postby Ichino » 2019-09-27 12:16

Thanks to follow this L_V!
I do have problem with this one, yes
Code: Select all
lspci -k | egrep -iA2 ethernet
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
   Subsystem: Dell RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
   Kernel driver in use: r8169
   Kernel modules: r8169

Download speed is indicated in Firefox when I download. and it actually takes really longer to download using Debian, than other OS (Tested with Manjaro (dual-boot), but at first when W10 was installed, it gives same good download speed)
a 5-minute download turns into a "more than 2-hour" download when using Debian. The network is fast here (University network in Munich)
DOWNLOAD:67.35MB
UPLOAD:895.39MB
LATENCY:15MS
Code: Select all
lsmod |grep 81
r8169                  90112  0
libphy                 77824  3 r8169,realtek

Code: Select all
dpkg -l r8168-dkms
dpkg-query: no packages found matching r8168-dkms
User avatar
Ichino
 
Posts: 15
Joined: 2019-09-10 08:42
Location: Freising

Re: r8169 and slow network speed

Postby L_V » 2019-09-27 17:19

Did you compare your DL speed with a wget ?
Code: Select all
wget <isofile>

If IPV6 enabled ? Did you compare with IPV4 only ?
L_V
 
Posts: 1270
Joined: 2007-03-19 09:04

Re: r8169 and slow network speed

Postby Ichino » 2019-09-30 07:53

Sorry for slow answer. Problem is on my office computer so no progress during weekends...

L_V wrote:Did you compare your DL speed with a wget ?


Just tested. Debian gives download speed between 1 and 3 MB/s.
To compare with, if I boot Manjaro I get a DL speed betwwen 30 and 50 MB/s for the same server (I asked for some tips in their forum, but they are not willing to help that much to fix Debian...)

Disabling IPV6 doesn't help, even after reboot.

Same issue when I booted into a Live-Ubuntu session, just for information.
User avatar
Ichino
 
Posts: 15
Joined: 2019-09-10 08:42
Location: Freising

Re: r8169 and slow network speed

Postby kedaha » 2019-09-30 08:00

I had a very slow connection recently so I configured my router to use google public-dns for the time being which seems to have brought network speed back to normal.
I have the same hardware:
Code: Select all
$ lspci |grep -i ethernet
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
"Please accept my resignation. I don’t care to belong to any club that will have me as a member".—Groucho Marx
User avatar
kedaha
 
Posts: 3102
Joined: 2008-05-24 12:26

Re: r8169 and slow network speed

Postby Ichino » 2019-09-30 08:16

kedaha wrote:I configured my router to use google public-dns

As I am connected to the University network, I do not have full freedom for DNS configuration, unfortunately.
User avatar
Ichino
 
Posts: 15
Joined: 2019-09-10 08:42
Location: Freising

Re: r8169 and slow network speed

Postby Head_on_a_Stick » 2019-09-30 14:09

MTU, perhaps?
Code: Select all
ip link

Change it with:
Code: Select all
# ip link set dev enp1s0 mtu 1492

Does that help?

Or maybe https://wiki.archlinux.org/index.php/Et ... ng_problem
User avatar
Head_on_a_Stick
 
Posts: 12140
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: r8169 and slow network speed

Postby Ichino » 2019-09-30 19:49

Hi,
I checked MTU as well. Not my problem.
And for TCP window scaling, I tried to change stuff after reading your suggestion but I am still facing the same limit for download speed.
I think I should push the lazy guys working @ IT support. I hope to find people running debian-based distro on this machine, as it is bought dozens by dozens by the University.
User avatar
Ichino
 
Posts: 15
Joined: 2019-09-10 08:42
Location: Freising

Re: r8169 and slow network speed

Postby v&n » 2019-09-30 20:23

Ichino wrote:
kedaha wrote:I configured my router to use google public-dns

As I am connected to the University network, I do not have full freedom for DNS configuration, unfortunately.

DNS can be, and usually is configured locally in the OS itself (see this good post by HoaS - viewtopic.php?p=708268#p708268).

Although I can't understand how it can help download speeds, as once you 'reach' a site, the role of DNS is over. But oddly enough, some users sometimes have reported it to have made a difference.

Also -
Ichino wrote:I tried switching the driver (r8169 -> r8168) without improvement.

How? Using the dkms package from the repositories or using some external source?

Have you compared the same command outputs from Manjaro for any significant difference or hints? Maybe post them here if not sure?
v&n
 
Posts: 624
Joined: 2015-02-04 02:57

Re: r8169 and slow network speed

Postby L_V » 2019-09-30 21:02

v&n wrote:Although I can't understand how it can help download speeds
This was for investigation to be sure we compare apple to apple when saying "it works well with OS A", and "bad with OS B".
Is the router behaving the same in IPV6/IPV4 ?
Is IPV4 IPV6 addresses pointing to the same sites ? If not, it could explain some difference.

Of course I didn't really believe it can be a root cause, and ichino confirms, but as long as nobody can explain the differences, all clever ideas are welcomed.
L_V
 
Posts: 1270
Joined: 2007-03-19 09:04

Re: r8169 and slow network speed

Postby Ichino » 2019-10-01 07:03

DNS can be, and usually is configured locally in the OS itself

I meant 'I am not supposed to play with these settings on my work computer'. By the way, I tried Google DNS server (don't tell them!) and it didn't help.
How? Using the dkms package from the repositories or using some external source?

Using r8168-dkms, yes. Later, I tried to build one from other sources. Tried a lot of stuff in a ugly way and finish by restoring the system (using Timeshift)
Have you compared the same command outputs from Manjaro for any significant difference or hints? Maybe post them here if not sure?

I compared some yes, that is what suggested me to swithch to r8168-dkms. Ok, I will prepare this asap to post here.
This was for investigation to be sure we compare apple to apple when saying "it works well with OS A", and "bad with OS B".
Is the router behaving the same in IPV6/IPV4 ?
Is IPV4 IPV6 addresses pointing to the same sites ? If not, it could explain some difference

Again, I will collect more info to compare the two configurations.

Thanks to you all!
User avatar
Ichino
 
Posts: 15
Joined: 2019-09-10 08:42
Location: Freising

Re: r8169 and slow network speed

Postby L_V » 2019-10-01 07:55

Ichino wrote:Tried a lot of stuff in a ugly way and finish by restoring the system

Could you also try with a live.iso to compare ?
http://cdimage.debian.org/images/unoffi ... so-hybrid/
L_V
 
Posts: 1270
Joined: 2007-03-19 09:04

Next

Return to System configuration

Who is online

Users browsing this forum: No registered users and 10 guests

fashionable