I'm using 3G as my primary internet connection, and TCP over this thing is getting more puzzling every day. For example:
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 !
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.
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.
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 ??
Notes:
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.
Update:
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...