1

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.

Mr Dog
  • 11
  • What is the NIC on the new motherboard? There might be a chance that the wrong driver loaded by default. – Terrance Aug 21 '23 at 00:59
  • RTL8125, driver: r8169. But if this was the case, then I would also get slow network speeds for LAN – Mr Dog Aug 21 '23 at 01:28
  • 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. – Terrance Aug 21 '23 at 01:46
  • Will try it. It says up to kernel 5.19. Will it be ok with 6.2? Or do I need to downgrade? – Mr Dog Aug 21 '23 at 02:19
  • 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 – Terrance Aug 21 '23 at 02:25
  • 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 Aug 21 '23 at 02:33
  • 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. – Mr Dog Aug 21 '23 at 02:35
  • You will have to use --force on that one to install it. This answer here 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. – Terrance Aug 21 '23 at 02:50
  • 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 – Mr Dog Aug 30 '23 at 20:59
  • I wonder if the MTU size might be incorrect. What is the output of ip addr | grep mtu? – Terrance Aug 30 '23 at 21:18
  • 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 Aug 30 '23 at 21:32
  • 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 – Mr Dog Aug 30 '23 at 21:33
  • 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. – Terrance Aug 31 '23 at 14:15
  • 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. – Mr Dog Aug 31 '23 at 15:46
  • Did you try comparing both using only IPv4? Both same MTU? Downloading with wget using a URI with a specific IP? CDNs and other strategies may tend to select different servers. – Pablo Bianchi Sep 06 '23 at 07:35

1 Answers1

1

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.

PHebert
  • 21
  • 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 – Mr Dog Aug 21 '23 at 01:26