r8169 and slow network speed

Kernels & Hardware, configuring network, installing services

Re: r8169 and slow network speed

Postby Ichino » 2019-10-01 07:59

I willl, yes. I won't be able to do that in the coming hours, but asap...
I did with a -buntu Live iso that gave the same low download speed
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 08:06

Ichino wrote:I did with a -buntu Live iso that gave the same low download speed
Ha... Then not a specific Debian issue.
You should also mention which kernel is used for your tests (manjaro etc....).
With which kernel did you get your "good" results ?
Code: Select all
uname -r

info >> linux-image-5.2.0-0.bpo.2-amd64 is available in buster-backports
L_V
 
Posts: 1270
Joined: 2007-03-19 09:04

Re: r8169 and slow network speed

Postby Ichino » 2019-10-01 17:46

I tried the Debian Live iso: same results
The good thing is that when downloading the iso, I realized the speed was quite good: 15-20 MB/s, so I started looking at the download speed for different big file using the different OSs
here are some data for Debian/Manjaro
Arch Iso: The requested URL was not found on this server/6-7 MB/s
Debian iso: 2.2/4-5 MB/s
Ubuntu: 1/100 MB/s (A open SUSE Live session gives about 100 MB/s as well)
Big files (https://www.thinkbroadband.com/download): 1.2/65 MB/s
Debian Live iso: 15-20/70 MB/s
Open SUSE: 3.4/100-110 MB/s

Then, and this is actually the crucial point for me, I compare copy/paste files from a network drive to my local drive. I mount the drive with the command
Code: Select all
sudo mount -t cifs //path/to/network/drive /mnt/my/local/drive -o username=guesswho,pass="guesswhat",dir_mode=0777,file_mode=0777

In Manjaro, a 2.6 GB file is transferred in 39 seconds, in Debian I get 614 MB of it after 10 minutes
For a 12.8 MB file, it takes about 10 seconds in Debian while it is even too fast in Manjaro that I can't check the time needed

My Debian install runs on kernel
Code: Select all
4.19.0-6-amd64

My Manjaro install runs on
Code: Select all
4.19.69-1-MANJARO


Here are output from various command related to this network thing. First for Debian and the other for Manjaro. Sorry for such huge console outputs, I can't upload attachments.

Debian
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)

$ ethtool -i enp1s0
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

$ 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

$ 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   
    1716       23       0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns
    1716       23       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   
    6204573    5581     0       0       0       39     
    TX: bytes  packets  errors  dropped carrier collsns
    2280047    3698     0       0       0       0       

$ modinfo r8168 | 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

$ modinfo r8169 | grep ^fi
modinfo: ERROR: Module r8168 not found.

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

$ 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

$ lsmod |grep 81
r8169                  90112  0
libphy                 77824  3 r8169,realtek


Manjaro
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)

$ ethtool -i enp1s0
driver: r8168
version: 8.047.02-NAPI
firmware-version:
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

$ ethtool enp1s0
Settings for enp1s0:
   Supported ports: [ TP ]
   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: Twisted Pair
   PHYAD: 0
   Transceiver: internal
   Auto-negotiation: on
   MDI-X: Unknown
Cannot get wake-on-lan settings: Operation not permitted
   Current message level: 0x00000033 (51)
                drv probe ifdown ifup
   Link detected: yes

$ 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   
    0          0        0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns
    0          0        0       0       0       0       
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel 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   
    237934     307      0       0       0       6       
    TX: bytes  packets  errors  dropped carrier collsns
    15091      133      0       0       0       0     

$ modinfo r8169 | grep ^fi
filename:       /lib/modules/4.19.69-1-MANJARO/kernel/drivers/net/ethernet/realtek/r8169.ko.xz
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

$ modinfo r8168 | grep ^fi
filename:       /lib/modules/4.19.69-1-MANJARO/extramodules/r8168.ko.gz

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

$ pacman -Ss r8168
extra/linux316-r8168 8.047.02-2 (linux316-extramodules)
    A kernel module for Realtek 8168 network cards
extra/linux414-r8168 8.047.02-8 (linux414-extramodules)
    A kernel module for Realtek 8168 network cards
extra/linux419-r8168 8.047.02-12 (linux419-extramodules) [installed]
    A kernel module for Realtek 8168 network cards
extra/linux44-r8168 8.047.02-5 (linux44-extramodules)
    A kernel module for Realtek 8168 network cards
extra/linux49-r8168 8.047.02-5 (linux49-extramodules)
    A kernel module for Realtek 8168 network cards
extra/linux51-r8168 8.047.02-5 (linux51-extramodules)
    A kernel module for Realtek 8168 network cards
extra/linux52-r8168 8.047.02-15 (linux52-extramodules)
    A kernel module for Realtek 8168 network cards
extra/linux53-r8168 8.047.02-0.8 (linux53-extramodules)
    A kernel module for Realtek 8168 network cards
community/linux-latest-r8168 5.2-4 (linux-latest-extramodules)
    A kernel module for Realtek 8168 network cards (metapackage)
community/linux-lts-r8168 4.19-2 (linux-lts-extramodules)
    A kernel module for Realtek 8168 network cards (metapackage)
community/linux-rt-lts-manjaro-r8168 4.19-2 (linux-rt-lts-manjaro-extramodules)
    A kernel module for Realtek 8168 network cards
community/linux-rt-manjaro-r8168 5.2-1 (linux-rt-manjaro-extramodules)
    A kernel module for Realtek 8168 network cards
community/linux419-rt-r8168 8.047.02-2 (linux419-rt-extramodules)
    A kernel module for Realtek 8168 network cards
community/linux52-rt-r8168 8.047.02-2 (linux52-rt-extramodules)
    A kernel module for Realtek 8168 network cards

$ lsmod |grep 81
r8168                 565248  0


I noticed few differences

Code: Select all
$ ethtool enp1s0

Debian
Supported ports: [ TP AUI BNC MII FIBRE ]
Port: MII
Manjaro
Supported ports: [ TP ]
Port: Twisted Pair

Code: Select all
$ ip -s link

Debian
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
Manjaro
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000

Code: Select all
$ modinfo r8169 | grep ^fi

Debian uses r8169 and Manjaro r8168, so different output

Code: Select all
$ ls /lib/firmware/rtl_nic/

Debian Manjaro No difference for rtl8168
rtl8168d-1.fw rtl8168d-1.fw
rtl8168d-2.fw rtl8168d-2.fw
rtl8168e-1.fw rtl8168e-1.fw
rtl8168e-2.fw rtl8168e-2.fw
rtl8168e-3.fw rtl8168e-3.fw
rtl8168f-1.fw rtl8168f-1.fw
rtl8168f-2.fw rtl8168f-2.fw
rtl8168g-1.fw rtl8168g-1.fw
rtl8168g-2.fw rtl8168g-2.fw
rtl8168g-3.fw rtl8168g-3.fw
rtl8168h-1.fw rtl8168h-1.fw
rtl8168h-2.fw rtl8168h-2.fw

L_V wrote:Ha... Then not a specific Debian issue.

Debian-based issue?
L_V wrote:info >> linux-image-5.2.0-0.bpo.2-amd64 is available in buster-backports

Tried. Same thing.
Last edited by Ichino on 2019-10-01 19:45, edited 6 times in total.
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 19:46

Debian => driver: r8169
Manjaro => driver: r8168

When you tried r8168, did you blacklist r8169 ?

https://tracker.debian.org/pkg/r8168
L_V
 
Posts: 1270
Joined: 2007-03-19 09:04

Re: r8169 and slow network speed

Postby Ichino » 2019-10-01 20:10

L_V wrote:When you tried r8168, did you blacklist r8169 ?


Is it necessary if it loads as expected?
Code: Select all
$ ethtool -i enp1s0
[sudo] password for ju:
driver: r8168
version: 8.046.00-NAPI
firmware-version:
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


Not sure how to blacklist it. Is it correct?
Code: Select all
sudo sh -c 'echo blacklist r8169 >> /etc/modprobe.d/blacklist.conf'

And how to revert this?
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 20:20

Ichino wrote:Is it necessary if it loads as expected?
May be not, but It at least clarifies which one is loaded. I presume it had been automatically blacklisted.

I wonder if you should not try r8168-dkms (8.047.02-1) from SID.
https://packages.debian.org/sid/r8168-dkms

+ r8168 : Driver does not work in Debian buster
https://bugs.debian.org/cgi-bin/bugrepo ... bug=931812

"Ethernet card connects to the router and gets IP from DHCP. Despite this, internet connection does not work.
This driver is currently unusable."
L_V
 
Posts: 1270
Joined: 2007-03-19 09:04

Re: r8169 and slow network speed

Postby Ichino » 2019-10-01 20:46

L_V wrote:I wonder if you should not try r8168-dkms (8.047.02-1) from SID.

Just tried. No difference

L_V wrote:"Ethernet card connects to the router and gets IP from DHCP. Despite this, internet connection does not work.
This driver is currently unusable."

I am actually using it. Except the speed limitation, I have no issue.
User avatar
Ichino
 
Posts: 15
Joined: 2019-09-10 08:42
Location: Freising

Re: r8169 and slow network speed

Postby v&n » 2019-10-02 00:50

Ichino wrote:
L_V wrote:I wonder if you should not try r8168-dkms (8.047.02-1) from SID.

Just tried. No difference

Just for confirmation, can you post the outputs of ethtool and ethtool -i with the new driver? Plus, the output of -
Code: Select all
lsmod | grep 8168


There's an even newer one here, though I haven't tried compiling it : https://github.com/mtorromeo/r8168
v&n
 
Posts: 624
Joined: 2015-02-04 02:57

Re: r8169 and slow network speed

Postby Ichino » 2019-10-02 13:49

Code: Select all
$ ethtool -i enp1s0
driver: r8168
version: 8.047.02-NAPI
firmware-version:
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
$ lsmod | grep 8168
r8168                 561152  0

Code: Select all
$ ethtool enp1s0
Settings for enp1s0:
   Supported ports: [ TP ]
   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: Twisted Pair
   PHYAD: 0
   Transceiver: internal
   Auto-negotiation: on
   MDI-X: Unknown
   Supports Wake-on: pumbg
   Wake-on: d
   Current message level: 0x00000033 (51)
                drv probe ifdown ifup
   Link detected: yes
User avatar
Ichino
 
Posts: 15
Joined: 2019-09-10 08:42
Location: Freising

Previous

Return to System configuration

Who is online

Users browsing this forum: No registered users and 20 guests

fashionable