[Repost from my old blog]
When copying some large files between hosts at our rack I noticed some pretty poor transfer speeds. Having recently forked out $70 for a rackmount gigabit switch I wondered what was slowing things.
It seems ssh was trying to help out by compressing everything however compressing the data took more than twice as long as transferring the uncompressed data. I proved this by disabling compression at the commandline and seeing the transfer speed more than triple.
1 2 3 4 5
So how can we put this into practice everywhere?
Setting ‘Compression no’ in /etc/ssh/ssh_config will do the trick for me. There’s no need for my vmware hosts to be compressing files I copy between them. I do want compression when copying files over shared/slower links but I can achieve that by initiating connections that benefit from compression on boxes that are configured to use it.
If I want to enable compression I can always use the ‘-C’ switch to enable compression.