HideMyAss VPN

Tuesday, April 30, 2013

How to Check and improve your internet connection speed

With Pro VPN the speeds of your internet connection should usually not be much less than normally.
Of course this depends on several factors like server load, distance to server, speeds of your ISP, etc.
Should your speeds be lower than expected, there are several things you can try to max out your speed:
  • Change protocol (OpenVPN <> PPTP <> L2TP) and test again
  • Switch server (nearest does not necessarily mean fastest!)
  • Try using OpenVPN-UDP with our alternative clients - it's much faster than PPTP or usual OpenVPN. -> UDP
  • Tweak your network settings as explained below

Speedtest

To test your connection speed before and after tweaking anything, you can use e.g. 

Network tweaking

There are numerous ways to tweak your network-, TCP- and browser-settings.
All tools you will need are linked below.

Deactivate Halfopen-Limit (Windows)

First you should deactivate the limit for halfopen connections windows has. This archive (download) includes several tools for that: TCP-Z, Universal TCP/IP Patch, EvID (LvlLord Patch), TCP Patch.
Goal is to set the limit to 255 or deactivate it completely, depending on your operating system.

Network tweaking with TCP-Optimizer (Windows)

TCP-Optimizer is the best freeware tool for optimizing, tweaking and tuning network settings normal users don't have access to or know of.
It replaces all known Net-Tweak-Apps due its complexity. By using the presets (Windows Default, Current, Optimal, Custom) you can easily tweak all settings with one click.

Use the fastest DNS server (all operating systems)

With Tools like NameBench or browsermob-dns-perf you can test which is the fastest DNS server for you.
For most people it is Googles Public DNS (8.8.8.8 + 8.8.4.4) but they log your DNS queries.
There are others which are also fast and not from Google.


Tweaking MacOSX

Unfortunately MacOSX does not have as many possible tweaks and networking related settings as Windows does, but still there are some things you can try:

TCP tweaks
  • Start up a terminal window and run the following commands:
    sudo sysctl -w net.inet.tcp.rfc1323=1
    sudo sysctl -w kern.ipc.maxsockbuf=16777216
    sudo sysctl -w net.inet.tcp.sendspace=1048576
    sudo sysctl -w net.inet.tcp.recvspace=1048576

Apple broadband tuner:

Additional:
  • If you have a WLAN connection, change your routers channel and other WLAN related settings to see if you can get a better signal.
    Also, consider using a wired network setup instead of WLAN. It's more secure and always faster.
  • Temporarily disable your firewall to see if this has a significant effect on your connection performance. If it does, check your firewalls settings,
    remove unnecessary rules or consider using a different firewall software.

Tweaking Linux

Please note that any of the following suggested modifications may improve performance and stability as well as make it worse.
To know if a setting has a positive, negative or any effect at all, it's a good idea to keep doing speedtests before and after each change.

  • Modify TCP settings in sysctl.conf:
    Changing TCP settings on Linux is done by adding the corresponding lines at the end of the file /etc/sysctl.conf and then running "sysctl -p" to apply the changes.
    You should make a backup of the file (e.g. run "cp /etc/sysctl.conf /etc/sysctl.backup")

    net.core.rmem_max = 16777216
    net.core.wmem_max = 16777216
    net.ipv4.tcp_rmem = 4096 87380 16777216
    net.ipv4.tcp_wmem = 4096 65536 16777216
    net.ipv4.tcp_no_metrics_save = 1
    net.ipv4.tcp_congestion_control=htcp
  • To increase TCP throughput, run this (replace eth0 with your network device identifier if different, e.g. wlan0):
    ifconfig eth0 txqueuelen 1000

  • Disable auto-tuning to prevent unwanted behavior:
    sysctl -w net.ipv4.route.flush=1

  • Modify TCP congestion control
    The sysctl variable net.ipv4.tcp_congestion_control is set to "reno" by default. You can set it to one of the following options:   

    reno: Traditional TCP used by almost all other OSes. (default)   
    bic: BIC-TCP   
    highspeed: HighSpeed TCP: Sally Floyd's suggested algorithm   
    htcp: Hamilton TCP   
    hybla: For satellite links   
    scalable: Scalable TCP 
    vegas: TCP Vegas  
    westwood: optimized for lossy networks

    E.g. run this:
    sysctl -w net.ipv4.tcp_congestion_control=htcp

  • Disable segmentation offload, decreases performance but increases stability:
    ethtool -K eth0 tso off



Additional (all operating systems)

  • Always make sure you have the latest available device drivers for your computer; Router firmware, ethernet-adapter and motherboard drivers, BIOS update, etc.
    If you have a network device from realtek, click here. Otherwise check the website of your motherboard/network-device manufacturer.
    Updating your operating system is also a good idea; you should regularly check WindowsUpdate.
  • If you're using Firefox, check out the FasterFox add-on. It really improves surfing performance: FasterFox | FasterFox Extra | FasterFox Lite
  • For testing your speeds, try the speedtest from above, or download an test-file from qsc.de, or download a test torrent: Knoppix Torrent
  • For tweaking uTorrent Advanced Settings there are also several tutorials on this. None of them are perfect, you have to try each setting patiently until you're satisfied with the results. Checkout our article UTorrent for more Info.
  • Old routers, or even new router that are provided to you by your internet provider, are often using outdated firmware or are technically badly manufactured. This can make a difference of multiple megabits - consider getting a better router!

Unnecessary protocols and services (Windows)
On Windows, you should check the advanced settings of your network adapter in the Windows Network Center:
It often contains unnecessary protocols and services that are slowing down your internet connection without being useful in any way.
Disable, or better uninstall services like:
  • QoS Packet Scheduler
  • Virtualbox / VMware drivers, protocols and services
  • Link-Layer Topology
  • Bluetooth related

Basically you can uninstall everything except
  • Internet Protocol Version 4 (TCP/IPv4)
This is the only thing that's essential for the internet connection to work.
However, should you loose connectivity after changing anything here, you can just reboot your computer and reinstall the removed things again, one by one.

Links


If you have any other network and bandwidth specific tweaks, feel free to let us know :) -> wiki@hmastuff.com
We can also use reports on the results of your speed tweaking, so we know which tweaks to recommend.

1 comment: