Very slow internet connection on ubuntu 16.04

This problem was present with 14.10, 15.04, and 15.10, I simply haven't been able to fix it.

I'm using Chrome 50 as a browser. I've changed the hosts: files dns line in nsswitch.conf file, and tried other suggested fixes.

My friend with MacOS does not experience the same slowness.

Here is some Laptop info. I'm on a Dell XPS 13 with i3 processor, and I can gladly show more if needed.

02:00.0 Network controller [0280]: Intel Corporation Wireless 7260 [8086:08b1] (rev 6b)
    Subsystem: Intel Corporation Dual Band Wireless-AC 7260 [8086:c470]
    Kernel driver in use: iwlwifi
    Kernel modules: iwlwifi

Thanks in advance!

Edit: some output of sudo lshw

*-network
    description: Wireless interface
    product: Wireless 7260
    vendor: Intel Corporation
    physical id: 0
    bus info: pci@0000:02:00.0
    logical name: wlan0
    version: 6b
    serial: 5c:51:4f:7c:2a:db
    width: 64 bits
    clock: 33MHz
    capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
    configuration: broadcast=yes driver=iwlwifi driverversion=4.4.0-21-generic firmware=16.242414.0 ip=192.168.0.104 latency=0 link=yes multicast=yes wireless=IEEE 802.11abgn
    resources: irq:46 memory:f0400000-f0401fff

I had a similar issue with my system preferring IPv6 over IPv4. To change to preferring IPv4 over IPv6.

Open a terminal

sudo nano /etc/gai.conf

Locate #precedence ::ffff:0:0/96 100 and and remove the #.

You may have to reboot. Should notice the difference quickly


Update: In my case, my answer is not valid. The issue later returned. Dell later admitted an ongoing issue with the hardware running on Ubuntu and sent a tech to install a different Wireless card.


This resolved wireless issues for me (commands were provided by Dell Support):

sudo mkdir -p /lib/firmware/ath10k/QCA6174/hw3.0/
sudo wget -O /lib/firmware/ath10k/QCA6174/hw3.0/board.bin https://github.com/FireWalkerX/ath10k-firmware/blob/7e56cbb94182a2fdab110cf5bfeded8fd1d44d30/QCA6174/hw3.0/board-2.bin?raw=true
sudo wget -O /lib/firmware/ath10k/QCA6174/hw3.0/firmware-4.bin https://github.com/FireWalkerX/ath10k-firmware/blob/7e56cbb94182a2fdab110cf5bfeded8fd1d44d30/QCA6174/hw3.0/firmware-4.bin_WLAN.RM.2.0-00180-QCARMSWPZ-1?raw=true
sudo chmod +x /lib/firmware/ath10k/QCA6174/hw3.0/*

Edit: For me, the issue was that the driver was looking for files that didn't exist. Presumably caused by running Ubuntu updates after setting up the machine.