5

EDIT: I have seen this problem elsewhere with an ADSL connection and not only USB modems or cell network.

I have my cell network USB modem attached and configured, running under Ubuntu 10.04 The connection is slow in general, although the data flow is good after a connection is established, the problem is it takes too long to actually establish the connections. IP lookups are done super fast so it's not likely the problem at all. I have tried ssh, skype and FTP. There is no problem with any of these.

The problem is mainly seen in HTTP connections, especially with sites with many resources that are gathered from multiple sources, eventually one or two of these resources (image, CSS or JS file) fail to load, the the browser keeps reporting "Waiting for example.com ..." for munites, freezing and keep waiting for this single resource to be loaded. I guess that here could be a clue. I tried browsers other than Firefox: Chrome and Opera and the problem is there as well!

What could be going behind the scenes? Any questions are welcome.

doc_id
  • 1,499
  • 2
  • 12
  • 17

4 Answers4

5

If other services than HTTP are running good for you, maybe your Internet Provider is using an overloaded reverse proxy to cache things and save bandwidth. You can try to connect to a remote HTTP server running on a non-standard (but the ISP can use a layer-7 fw to intercept your requests) or setup an openvpn server somewhere and tunnel all your traffic over it.

Giovanni Toraldo
  • 2,557
  • 18
  • 27
  • Yes they use a caching mechanism to deliver images, CSS and JS files compressed. And I don't like the compression because it's not nice to these content at all. Even sometimes websites with JavaScript does not work. – doc_id Oct 19 '11 at 04:44
  • Ok, this could be definitively the source of your problem, good luck! – Giovanni Toraldo Oct 19 '11 at 07:43
  • But this would also affect download speed, not just connection instantiation time I think? – doc_id Oct 19 '11 at 07:57
  • Your ISP can (and should) have a lot of available bandwidth, the slow HTTP connections establishment could be a consequence of an overloaded (or undersized) proxy server that serve HTTP requests. – Giovanni Toraldo Oct 19 '11 at 09:01
  • I really want to know if a VPN connection is faster than your ISP's proxy. That would [hilarious|horrible]. – Joseph Kern Oct 22 '11 at 05:24
  • @Joseph Kern I did not try that but I care about connection establishment time, not transfer speed. – doc_id Oct 23 '11 at 04:20
  • @rahmanisback ah. yes I was referring to the connection speed on the transfer speeds. Since you've marked this as your answer ... did you try to establish an http session on alternate port? – Joseph Kern Oct 24 '11 at 14:22
  • @Joseph Kern I'm sorry but I changed that operator and I do not remember. I wish I could help. – doc_id Oct 25 '11 at 05:50
4

Cell networks are likely to have high latencies, thus your packet round-trip-time is probably somewhere in the magnitude of up to one second. Just check that by issuing a ping to some internet host with a known constant latency, e.g.:

# ping www.gogle.de
PING www.l.google.com (74.125.79.99) 56(84) bytes of data.
64 bytes from ey-in-f99.1e100.net (74.125.79.99): icmp_seq=1 ttl=53 time=12.7 ms
64 bytes from ey-in-f99.1e100.net (74.125.79.99): icmp_seq=2 ttl=53 time=16.1 ms
64 bytes from ey-in-f99.1e100.net (74.125.79.99): icmp_seq=3 ttl=53 time=17.2 ms
^C
--- www.l.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 12.794/15.377/17.218/1.886 ms

TCP is able to adapt for high-latency networks due to its internal buffering and ability to send a fair amount of data without the need to receive immediate responses, so you might well see good throughput rates for bulk transfers with your connection. But high latency of course will greatly impact the performance of TCP handshakes (i.e. the connection initiation) and every "ping-pong-style" protocol where one side waits for the response of the other before doing any further processing (like HTTP with many small objects to fetch, even worse if they depend on each other like it would be the case with frames and iframes and included javascript files).

Edit: You should use something like Firebug to see what's happening in more detail. Or even run a Wireshark trace for protocol-level information. If you get data that is pointing to a problem with the ISP, you might want to complain to them. Apart from that, using a smaller MTU might be worth a try - some transmissions might suffer from MTU blackholes.

the-wabbit
  • 40,319
  • 13
  • 105
  • 169
  • Thanks. If this latency is expected as a cell network connection, then it's not reliable to anyone on earth to use. I supposed they are going to bill me much more than ADSL just for a reliable service, not just portable. – doc_id May 30 '11 at 23:53
  • As a sidenote: latency is not the same as reliability. So if some elements fail to load, you might experience packet losses as well. That's something that would be visible when issuing a "ping" as well. Just try and see. – the-wabbit May 31 '11 at 07:09
  • If I understood your comment correctly, I did not mean by "reliability" the content integrity. A service with poor connection switch is rather annoying. – doc_id Oct 15 '11 at 22:10
  • Cell networks are unreliable by design, but usually they are "good enough" to work with. Occasional packet losses do not hurt too much. If you are moving around (like in a train or in a car), you would see more problems than in stationary operation, but even then changing environmental conditions (rain, people running around in front of the antenna) could deteriorate the signal and result in packet losses. If you reliably see good transmission rates for large transfers over a longish time, your signal probably will be fine. – the-wabbit Oct 22 '11 at 11:44
3

You should investigate the DNS settings. If IP lookups are fast, then you are probably waiting for a response from a slow DNS server, or you are configured to poll multiple DNS servers and the first few are down/unresponsive. On Ubuntu you can edit the /etc/resolv.conf to temporarily change your DNS settings. First delete everything in the file and replace with this:

nameserver 8.8.8.8
nameserver 8.8.4.4

If your USB browsing situation improves, then the DNS configuration for the USB modem is what's causing you troubles.

Brad Soto
  • 61
  • 5
  • Looking at `/etc/resolv.conf` is certainly useful. I removed the file (which had settings that only made sense for desktop computers in the local network at our university but not for a mobile device) and now it's back to normal speed. – fuenfundachtzig Jan 04 '13 at 11:12
  • In order to fixate changes in /etc/resolv.conf, create a /etc/resolvconf/resolv.conf.d/tail and add them there. Then do `sudo service networking restart` and `sudo resolvconf -u`. – Oleg Abrazhaev Jun 12 '17 at 09:14
2

On cell networks it actually help to have a constant data stream flowing, such as an Internet radio stream, in the background to get a lower latency for all of your traffic. This has to do with how the cell network schedules packets. Use the network constantly and you get a better service.

Johan Nilsson
  • 348
  • 1
  • 6