3

So I figured out my problem finally through browser developer tools after weeks of scratching my head why sometimes some page loads are super slow.

I saw that DNS lookup is sometimes really slow (2-3 seconds).

What can I do to fix it? Thank you.

4
  • 1
    This will be entirely dependent on the DNS in use on your network/system and what your netowrk can or can't get to for DNS lookups. What Ubuntu version are you currently running?
    – Thomas Ward
    Nov 27, 2020 at 20:49
  • "other people have the same problem" - are you saying others on your network unrelated to your system? A router wouldn't have direct access to install or downlaod things on your computer.
    – Thomas Ward
    Nov 27, 2020 at 22:01
  • Can you perhaps answer my question? We need to verify that the issue is actually you and not something else in your network. If it's outside of Ubuntu and an issue in your network, that's going to be a lot harder to debug.
    – Thomas Ward
    Nov 30, 2020 at 15:34
  • What sort of domains are you seeing the problem with? If these are locally-defined in your /etc/hosts file, be sure to have each domain/subdomain on its own line, even if you have multiple addresses going to the same IP. If your network has IPv6 support enabled, remember to include both the IPv4 and IPv6 addresses. This has bitten me in the past when local development page loads were slow but the open Internet was fast.
    – user1091774
    Dec 5, 2020 at 14:19

2 Answers 2

2

I had issues with systemd-resolved before. You can do the following:

  1. Try disabling and stopping the systemd-resolved service:

    sudo systemctl disable systemd-resolved
    sudo systemctl stop systemd-resolved
    
  2. In the [main] section of your /etc/NetworkManager/NetworkManager.conf:

    dns=default
    
  3. Delete the symlink /etc/resolv.conf:

    rm /etc/resolv.conf
    
  4. Restart NetworkManager:

    sudo systemctl restart NetworkManager
    
  5. Then you can create /etc/resolv.conf with your preferred DNS server specified in there.

  6. Finally, test and check if you are getting a better performance out if it.

0

I had similar problems in the past, with slow or even failing DNS lookups.

It turned out to be DNS problems most probably related to the "ADSL modem"-ISP combination, as some (but not all) DNS lookups were timing out.

So, the problems were not related to my Ubuntu OS (either 18.04 or 20.04); the remedy was to simply reboot my ADSL modem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .