You are not logged in.

#1 2018-03-03 16:34:20

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

[SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

Dear Arch Community,

I have a problem with my networkspeed, despite setting up all the necessary services (networkmanager), DNS caching (unbound) and so on it is unbearably slow. Loading of websites is usually fine, although sometimes takes a bit. Mostly, I recognise this problem though when streaming (Netflix, Twitch, Youtube), lag in videos due to needed buffering times and always only a small amount of prebuffering, live streams lag every few seconds for the same reason, without buffer indication though. All this lead me to posting a topic here regarding slow video speed earlier and closed it after I checked hardware acceleration and codecs, those not being the problem. Very indicative was also that the problem did not occur for locally played video files but with any player or browser that used online sources.

Anyway, in further analysis I targeted my network settings. I installed conky to have an everpresent realtime monitoring of my current network speed, GPU etc. During Twitch streaming (it being the prime example of the issue), my GPU becomes more active, thus hardware acceleration works but my download speed never goes beyound 300KiB, despite my internet contract/access giving me 4Mbit/s, which is 3906.25KiB, not 300. During the day the general internet speed drops to 2832.03KiB, according to speedtest.net, still 10x as much. On a sidenote, it also puzzles me how speedtest.net can indicate this kind of speed when my downloadspeed is ever only 300KiB in real world application. On the same machine, when dual-booting into Windows, every streams works flawless, same for other devices on the network, only my beloved arch is striking.

Problem-solving attempts so far:

  • Disabling Reverse Path Filtering in sysctl (and any other hardening rule applied through sysctl), to improve general speed, with no success.

  • Changing between different DNS providers (Google, myVPN, DNS.WATCH etc.), no difference.

  • Disabling DNSCrypt, no difference.

  • Re-enabling WebRTC in Firefox (disabled to prevent leaks when VPN is active), no difference.

I use NetworkManager as a network service, iptables as firewall in a relatively simple configuration, unbound as DNS caching with DNSSEC. The system is up to date (03/03/18).
Here is my iptables file and my unbound.conf, I do not think the issue lays here though.

# Generated by iptables-save v1.6.1 on Sat Jan 27 13:36:55 2018
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
:TCP - [0:0]
:UDP - [0:0]
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m conntrack --ctstate INVALID -j DROP
-A INPUT -p icmp -m icmp --icmp-type 8 -m conntrack --ctstate NEW -j ACCEPT
-A INPUT -p udp -m conntrack --ctstate NEW -j UDP
-A INPUT -p tcp --tcp-flags FIN,SYN,RST,ACK SYN -m conntrack --ctstate NEW -j TCP
-A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable
-A INPUT -p tcp -j REJECT --reject-with tcp-reset
-A INPUT -j REJECT --reject-with icmp-proto-unreachable
COMMIT
# Completed on Sat Jan 27 13:36:55 2018
server:
  num-threads: 4
  include /etc/unbound/adservers.conf
  root-hints: "/etc/unbound/root.hints"
  trust-anchor-file: trusted-key.key
#  access-control: 192.168.178.0/24 allow
  do-ip6: no

  forward-zone:
   name:.
# DNS.WATCH (no logging, DNSSEC, DNSCrypt)
#    forward-addr: 84.200.69.80
#    forward-addr: 84.200.70.40
# PIA (no logging, DNSSEC)
#    forward-addr: 209.222.18.222
#   forward-addr: 209.222.18.218
# Google
    forward-addr: 8.8.8.8
    forward-addr: 8.8.4.4

I sincerely hope that you guys have suggestions of solution attempts I have not tried yet, or ideas what monitoring tool I could use to further pin down the problem.

All the best,

An Arch fan

--------------------------------------------------------------------------
1st Edit 05/03/18:

The following solution was eventually found with help from the amazing people below:

ethtool -s enp3s0
  • Here auto-negotiation was off, which is a setting that allows two connected network ports or devices to communicate with each other and determine the best possible speed they both can run at and then they both automatically adopt the negotiated setting.

ethtool -s enp3s0 autoneg on
  • This then automatically (renogitated or) changed the duplex mode of the network interface card settings to full which fixed the slow speed, streaming is now buttery smooth and videos load fast. smile

  • This setting is not persistant across reboots, though. Thus, this is the symptom but the cause of the issue is not yet found. At least this gives me a workaround to apply.

2nd Edit 05/03/18

It seems that the auto-negotiation should be on by default and is when just booting from the arch iso, chrooting into the system. However, the duplex mismatch does only disguise the actual issue, the characteristic lost packages of a duplex mismatch  do occur in Wireshark though thus when the lag is present many TCP resets occur when streaming from twitch. Part of the slow connection might be an old switch that I now removed (I am plugged directly into the router now). With this configuration I can stream 1080p60p and experience no issues anymore, despite the auto-negotiation being off. In conclusion, the final word is not yet spoken, the reason for auto-negotiation being off has to be found as well as the actual cause for the lags (TCP resets) and what makes them occur and what does not.

Last edited by deafeningsylence (2018-03-05 22:02:48)

Offline

#2 2018-03-03 16:49:16

ratcheer
Member
Registered: 2011-10-09
Posts: 618

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

What type of NIC are you using? I have found that many USB wifi devices will only operate at 802.11b/g speeds on Linux, even though they are easily capable of 802.11ac connections on Windows.

Tim

Last edited by ratcheer (2018-03-03 16:50:31)

Offline

#3 2018-03-03 17:10:25

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

What type of NIC are you using? I have found that many USB wifi devices will only operate at 802.11b/g speeds on Linux, even though they are easily capable of 802.11ac connections on Windows.

Hi Tim,

thanks for taking the time, I don't use wifi, it is a desktop computer with a direct cable connection to the router. Here is some info on the network device in my mainboard:

  Hardware Class: network interface
  Model: "Ethernet network interface"
  Driver: "r8169"
  Driver Modules: "r8169"
  Device File: enp3s0

Offline

#4 2018-03-04 08:58:41

jonno2002
Member
Registered: 2016-11-21
Posts: 42

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

is your system up to date ? what is the output of:

sudo sysctl net.ipv4.tcp_congestion_control

if its "bbr" then change it to "cubic" like so:

sudo sysctl net.ipv4.tcp_congestion_control=cubic

this was fixed in kernel 4.15.3-2 though, refer to this thread:
https://bbs.archlinux.org/viewtopic.php?id=234276

just thought id mention it as your using the same realtek nic that was causing these problems.

Offline

#5 2018-03-04 11:08:25

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 2,651

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

deafeningsylence wrote:

Anyway, in further analysis I targeted my network settings. I installed conky to have an everpresent realtime monitoring of my current network speed, GPU etc. During Twitch streaming (it being the prime example of the issue), my GPU becomes more active, thus hardware acceleration works but my download speed never goes beyound 300KiB, despite my internet contract/access giving me 4Mbit/s, which is 3906.25KiB, not 300. During the day the general internet speed drops to 2832.03KiB, according to speedtest.net, still 10x as much. On a sidenote, it also puzzles me how speedtest.net can indicate this kind of speed when my downloadspeed is ever only 300KiB in real world application. On the same machine, when dual-booting into Windows, every streams works flawless, same for other devices on the network, only my beloved arch is striking.

Are you sure you aren't just getting your units confused? A 4Mb internet connection will provide a maximum speed of 500kB as there are 8 bits(b) in a byte(B).
Can you post a link to a speedtest.net result please.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#6 2018-03-04 11:44:58

seth
Member
Registered: 2012-09-03
Posts: 7,218

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

488 KiB /s (troughput unlike memory has always been measured in SI)
net-througput of 300KiB/s sounds resonable.

Do a speedtest using https://linhost.info/2013/10/download-test-files/ and post the output of wget. You can cancel the download after some 30 seconds or so using ctrl+c.

Online

#7 2018-03-04 14:07:52

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

jonno2002 wrote:

is your system up to date ? what is the output of:

sudo sysctl net.ipv4.tcp_congestion_control

if its "bbr" then change it to "cubic" like so:

sudo sysctl net.ipv4.tcp_congestion_control=cubic

this was fixed in kernel 4.15.3-2 though, refer to this thread:
https://bbs.archlinux.org/viewtopic.php?id=234276

just thought id mention it as your using the same realtek nic that was causing these problems.

Thanks for the reply! I checked it and the result is cubic:

[XXXXX@arch ~]$ sudo sysctl net.ipv4.tcp_congestion_control
[sudo] password for XXXXXX: 
net.ipv4.tcp_congestion_control = cubic

The system is up to date and on 4.15.6-1-ARCH.

Offline

#8 2018-03-04 14:11:58

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

Slithery wrote:
deafeningsylence wrote:

Anyway, in further analysis I targeted my network settings. I installed conky to have an everpresent realtime monitoring of my current network speed, GPU etc. During Twitch streaming (it being the prime example of the issue), my GPU becomes more active, thus hardware acceleration works but my download speed never goes beyound 300KiB, despite my internet contract/access giving me 4Mbit/s, which is 3906.25KiB, not 300. During the day the general internet speed drops to 2832.03KiB, according to speedtest.net, still 10x as much. On a sidenote, it also puzzles me how speedtest.net can indicate this kind of speed when my downloadspeed is ever only 300KiB in real world application. On the same machine, when dual-booting into Windows, every streams works flawless, same for other devices on the network, only my beloved arch is striking.

Are you sure you aren't just getting your units confused? A 4Mb internet connection will provide a maximum speed of 500kB as there are 8 bits(b) in a byte(B).
Can you post a link to a speedtest.net result please.

Due to me being horrible in math, I used an online unit converter. As far as I understood it Mbit/s are different to MB.
Here the speedtest result: http://www.speedtest.net/result/7109871191

Offline

#9 2018-03-04 14:29:44

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

seth wrote:

488 KiB /s (troughput unlike memory has always been measured in SI)
net-througput of 300KiB/s sounds resonable.

Do a speedtest using https://linhost.info/2013/10/download-test-files/ and post the output of wget. You can cancel the download after some 30 seconds or so using ctrl+c.

The speedtest result you can find here.

The one you requested is here.
linhost speed test

This kind of speed is not fast and does not suffice for continuous streaming content in better than 360p. As for example twitch recommends 2500 to 4000 kbps for 720p streaming and with on average 250KiB (2048kbps) it very much fits the picture that a 720p stream lags every few seconds to buffer.

Offline

#10 2018-03-04 15:02:04

lo1
Member
Registered: 2017-09-25
Posts: 560

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

Your upload speed is higher than your download speed. If you did setup your network correctly, complain to your service provider or get a better subscription.

Before you give up, check this:

ethtool enp3s0

Offline

#11 2018-03-04 15:18:00

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

lo1 wrote:

Your upload speed is higher than your download speed. If you did setup your network correctly, complain to your service provider or get a better subscription.

Before you give up, check this:

ethtool enp3s0

Thanks for the reply, I noticed that, too. I will check speed in Windows with speedtest.net for confirmation and then confront them (and also report here). Still the speed speedtest.net gives me is much higher than what I get in everyday browsing.

Here is the ouput of ethtool:

Settings for enp3s0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Half 1000baseT/Full 
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 100Mb/s
        Duplex: Half                                                                                                
        Port: MII                                                                                                   
        PHYAD: 0                                                                                                    
        Transceiver: internal                                                                                       
        Auto-negotiation: off                                                                                       
Cannot get wake-on-lan settings: Operation not permitted                                                            
        Current message level: 0x00000033 (51)                                                                      
                               drv probe ifdown ifup                                                                
        Link detected: yes    

Offline

#12 2018-03-04 15:32:54

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 15,783

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

We are a dozen posts in, and I am astonished that we have not yet determined:

Is this a wired or a wireless connection?
What are the chipsets used by the NIC.
What does the router look lioke?
What are the output of ip link and, if appropriate, iw wlo1 link  (Replace wlo1 with the name of your wireless card)
What are you using to manage your network? (Systemd-network? netctl? NetworkManager?)
Is this a VM?  (You would be surprised how often this is not mentioned)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

#13 2018-03-04 15:56:46

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

ewaller wrote:

We are a dozen posts in, and I am astonished that we have not yet determined:

Is this a wired or a wireless connection?
What are the chipsets used by the NIC.
What does the router look lioke?
What are the output of ip link and, if appropriate, iw wlo1 link  (Replace wlo1 with the name of your wireless card)
What are you using to manage your network? (Systemd-network? netctl? NetworkManager?)
Is this a VM?  (You would be surprised how often this is not mentioned)

  • Wired connection

  • Router is a connectbox from my ISP Ziggo

  • Output of iw is non-existent due to it being a wired connection, the content of ip link is:

    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                                                           
    2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000  
        link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff     {
  • I am using NetworkManager.

  • It is not a VM.

Hope that answers your questions, thanks for taking the time smile. I really hope this issue can be solved.

Last edited by deafeningsylence (2018-03-04 16:01:18)

Offline

#14 2018-03-04 17:00:44

lo1
Member
Registered: 2017-09-25
Posts: 560

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

Speed: 100Mb/s
        Duplex: Half                                                                                                
        Port: MII                                                                                                   
        PHYAD: 0                                                                                                    
        Transceiver: internal                                                                                       
        Auto-negotiation: off 

One of the first thing I've ever learned about networking: ethernet interface working in Half Duplex (HDX) means something's wrong --> autonegotiation is off and in most cases you want it to be on

ethtool -s enp3s0 autoneg on

See if it switches to full duplex, otherwise:

ethtool -s enp3s0 duplex full

P.S. probably you need your interface to be up but disconnected, I don't remember this well and I'm not even sure if this will tangibly benefit your network performance.

Last edited by lo1 (2018-03-04 17:02:05)

Offline

#15 2018-03-04 17:32:26

seth
Member
Registered: 2012-09-03
Posts: 7,218

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

Even in half-duplex mode the 100MB ethernet is hardly the limiting factor when we're talking about 3MBit/s down (and 4MBit/s up ...)
Could be a symmetric line and a really shitty one.

@deafeningsylence, you're getting 3MBit/s downstream in both tests.
Assuming you actually only have a 4MBit/s deal (as suggested in the OP) and there's maybe some background load next to the tests (torrent, online video, updates, ...) that's an expectable result.

Online

#16 2018-03-05 13:17:59

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

lo1 wrote:
Speed: 100Mb/s
        Duplex: Half                                                                                                
        Port: MII                                                                                                   
        PHYAD: 0                                                                                                    
        Transceiver: internal                                                                                       
        Auto-negotiation: off 

One of the first thing I've ever learned about networking: ethernet interface working in Half Duplex (HDX) means something's wrong --> autonegotiation is off and in most cases you want it to be on

ethtool -s enp3s0 autoneg on

See if it switches to full duplex, otherwise:

ethtool -s enp3s0 duplex full

P.S. probably you need your interface to be up but disconnected, I don't remember this well and I'm not even sure if this will tangibly benefit your network performance.

lo1, let me express my deepest gratitude, I love you man. That fixed it! Also where did you learn about networking, I liked what I learned during this investigation and would like to build up on it, any suggestions?

I read up a bit on the whole auto-negotiation topic and what duplex and full actually mean and after changing auto-neg to on, it directly flipped to "full" (cause thats what auto-neg does as far as I understood it) and the output of ethtol enp3s0 (thanks a lot for suggesting that as well) looks like this now:

Settings for enp3s0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Half 1000baseT/Full 
        Supported pause frame use: No
        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                                            
        Link partner advertised pause frame use: Symmetric                                                          
        Link partner advertised auto-negotiation: Yes                                                               
        Link partner advertised FEC modes: Not reported                                                             
        Speed: 100Mb/s                                                                                              
        Duplex: Full                                                                                                                                        
        Port: MII                                                                                                                                           
        PHYAD: 0                                                                                                                                            
        Transceiver: internal                                                                                                                               
        Auto-negotiation: on                                                   

The shown speed in conky is being where it is supposed to be with 1-2MiB when streaming twitch in 1080p60 instead of 300KiB with lots of buffering. I really wonder how that auto-negotiation was turned off because I sure never messed with it directly. Maybe it has something to do with the driver problems that jonno2002 mentioned? Maybe they switched it off as a temporary workaround and for some reason when the real fix came this setting never changed for my system?

is your system up to date ? what is the output of:
sudo sysctl net.ipv4.tcp_congestion_control

if its "bbr" then change it to "cubic" like so:

sudo sysctl net.ipv4.tcp_congestion_control=cubic

this was fixed in kernel 4.15.3-2 though, refer to this thread:
https://bbs.archlinux.org/viewtopic.php?id=234276

Again thanks a lot to everybody here for taking the time, once again this forum proves to be full of caring, curious and capable people. Thank you! smile

Offline

#17 2018-03-05 17:43:49

lo1
Member
Registered: 2017-09-25
Posts: 560

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

Glad it worked, your thankful nice words are more than appreciated wink

Maybe they switched it off as a temporary workaround

This actually doesn't make sense to me, but if you're having issues only after 4.15 kernel update, it may be related. It's hard to say why autonegotiation is set to off: it may also be (poor) manufacturer choice and if this is the case you may always need to set autonegotiation on each boot.

You can practice on lots of stuff like this by simply maintaining your system (next step is a basic VM setup), but since you want to build up on this I'd suggest you have a look at http://docwiki.cisco.com/wiki/Ethernet_ … ess_Method

Remember to mark your thread as [SOLVED]

Offline

#18 2018-03-05 17:59:11

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

lo1 wrote:

Glad it worked, your thankful nice words are more than appreciated wink

Maybe they switched it off as a temporary workaround

This actually doesn't make sense to me, but if you're having issues only after 4.15 kernel update, it may be related. It's hard to say why autonegotiation is set to off: it may also be (poor) manufacturer choice and if this is the case you may always need to set autonegotiation on each boot.

The setting does not stick across reboots, so your prediction was indeed correct hmm I'll just setup a script for now but I do want to find out why the heck auto-negotiation is disabled all the time. I recently disabled wake on lan in my bios, maybe that brings this with it, I will have a look. Or maybe it has something to do with my switch? I am plugged into a small 5 port network switch that is 5+ years old (but a good Netgear one) and the router plugs into that switch. I'll try if a direct connection changes anything. Still, I doubt this has something to do with it since auto-negotiation is off anyway and the two do not communicate.

Anyway, at least for now I do have a workaround, the cause will eventually be found as well.

You can practice on lots of stuff like this by simply maintaining your system (next step is a basic VM setup), but since you want to build up on this I'd suggest you have a look at http://docwiki.cisco.com/wiki/Ethernet_ … ess_Method

Thanks for the suggestion, I will take a look at that cisco link.

Regarding the VM Setup, I already did with an own script for hardware passthroughs, synergy, networktunnel, etc. Was fun, however in the end I went back to dual boot, due to the VM setup being kinda prone to random breakage and errors. Also, Linux makes me get shit done while windows distracts so the dual boot ended up being the better solution.

Remember to mark your thread as [SOLVED]

I am not sure if I should let it open until the cause is found, so that I can add it to the original post as a solution or if I should just close it for now.

Offline

#19 2018-03-05 18:04:13

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 15,783

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

deafeningsylence wrote:

Remember to mark your thread as [SOLVED]

I am not sure if I should let it open until the cause is found, so that I can add it to the original post as a solution or if I should just close it for now.

Not the same thing.  [SOLVED] tells those searching the forums that there is a solution in the thread making the reading of the thread worthwhile.  Closed is something moderators do to enforce the end of posting to a thread.  We don't close most solved threads.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

#20 2018-03-05 18:05:36

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

Not the same thing.  [SOLVED] tells those searching the forums that there is a solution in the thread making the reading of the thread worthwhile.  Closed is something moderators do to enforce the end of posting to a thread.  We don't close most solved threads.

Thanks ewaller, I'll mark it accordingly then. smile

Offline

#21 2018-03-05 18:31:35

seth
Member
Registered: 2012-09-03
Posts: 7,218

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

Tbh, I don't buy this. Even in worst case a half duplex 100 ethernet should not cause drastic limitations on the downstream and the speedtest results don't reflect that either.
The only thing I could remotely imagine is that twitch heavily relies on upstream (beyond a few ACK packages) and your "router" does virtually nothing but just passing packages (is it a router or a modem?)

That said: just tried twitch.tv and it's basically unusable (on a faster connection w/ full duplex) and it causes no notable upstream at all. Also the quality varies with the channel and sometimes I can play at ~1MiB and sometimes not at ~256KiB.

Do you have trouble eg. using youtube w/o enforcing autoneg (and in doubt using youtube-video to sidestep possible browser issues)

Online

#22 2018-03-05 20:10:41

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

seth wrote:

Tbh, I don't buy this. Even in worst case a half duplex 100 ethernet should not cause drastic limitations on the downstream and the speedtest results don't reflect that either.
The only thing I could remotely imagine is that twitch heavily relies on upstream (beyond a few ACK packages) and your "router" does virtually nothing but just passing packages (is it a router or a modem?)

That said: just tried twitch.tv and it's basically unusable (on a faster connection w/ full duplex) and it causes no notable upstream at all. Also the quality varies with the channel and sometimes I can play at ~1MiB and sometimes not at ~256KiB.

Do you have trouble eg. using youtube w/o enforcing autoneg (and in doubt using youtube-video to sidestep possible browser issues)

Hey seth, thanks for the reply, I do have slower prebuffering on YouTube when I set the quality to higher resolutions but I can indeed watch a 720p video without the video stopping to buffer, which is not the case on Twitch. Also the on YT I get up to 2MiB as well when loading a video (of course with spikes back to 300KiB, same as you) but for Twitch it never goes that high at all and whenever it is set to anything above 360p it stops to buffer every few seconds.

I excluded browser issues by running twitch via streamlink in different players (vlc, mpd) and the lags remain. Similarly, YT runs fine in youtube-video but prebuffers faster without (at least from what I see in the prebuffering bar/indicators).

The reason I think the auto-negotiation being off is at least part of the cause, is because when I renable it and the mode reverts to full, no lags at all for Twitch and YT loads faster, also I experience no hickups in browsing anymore, which sometimes occured.
From what I read about auto-negotiation it should never be off in client systems and it only makes sense for servers to configure it manually. Also, as far as I understood it the reason is not the duplex mode itself but the duplex mismatch leading to slowed network traffic, that is my pc NIC runs in half duplex and my router in full leading to lost packages, error correction attempts that also fail and further "clog the line", slowing the connection.
"the end result is a connection that is working but performs extremely poorly because of the duplex mismatch"

I think the differences between YouTube and Twitch just depend on the efficiency and quality (kbps not resolution) of the applied encoding.

Now I just need to find out why auto-negotiation is turned off after every reboot. Already wrote Realtek an email about it, I will report back here.

Last edited by deafeningsylence (2018-03-05 20:17:55)

Offline

#23 2018-03-05 20:26:44

progandy
Member
Registered: 2012-05-17
Posts: 2,874

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

Do you have configured a .link file in systemd (man systemd.link)? There are configuration options for Duplex and AutoNegotiation. Or maybe you have some other strange udev rule?

Is the setting different if you boot from an archlinux iso?


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#24 2018-03-05 20:36:10

lo1
Member
Registered: 2017-09-25
Posts: 560

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

While I contributed to find a workaround for this issue, I must agree with seth too: usually (and as a sane default) streaming flows through UDP frames.

You can do your own research about it, but it basically means one thing: the transmitting device doesn't have a care in the world about your lost packages, because UDP doesn't require "acknowledgements".

So while setting your nic to full duplex is providing overall benefit to your network performance, I must admit I'm still wondering exactly how duplex mismatch could interfere with streaming and thus UDP dataflow.

Note that I already stated this when I suggested to switch to autonegotiation on:

lo1 wrote:

I'm not even sure if this will tangibly benefit your network performance.

I was thinking about MTU path discovery and the possibility that, to avoid collisions due to half duplex, a rather consisent IP fragmentation is taking place. But that would be just my theories, and would better fit into Off-Topic since this has probably nothing to do with how Arch/*nix work.

EDIT: I guess it's better to let wireshark judge this.

Last edited by lo1 (2018-03-05 20:47:06)

Offline

#25 2018-03-05 20:47:44

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

Re: [SOLVED] Slow networkspeed - below 300KiB, duplex-mismatch

Do you have configured a .link file in systemd (man systemd.link)? There are configuration options for Duplex and AutoNegotiation. Or maybe you have some other strange udev rule?

Is the setting different if you boot from an archlinux iso?

Hey progandy, thanks for pitching in, I tried and with the arch-iso (chroot into my partition) auto-negotiation is on! Thus, I must have some weird rule that disables it, although I am very sure that I never directly and consciously tinkered with udev.

You can do your own research about it, but it basically means one thing: the transmitting device doesn't have a care in the world about your lost packages, because UDP doesn't require "acknowledgements".

So while setting your nic to full duplex is providing overall benefit to your network performance, I must admit I'm still wondering exactly how duplex mismatch could interfere with streaming and thus UDP dataflow.

Mh, strange then, I lack the in-depth knowledge at this moment so I just took what I got from the duplex mismatch wiki article and the few cisco instruction lines I read and came to the conclusion that the duplex mismatch is crippling my internet speed, since it is also so explicitly stated that this mismatch leads to a functioning but very slow connection which is exactly what happens for me and is resolved when I disable it. However, maybe you guys are right and there is something else here and the increased speed through auto-negotiation just increases the speed enough to make it unnoticeable.

The fact that the arch-iso does not show this behaviour though tells me that there must be something wrong with my system. Any suggestions where I could search for any custom rules that effect auto-negotiation?

PS: I checked being directly plugged into my router and this does not change anything (with reboot etc.), thus it is not my old network switch.

Last edited by deafeningsylence (2018-03-05 20:49:18)

Offline

Board footer

Powered by FluxBB