Re: Compression with ssh tunneling
- From: comphelp@xxxxxxxxx (Todd H.)
- Date: 10 May 2007 00:48:59 -0500
David Gempton <davidg@ttc4it_dot_co_dot_nz> writes:
Has anyone done compression testing with ssh tunnels ?
I was looking at it the other day and it looked like the compression
options have no effect when you try and use them on a tunnel.
Here was the test:
# ssh -L222:localhost:22 root@server
How fast is the link to the server?
Then with this tunnel in place I used scp to transfer a file
# scp -P222 root@localhost:/tmp/file1 .
Another factor that'll skew results: what's in the file, and what's
the entropy of it? This will determine how compressible that data
stream is likely to be.
To normalize that out, create a 10 megabyte file of nothing but 0's
and repeat the test.
dd if=/dev/zero of=/tmp/blah bs=512 count=20480
Then use /tmp/blah as the file to transfer. If compression is working
it should go very quickly, non compressed should go quite slowly.
Over a relatively slow lin kthat is.
If I put the compression on the scp command instead of the tunnel
there was a major speed increase.
That's a useful datapoint.
Is this likely to be because the binary network traffic generated by
scp is not very compressable or is it that compression on tunnels does
not work ??
Not sure. Another way to test is to use netcat on the tunnel, to
eliminate scp's functionality from the equation.
On the remote host, set up a listener
remote$ nc -l -p YY > /tmp/blahfoo
(where YY is a port other than 22 lest ya kill sshd first)
Then, with the tunnel from local 222 to remote YY
local$ cat /tmp/blah | nc 127.0.0.1 222
When you see remote /tmp/blahfoo hit 10MB, stop the timer. Hit Ctrl-c
on local as well to kill the nc client connection
Compare this with and without using the tunnel and you'll have another
useful datapoint.
I also did some tests with using VNC over a tunnel and also found that
there was no visible speed increase when compression was used on the
tunnel.
VNC has various compression algorithms it supports as well that'd skew
the reliability of using it as a known test.
--
Todd H.
http://www.toddh.net/
.
- Follow-Ups:
- Re: Compression with ssh tunneling
- From: David Gempton
- Re: Compression with ssh tunneling
- References:
- Compression with ssh tunneling
- From: David Gempton
- Compression with ssh tunneling
- Prev by Date: Compression with ssh tunneling
- Next by Date: Read from remote host web01.sti.local: Connection reset by peer
- Previous by thread: Compression with ssh tunneling
- Next by thread: Re: Compression with ssh tunneling
- Index(es):
Relevant Pages
|
|