# [SOLVED] Internet speed 50% slower than in Windows

## diegomichel

Hello

I have run already lots of tests and my Internet connection in linux is always below the windows 7 tests

Some images running speedtest on the same servers.

Windows 7

http://i.imgur.com/YoNcZ.jpg

Gentoo(ignore the white square flash bug)

http://i.imgur.com/LmabX.png

as you can see on Gentoo my internet connection is way slower

```
localhost ~ # uname -a

Linux localhost 2.6.39-gentoo-r1 #4 SMP Sat Jun 11 02:51:44 MDT 2011 x86_64 AMD Phenom(tm) II X2 550 Processor AuthenticAMD GNU/Linux
```

```
02:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

        Subsystem: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+

        Kernel driver in use: 8139too

        Kernel modules: 8139too, 8139cp
```

Is there anything i can do to fix my connection, please note than i don't want anything faster just the same as in windows.

If need more information about my system feel free to ask, Thank You.

----------

## diegomichel

Been reading another threads about same problems, i have tried deactivating ipv6 from the kernel and i still getting the same results, now im recompiling everything with -ipv6 will post results when done.

----------

## dmpogo

Why do you have two kernel modules for your card ? which one is actually used ?

----------

## diegomichel

Well booth had the name of my network card in its name, but turns out only the 8139too is the only compatible, i tried to load 8139cp but isnt compatible with it.

```
[  918.738024] 8139cp 0000:02:06.0: This (id 10ec:8139 rev 10) is not an 8139C+ compatible chip, use 8139too
```

They aren't compiled into the kernel but as modules, so i think they don't cause problems to each other.

----------

## diegomichel

```
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)

03:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

```

I have tried with another network card and got same results.

So far i have deactivate ipv6 in the kernel, re-emerge world with -ipv6, and tried used a different network card, any other ideas?

----------

## dmpogo

 *diegomichel wrote:*   

> Well booth had the name of my network card in its name, but turns out only the 8139too is the only compatible, i tried to load 8139cp but isnt compatible with it.
> 
> ```
> [  918.738024] 8139cp 0000:02:06.0: This (id 10ec:8139 rev 10) is not an 8139C+ compatible chip, use 8139too
> ```
> ...

 

Are you saying only one module is loaded ? Which one ? did you try another ?

----------

## diegomichel

Yea only the module 8139too was loaded, and yea i tried the other one but isnt compatible with my network card, i also tried with another network card, but the speed is still slow.

----------

## diegomichel

Fix:

http://www.speedtest.net/result/1337617949.png

dhcpcd always reset the active network card MTU to 576, so to fix just set it higher with the following command:

```
ifconfig eth1 mtu 1500
```

2000 is the one that give me better results, higher numbers don't make any difference in my case, so experiment with your MTU, some network cards have a limit.

please note this value will reset everytime you reboot or dhcpcd is restarted, what i did was add

```

ifconfig eth0 mtu 1500

ifconfig eth1 mtu 2000

```

to the file /etc/local.d/local.start and give it execution permissions, this files auto executes when the system starts, didn't know another way so i did that.

Hope this help someone in the future.

----------

## dmpogo

 *Quote:*   

> 
> 
> dhcpcd always reset the active network card MTU to 576, so to fix just set it higher with the following command: 
> 
> 

 

This is surely not the standard dhcpcd behaviour.  Do you have

```

# Respect the network MTU.

option interface_mtu

```

in our /etc/dhcpcd.conf ?

----------

## diegomichel

```
cat /etc/dhcpcd.conf

# A sample configuration for dhcpcd.

# See dhcpcd.conf(5) for details.

# Inform the DHCP server of our hostname for DDNS.

hostname

# To share the DHCP lease across OSX and Windows a ClientID is needed.

# Enabling this may get a different lease than the kernel DHCP client.

# Some upstream DHCP servers may also require a ClientID, such as FRITZ!Box.

#clientid

# A list of options to request from the DHCP server.

option domain_name_servers, domain_name, domain_search, host_name

option classless_static_routes

# Most distributions have NTP support.

option ntp_servers

# Respect the network MTU.

option interface_mtu

# A ServerID is required by RFC2131.

require dhcp_server_identifier

# A hook script is provided to lookup the hostname if not set by the DHCP

# server, but it should not be run by default.

nohook lookup-hostname
```

Check this out:

```
localhost ~ # ifconfig eth1

eth1      Link encap:Ethernet  HWaddr 00:24:1d:8c:0d:03  

          inet addr:10.36.78.250  Bcast:255.255.255.255  Mask:255.255.192.0

          UP BROADCAST RUNNING MULTICAST  MTU:2000  Metric:1

          RX packets:740783 errors:0 dropped:0 overruns:0 frame:0

          TX packets:386303 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:945709617 (901.8 MiB)  TX bytes:35635887 (33.9 MiB)

          Interrupt:42 Base address:0x2000 

localhost ~ # /etc/init.d/dhcpcd restart

 * Stopping DHCP Client Daemon ...                                                                                                                [ ok ]

 * Starting DHCP Client Daemon ...                                                                                                                [ ok ]

localhost ~ # ifconfig eth1

eth1      Link encap:Ethernet  HWaddr 00:24:1d:8c:0d:03  

          inet addr:10.36.78.250  Bcast:255.255.255.255  Mask:255.255.192.0

          UP BROADCAST RUNNING MULTICAST  MTU:576  Metric:1

          RX packets:756924 errors:0 dropped:0 overruns:0 frame:0

          TX packets:394132 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:968619047 (923.7 MiB)  TX bytes:36162334 (34.4 MiB)

          Interrupt:42 Base address:0x2000 

```

----------

## dmpogo

None of my machines show that behaviour, could it be that it is your router which sets it, and dhcpcd "respects" (while windows overwrite) ?

----------

## diegomichel

Yea that seems to be the issue, is what i have read on other threads https://forums.gentoo.org/viewtopic-p-6538759.html

Commented that out

```
# option interface_mtu
```

on /etc/dhcpcd.conf and it dont set it to 576 anymore, seems to be a problem of my ISP..

----------

