[lug] ssh compression

Peter Hutnick peter-lists at hutnick.com
Wed May 1 10:21:23 MDT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 01 May 2002 10:04 am, Hugh Brown wrote:
> I am doing an over the net backup of a mail server over an ssh tunnel.
> The bandwidth that it is consuming is killing me.  Is there any way to
> throttle it down?  Would using the compression option in ssh help me or
> hurt me (the man page says it would slow it down, but I don't know if
> that means less bandwidth, longer download or same bandwidth, longer
> download).

Sure, use compression (ssh -C or scp -C).

If I read you correctly, your main gripe seems to be that the transfer hogs 
the entire connection.  I have wished for a long time that there was a 
"netnice" command, so I could do things like "netnice -n 19 scp -C 
someuser at somehost:~/somefile ."

What there is, however, is Wonder Shaper (http://lartc.org/wondershaper/) 
which does some black magic to your networking so that file transfers don't 
drown out web surfing or ssh sessions.

But what you /really/ ought to do is use rsync, and use ssh -C as your 
transport.  rsync is practically made for mailspools.

To summarize what rsync does, it treats all files as binary, breaks them into 
chunks, does a hash against each chunk on both ends of the connection, then 
sends chunks that are different.  So, instead of sending that entire 10M 
mailspool each time you back up, it sends the last five 10k chunks to cover 
the 47k of new mail.  Nice.

I use it for disk to disk backups as well.

Check it out at http://rsync.samba.org/.

- -Peter

- -- 
/"\ ASCII Ribbon campaign against HTML e-mail
\ /
 X   Get my PGP key at http://hutnick.com/pgp
/ \  6128 5651 6F23 EC17 6EBD  737D 960A 20E6 76CA 8A59
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE80BYDlgog5nbKilkRAkczAJ95BjLepqhtvbuZw1JIFjtOSPK7oQCffEpw
MUpKihSOxGSzZlF79FjHwDc=
=xIVW
-----END PGP SIGNATURE-----




More information about the LUG mailing list