I'm using 3G as my primary internet connection, and TCP over this thing is getting more puzzling every day. For example:

  1. Downloading from kernel.org is crazy fast:

    $wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.6.8.tar.bz2

    increases to ~500kB/s after a few secs !

  2. Some servers are incredibly slow, for instance www.graphic-pc.com:
    Same thing, downloading a big file with wget it starts at ~30kB/s for a split second, then collapses to 5-10k or even worse.

  3. Web browsing is decent but somewhat unreliable. Randomly, a page will take really long to load or even fail to load, but a reload can succeed almost immediately.

  4. Now, by chance i started playing with OpenVPN over UDP on top of the 3G connection, and OMG suddenly everything's extremely fast !
    Same www.graphic-pc.com now shoots at 100-200kB/s !

  • What's going on here ???
  • How come it is so much better with the VPN than without ??
  • And why does graphic-pc.com crawl when kernel.org flies ?
    Something to do with my tcp stack (or the server), or some buggy router in between ??


Setup is laptop running Ubuntu Lucid and a Huawei 3G dongle (So direct pppd connection).

I can reproduce this pretty much any time during the day and I'm not moving, so it's clearly not cell environment or internet congestion. (although kernel.org without VPN sometimes does worse in the evening, 60kB or so - but still 500kB with VPN !)

For 2) wireshark shows retransmitted packets, dup ack's, even out of order sometimes.

I've tried playing with different /proc/sys/net/ipv4 parameters (tcp_rmem, window_scaling, tcp_congestion...) doesn't seem to make a difference.

Tried under windows 7 (no VPN) with some interesting results:

tcp settings  :  default          tcp_optimizer
kernel.org    :  10 kB/s          20 kB/s
graphic-pc.com:   8 kB/s          70 kB/s !

tcp_optimizer turned on ctcp among other things. Have to check what os graphic-pc.com is running, my bet is linux's tcp_westwood and ms ctcp don't mix well here...

  • The nature of 3G it is going to variable. – t1nt1n Dec 4 '12 at 20:04
  • Plus, 3G is a high-latency transport, which doesn't lend itself to certain types of traffic (e.g.: chatty protocols, like SQLNet). Not that any of your examples are SQLNet, just making a point that it performs differently with some applications. – Simon Catlin Dec 4 '12 at 21:15
  • "wireshark shows retransmitted packets, dup ack's, even out of order sometimes" - When, over the VPN or not, or both? Do you experience this behaviour for all traffic or just HTTP/S? I.e. as previously suggested by silencedhaven your ISP can no longer tell what you are up to. I used to get throttled on my ASDL connection down to <2Mbps but that should still be plenty for gaming, but it wasn't I would have terrible latency and packet loss. I started playing over a PPTP and my latency was better and gaming was possibly again. Can you transfeer a file for example on a non-standard port? – jwbensley Dec 4 '12 at 22:31
  • Perhaps try FTP over a random high port, with and without the VPN, and again with SSH/SFTP with and without the VPN on a random high port, and report the results back here. – jwbensley Dec 4 '12 at 22:32
  • @javano: wireshark dup's etc is for graphic-pc.com without VPN (haven't tried wireshark with the VPN as it's quite healthy). I'll do some testing with other ports, ftp is good candidate. – lemonsqueeze Dec 4 '12 at 22:44

Problem solved:
Tested with another file type (.zip) on graphic-pc.com. Guess what, at the same time it's fast for this file and slow for the other one (which btw is .mp3). So that's clearly the ISP doing deep packet inspection and throttling.

As for the strange results under windows, i tested again today and now it's exactly the same as linux. Also, the throttling is dynamic and changes during the day. I guess i was really unlucky and both rebooted and ran tcp_optimizer right when the throttling changed ...

Still curious about the real impact of 3G on TCP performance as there's a number of papers on the subject, but as far as this is concerned it's just traffic shaping crap, nothing wrong with 3G !


First off, 3G/4G connections are not designed to be your primary connections to the internet and they are subject to throttling, if the traffic is flowing thru them matches a certain pattern, or you exceed a un-spoken limit amount of traffic. Don't believe your carrier (even those data-only unlimited touting outfits) when they say you have no limits.

After all it is air time and the air bandwidth is subpar to that of fiber and copper. When they have traffic congestion, they will have no other option but throttle traffic from the end nodes.

The graphic-pc site you mentioned is a very flash (or similar) heavy site and takes up about 60 seconds on my OC-3 connected work internet. So, having a low measuring rates accessing this site over a standard 3G is not a big surprise. Kernel.org is faster you say. Considering the text based nature of this site, I am sure the traffic can be compressed and uncompressed on the fly with your 3G connection at very good success rates, where as this is not a possibility with image/flash/music/etc heavy websites.

Last but not the least, more you want to cram into your pipe, i.e., your 3G connection, less favorable customer you will be, to you ISP and they will throttle you no matter what. And if you read your TOS, you will see that they have a legal right to do so, under reasonable use (which is not 24/7 non-stop connection)

When you go thru a VPN connection, you are encrypting all your network traffic. So your ISP, is no longer able to inspect your packets, hence, can not tell a text page request from a flash page request. So, you circumvented their deep packet inspection to a certain extent. But having a VPN has its own speed penalty, as you will have to encrypt every packet leaving your connection, which comes at a cost. But in your case this cost sounds like minimal or negligible.

Hope this explains it a bit

  • Sorry, but this doesn't explain what's happening here. – lemonsqueeze Dec 4 '12 at 22:05
  • For the 2 sites mentioned i'm looking at bulk download rates, downloading one big file with wget, not opening the site in a browser. I did some tests under windows and graphic-pc.com's speed is different there (posted update). If it was throttling from the ISP side it would stay the same. – lemonsqueeze Dec 4 '12 at 22:33
  • who is your 3G provider ? Are you using one of those 3G only ISPs or just tethering your cell phone from one of the major wireles phone service providers ? – MelBurslan Dec 4 '12 at 23:35
  • Actually you were right, it is throttling indeed ! – lemonsqueeze Dec 5 '12 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.