RTL8111 PCI Express Gigabit driver r8169 big files produce slow file transfer

Bug #114171 reported by Achim
24
Affects Status Importance Assigned to Milestone
linux-ubuntu-modules-2.6.22 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

OS: Ubuntu Feisty 7.04 final.
Mainboard: MSI P965 Platinum
NIC: RTL8111 PCI Express Gigabit (onboard)

The filetransfer over smb is very slow (<300 Kb/s).
If I transfer more than one file, the transfer gets faster (~25 Mb/s).
Filetransfer over ftp runs at full speed (~25 Mb/s).

$ sudo 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: 10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000033 (51)
        Link detected: yes

$ lspci | grep -i ethernet
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)

maybe someone can confirm this behavior.

Best wishes
Achim

Achim (ach1m)
description: updated
Achim (ach1m)
description: updated
Revision history for this message
freezer90 (freezer90) wrote :

same problem here ... :( ssh/webdav/ftp etc. as fast as before update. only samba is extremely slow

OS: Ubuntu Feisty 7.04 final
Mainboard: Asus P5B
NIC: RTL8111 PCI Express Gigabit (onboard)

sudo ethtool eth0
Password:
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: 10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000033 (51)
        Link detected: yes

$ lspci | grep -i ethernet
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)

hope this problem could be solved soon ... really annoying.

*tia*
freezer90

Revision history for this message
dm (dmitry-shaposhnik) wrote :

Same thing here, but during uploading data my PC is freezing. Only way out is reset button.

Revision history for this message
XeN (jasper-3ds) wrote :

Yes, I have the same problem here with Edgy Eft 2.6.17-11-generic – i686.

FTP transfers are always fast, Samba <300 kb, but with 2 files transferring, it’s fast again.

Samba: Version 3.0.22
Card: Level-One Gigabit r8169
02:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)

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: 10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000033 (51)
        Link detected: yes

What to do now?

Revision history for this message
Achim (ach1m) wrote :
Download full text (4.3 KiB)

Realtek has released a new driver, that solves my problems.

Linux driver for kernel 2.6.x (Support x86 and x64)
 8.001.00 2007/5/25 20k

ftp://209.216.61.149/cn/nic/r8168-8.001.00.tar.bz2
To install the module take a look at the README.

You have to blacklist the original module "r8169" as it would catch the NIC and the Realtek module "r8168" would not be used.

Here is a copy of the original post, that I found.
source: http://ubuntuforums.org/showthread.php?t=143982&highlight=r1000

That post was made for an older version of the Realtek driver, which was called "r1000".
But don't mind just replace "r1000" with "r8168".

##############################################################################################################################

Inside of Gnome press ALT + F2 and type:

gksudo gedit /etc/modprobe.d/blacklist-network

Now create ONE of the following lines

# Prevent r8169.ko from loading and allow r1000.ko to load
blacklist r8169

# Prevent r1000.ko from loading and allow r8169.ko to load
blacklist r1000

##############################################################################################################################

If you could not blacklist the original module "r8169", then follow this installation steps.

Here is a copy of the original post.
source: http://ubuntuforums.org/showthread.php?t=143982&highlight=r1000

##############################################################################################################################

 Re: Gigabit ethernet Realtek RTL8169 too slow
> ...but transfer speed still the same as with 100 Mbps ethernet.

Got the same problem with my onboard 8169 NIC ... transfers are en par or worse as with 100MBit. Couldn't find any solution so far ...

> I've tryed a Realtek driver r1000 and it did install, but I'm not sure if it actually loads.

To check if the r1000 module is loaded simply check with lsmod:

Open a terminal:

# lsmod | grep r1000

Output should look like this:
r1000 16064 0

Now, let's find out if r8169 is loaded as well...

# lsmod | grep r8169

If it is loaded then there's the chance that r8169 has grabbed the NIC ... however, you can force r1000 to be used by a small "hack".

# sudo mv /lib/modules/`uname -r`/kernel/drivers/net/r8169.ko ~/
This will move the r8169 kernel module into your home directory.

# sudo depmod -a
Rebuild the kernel module dependencies.

# sudo mv /boot/initrd.img-`uname-r` /boot/initrd.img-`uname -r`.ubuntu
make a backup of the original initrd.

# sudo mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`
Create a new initrd WITHOUT the r8169 module

# sudo gedit /etc/modules

Add "r1000" (without the quotes) at the end of the file.

Save the file.

Upon reboot you are using r1000 for sure as there's no more r8169.

I'm sure the same goal may be accomplished by blacklisting r8169 somewhere in the config of hotplug --- haven't worked myself into this yet.

Now try and see if you see any improvements ...

[EDIT]
If you are curious you may find some output from the module in /var/log/dmesg - looks like this:

Code:

[ 67.280895] eth0: Identified chip type is 'RTL8169S/8110S'.
[ 67.280902] eth0: r10001.0, the Linux device driver ...

Read more...

Revision history for this message
Achim (ach1m) wrote :

I have tested Gutsy Tribe 2 and the bug still exists.

I hope someone could solve this issue before finale release.

Revision history for this message
Achim (ach1m) wrote :

So today I have tested Tribe 4 and the bug still exists.

So maybe someone has a bit time to take a look at this bug.

I still hope that this will be fixed until the final release of Gutsy.

best wishes
Achim

Revision history for this message
andrehamburg (andre25) wrote :

Hello everyone,
i have the same configuration. A computer with a RTL8111 onboard NIC, Ubuntu 7.10 and samba is running. When i download some files from a Windows XP Computer, the speed is very low (less than 100kbit/s). From another computer, also with 7.10 but with Intel onboard NIC, the speed is normal. But i remember some weeks ago on the Windows computer i had installed Vista for testing, and i mean the speed was high (nearly to 17Mbit/s). Maybe there is a problem in the communication between Samba and XP?
i hope my comment is helpfully and the problem will be fixed asap.
Regards, André.

Revision history for this message
Achim (ach1m) wrote :

Hi @all,

there are new drivers from Realtek available.

ftp://202.65.194.212/cn/nic/r8168-8.003.00.tar.bz2

http://www.realtek.com.tw

I haven't tested the driver much, as far as I can see the driver works quite well.
I have downloaded/uploaded ca. 5 Gib of files over smb/cifs and everything seems to be okay.

But I still hope for Gutsy that I don't have to touch the terminal to get my NIC working.

best wishes
Achim

Revision history for this message
Achim (ach1m) wrote :

It would be nice if any developer could comment on this problem.

Maybe someone could pass this problem on to the kernel developers.
I don't know how a driver (r8196) like this could make it in to kernel if it doesn't work right.

modinfo

filename: /lib/modules/2.6.22-12-generic/kernel/drivers/net/r8169.ko
version: 2.2LK
license: GPL
description: RealTek RTL-8169 Gigabit Ethernet driver
author: Realtek and the Linux r8169 crew <email address hidden>
srcversion: E76EC316B2C797C735E45F0
alias: pci:v00001737d00001032sv*sd00000024bc*sc*i*
alias: pci:v000016ECd00000116sv*sd*bc*sc*i*
alias: pci:v00001259d0000C107sv*sd*bc*sc*i*
alias: pci:v00001186d00004300sv*sd*bc*sc*i*
alias: pci:v000010ECd00008169sv*sd*bc*sc*i*
alias: pci:v000010ECd00008168sv*sd*bc*sc*i*
alias: pci:v000010ECd00008167sv*sd*bc*sc*i*
alias: pci:v000010ECd00008136sv*sd*bc*sc*i*
alias: pci:v000010ECd00008129sv*sd*bc*sc*i*
depends:
vermagic: 2.6.22-12-generic SMP mod_unload 586
parm: media:force phy operation. Deprecated by ethtool (8). (array of int)
parm: rx_copybreak:Copy breakpoint for copy-only-tiny-frames (int)
parm: use_dac:Enable PCI DAC. Unsafe on 32 bit PCI slot. (int)
parm: debug:Debug verbosity level (0=none, ..., 16=all) (int)

As you can see in the modinfo realtek is one of the authors, so I could not understand,
why this driver is so bad and the driver from the realtek homepage works so good.

best wishes
Achim

Revision history for this message
Achim (ach1m) wrote :

I have tested linux-kernel-2.6.23-rc8 with a new r8196 module and a patch for it.
Network speed was very good, so it seems that with the new kernel 2.6.23 the problems will be solved.

Changed in linux-ubuntu-modules-2.6.22:
status: Confirmed → In Progress
Revision history for this message
Tim Gardner (timg-tpi) wrote :

Achim, can you test the r8196 driver in the Gutsy kernel? You can just replace r8196.c in Gutsy with the sources you compiled for linux-kernel-2.6.23-rc8. If it works for you, please attach the source file to this report.

Changed in linux-ubuntu-modules-2.6.22:
assignee: nobody → timg-tpi
importance: Undecided → Medium
Revision history for this message
Achim (ach1m) wrote :

Yes It works.

I have copied some gigabyte of files over smb/cifs and the network speed was quite good.
(smaller and biger files)

If you need more information about the original patch then let me know and I will post it here.

thanks in advanced

Achim

Revision history for this message
Tim Gardner (timg-tpi) wrote :

Gutsy commit 3a0396388973912caef9ef8c034755dec3a91f9c

Changed in linux-ubuntu-modules-2.6.22:
status: In Progress → Fix Committed
Revision history for this message
Tim Gardner (timg-tpi) wrote :

2.6.22-13.40

Changed in linux-ubuntu-modules-2.6.22:
assignee: timg-tpi → nobody
status: Fix Committed → Fix Released
Revision history for this message
Rafael Jesus Alcantara Perez (sistemas-dedaloingenieros) wrote :

I've Gutsy with kernel 2.6.22-14.46 but the problem persists, is it really fixed?

Thanks in advance.

Revision history for this message
Achim (ach1m) wrote :

Yes it is fixed. Are you sure this is the same Problem?

Maybe you could give more information about your problem.

best wishes
Achim

Revision history for this message
Rafael Jesus Alcantara Perez (sistemas-dedaloingenieros) wrote : Re: [Bug 114171] Re: RTL8111 PCI Express Gigabit driver r8169 big files produce slow file transfer

El Viernes 09 Noviembre 2007, Achim escribió:
> Yes it is fixed. Are you sure this is the same Problem?
>
> Maybe you could give more information about your problem.
>
Sure, same behaviour for me, when I'm doing one samba transfer, the speed is 1
MB/s, when I do two samba transfers, the speed become near 6 or 7 MB/s. If I
test FTP, the speed is near 45 MB/s. All the tests have been done writing
in /dev/shm.

Greets.
Rafael J. Alcántara Pérez.
--
+----------
| Departamento de Sistemas <email address hidden>
| Teléfono fijo: 952 602 959
| Fax: 952 602 959
| Dirección: C/ Afligidos 2, 3º Derecha, 29015 Málaga
| Dédalo Ingenieros, S.L.: http://www.dedaloingenieros.com/
| PGP: http://pgp.rediris.es:11371/pks/lookup?op=index&search=0x1899F325
+---------------------

Revision history for this message
Achim (ach1m) wrote :

Maybe you should take a look at the ubuntuforums.org and search for people who could have the same problem.

For me it works, I use my "RTL8111 PCI Express Gigabit Lan" with smbfs/cifs and ftp.

Sorry that I couldn't help.

regards
Achim

Revision history for this message
nord73 (nord73) wrote :

I can confirm the problem is still there. After the release of 7.10, I switched to the internal NIC using the r8169 driver and got 1 Mbit/s max. Switched back to my Intel adapter, and got 25MB/s.

Revision history for this message
nord73 (nord73) wrote :

Sorry, got 1 MB/s with the RTL stuff, not 1Mbit/s.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.