Score:0

New Hardware Setup, fast LAN Speed but slow internet speed when compared to other devices on network

ki flag

I am going a bit crazy with this problem, it's been a week now. To start I am aware of MB and Mb, so assume I am using them correctly.

I recently setup new Hardware to use as a headless server, i5-13500 + Asus Motherboard + SSD, Ubuntu 22.04 etc. This new hardware will be replacing a Virtual Machine with Ubuntu 18.04 that has been running on a NAS. Internet speeds are 1.5Gbps but currently limited by my Gateway to 1Gbps.

Now the problem:

On New Server:

  • LAN Speeds are fast, close to 1G (~940MBb/s). Tested via iperf as well as by downloading a file from my NAS
  • Fast.com consistently says >900Mbps
  • Speedtest.net consistently says >600Mbps
  • wget Ubuntu Images downloads at ~9MB/s
  • All other downloads start at 15MB/s but settle to less then 10MB/s

On Old VM

  • Lan speeds similar at new server at 1G
  • Fast.com consistently says >900Mbps
  • Speedtest.net consistently says >600Mbps
  • wget Ubuntu Images downloads at 90+MB/s

I went down the rabbit hole of the Realtek drivers r8169 etc and when trying to install new ones nothing would work. But based on the fact that the Lan Speeds are consistently ok, leads me to believe that drivers are fine.

I have both the NAS(With VM) and new server hooked up to a Ubiquity Switch and then UDMP gateway, no special rules on either devices.

I truly am not sure where to go next, or what could be causing this issue. Am greatly appreciative of any help and suggestions.

Will try booting Ubuntu on this HW from a USB and see what a fresh trial gives me for speeds in the mean time.

Terrance avatar
id flag
What is the NIC on the new motherboard? There might be a chance that the wrong driver loaded by default.
Mr Dog avatar
ki flag
RTL8125, driver: r8169. But if this was the case, then I would also get slow network speeds for LAN
Terrance avatar
id flag
It is running the wrong driver. The one that is running is for a 1Gb card, but the one in your system is 2.5Gb. I would suggest that you install the correct driver. https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software In my experience, unless you are actually using a RTL8169 card itself you should be avoiding that one at all costs. On two of my systems that both have RTL8168 cards in them with the proper drivers on them I have no issues, and I do have an 8169 with the r8169 driver with no issues either.
Mr Dog avatar
ki flag
Will try it. It says up to kernel 5.19. Will it be ok with 6.2? Or do I need to downgrade?
Terrance avatar
id flag
Actually, install the `r8125-dkms` driver instead. I just realized that I had to go back to the `dkms` driver for my `r8168` card that was running the newest driver from Realtek. The `dkms` driver is a little bit older, but seems to be working great with the 6.2 kernel. `sudo apt install r8125-dkms`
Mr Dog avatar
ki flag
Ok Speedtest.net is giving me more consistent feedback for 500Mbps with the 8125 from the website. But actual download speeds are still very slow. Will try dkms
Mr Dog avatar
ki flag
I cannot seem to get dkms to install, it shows the following error at the end : r8125.ko: Running module version sanity check. Error! Module version 9.007.01-NAPI for r8125.ko is not newer than what is already found in kernel 6.2.0-26-generic (9.011.01-NAPI). You may override by specifying --force.
Terrance avatar
id flag
You will have to use --force on that one to install it. This answer [here](https://askubuntu.com/a/1334101/231142) is one that I was converting the driver from Realtek to a DKMS version, but it should still show commands on how to force the installation.
Mr Dog avatar
ki flag
The system is using the r8125 driver right now but still speeds are slow. It did however improve the speedtest speeds on the website but real world test does not reflect
Terrance avatar
id flag
I wonder if the MTU size might be incorrect. What is the output of `ip addr | grep mtu`?
Mr Dog avatar
ki flag
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
Mr Dog avatar
ki flag
Keep in mind, I am getting full gigabit speeds when downloading something from LAN, it is just when downloading from the internet that things are slow
Terrance avatar
id flag
I am basically out of ideas for you, but this does definitely sound like an upstream issue from the system. The only reason is because you are getting your 1Gbps speed when only on your LAN which means that your system is probably fine. Router MTUs can cause slow downs when connecting out to the internet. Also, DNS services that your router uses. Even with services that claim 1Gbps I have had problems where I could only max at like 450Mbps. Sometimes ISPs can throttle when certain cap limits are hit. All of this is really hard to say, but very little is actually pointing to your install.
Mr Dog avatar
ki flag
Appreciate all the help! @Terrance. I will wipe the system and see what I get with a fresh install. It could be HW related? It’s a new motherboard. All other systems on the same network consistently get 500-800Mbps which makes me think it’s not upstream.
Score:1
cl flag

In my experince a lot of times this is related to DNS resolution. It could also be caused by packet inspection through a firewall.

Try statically setting your DNS to something like Googles 8.8.8.8 or 8.8.4.4 Flush your DNS cache. Also disable the firewall to see if thats causing the issue.

Mr Dog avatar
ki flag
I have the built in firewall disabled (UFW), there is nothing else I need to worry about from Ubuntu's side correct? Will try changing DNS and verify. THanks
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.