Why is scp taking so long?

Why is scp taking so long?

Another reason that scp is slower than it should be, especially on high bandwidth networks, is that it has statically defined internal flow control buffers which end up becoming network performance bottlenecks. HPN-SSH is a patched version of OpenSSH which increases the size of these buffers.

How long does it take to scp?

It takes about 25 minutes to send 500 Mb of data to another computer. The average speed is at about 600 KB/s.

Does scp use compression?

Recent implementations of SSH and SCP allow to employ compression for data transfer. The idea is to reduce the amount of data the compression algorithm has to process and thus to improve overall throughput.

Why do I have to wait before compression in SCP?

A reason behind that is, that before each file transfer, there’s an interactive communication between the SCP server and the client (for exchanging file metadata, like timestamp and permissions). So both sides have to wait a bit for the other side to respond (compression won’t help while waiting).

How to make SCP transfer files more efficiently?

To transfer files more efficiently, bundle them together with tar, then transfer the tarball: Whether to compress or not depends on the file contents, eg. if they’re JPEGs or PNGs, compression won’t have any effect.

Why does gzip compression slow down a SSH connection?

When you transfer a single zipped file, that communication happens only once. It enables the gzip compression in ssh (under the scp). On slow connections this will speed things up, on any reasonably fast connection ( 100Mbit or faster) the compression is very likely to slow things down.

Why is SCP so slow compared to rsync?

Actually the same 250kb/s with rsync – at least with the port specifier rclone -Avvp cap_* -e “ssh -p 1087 -i id_rsa” user@host:~/dir The scp protocol is outdated, inflexible and not readily fixed. Its authors recommend the use of more modern protocols like sftp and rsync for file transfer instead