Why is my connection via ssh tunneling much slower than other connections to a remote machine?

5

I rented a small Linux box with an intention to use it as a proxy for netflix etc.

When I ssh and run wget my speeds are like 20Mb/s but when I connect with putty and go to speedtest I only get like 1Mbit down and 300kbit up.


Processor information

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 44
model name      : Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz
stepping        : 2
cpu MHz         : 2400.085
cache size      : 12288 KB
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc ida nonstop_tsc arat pni ssse3 cx16 sse4_1 sse4_2 popcnt lahf_lm
bogomips        : 4800.17
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: [8]

mexima

Posted 2011-05-22T17:06:16.943

Reputation: 51

Tell us more about the Windows box you're using, and the network between you the rented linux box (bandwidth, latency). – Phil – 2011-05-23T15:53:30.947

Answers

5

When you ssh into the box, you are making a connection between your computer and the server; it's like you are sitting in front of the server looking at a terminal. When you run wget, the server uses its internet connection to download the file, not your home internet connection. Hopefully this graphic will help:

A SSH connection: home ===> through your ISP ===> linux box's ISP ===> linux box

A wget: linux box (just received a command to wget) ===> linux box's ISP ===> download server

This means that the connection between the linux box and its ISP is 20 MB/s. Your internet connection is slower at 1Mbit. (Also realize that 1Mbit/s is not the same at 1 Mbyte/s; Mb = megabit, MB = megabyte)

evan.bovie

Posted 2011-05-22T17:06:16.943

Reputation: 2 758

i know that. i have a 10Mbit connection but i only get 1Mbit via SSH tunneling. I know i cannot get a 20MB/s but i should get 1MB/s – mexima – 2011-05-22T17:33:57.593

Run a speedtest on your home computer without the tunnel. What's your upload speed? Also, what's the upload speed of the server? – evan.bovie – 2011-05-22T17:40:24.117

im getting a 712kbit upload on my connection to internet, and and after testing my server is sending files to me via ftp at 400-500 KB/s – mexima – 2011-05-22T21:01:15.600

@mexima Hmm... What processor does the linux box have? – evan.bovie – 2011-05-22T22:37:14.920

1

If you're using Windows XP and if the linux box is a long way away, in network terms, you might need to use TCP window scaling.

In brief, there's a limit to the transfer rate achievable with basic TCP connections. This was recognised as a problem and addressed in 1992 in RFC 1323, which introduced TCP Window Scaling. Supported since Windows 2000, it wasn't enabled by default until Windows Vista, so in older versions of Windows you need to turn it on manually.

Here's one of many sites which explain how: http://www.psc.edu/networking/projects/tcptune/OStune/winxp/winxp_stepbystep.html

Phil

Posted 2011-05-22T17:06:16.943

Reputation: 525

i have win7 64bit code Packets: Sent = 10, Received = 10, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 194ms, Maximum = 197ms, Average = 195ms – mexima – 2011-05-23T17:26:49.640