I was playing around and noticed that secure-copying with compression takes longer than without compression

time scp -C ./test.sql user@vmware:/home/user

real    0m42.758s
user    0m40.455s
sys     0m2.159s


time scp ./test.sql user@vmware:/home/user

real    0m11.117s
user    0m2.827s
sys     0m2.157s

What could be the cause of this behaviour?

1 Answer 1


Compression and decompression take time, so it's a trade off. If you have a slow network connection, it's worth taking the time for compression. If you have a 1Gbps connection between two nodes, you're probably going to lose more time to compression than you'll gain from transferring less data.

  • I would add : the 'vmware' server name let me think he's on a local virtualized machine. I don't know precisely how network hardware is involved and limited, but what is certain is that if you scp to a local virtual machine, you should have a really, really good transfer rate... ;) Oct 30, 2014 at 17:31
  • @Pierre-OlivierVares you are right, that is a virtual machine. I explicitly specified that :)
    – V G
    Oct 31, 2014 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.