Menu

Say No to scp

Why you should avoid scp over a WAN

October 28, 2024

In a Unix environment scp, sftp, and rsync are commonly used to copy data between hosts. While these tools work fine in a local environment, they perform poorly on a WAN. The openssh versions of scp and sftp have a built in 2 MB buffer that severely limits performance on a WAN. Even though rsync is not part of the openssh distribution, rsync typically uses ssh as transport and is therefore subject to the limitations imposed by the underlying ssh implementation. DO NOT USE THESE TOOLS if you need to transfer large data sets across a network path with a RTT 10ms or greater.

The following results are typical for a cross continent path: scp is more than 100x slower than single stream http, and parallel stream tools like Globus are faster yet.

Sample Results; RTT = 88 ms, network capacity = 100Gbps.

Tool Throughput
scp/sftp 32 Mbps
hpnscp 4.5 Gbps
HTTP (e.g.:curl, wget, etc.) 5.2 Gbps
Globus, 4 streams 9.5 Gbps (disk limited)

If your workflow requires the use of rsync, scp, or sftp, then the hpn-ssh package from PSC will provide much better performance under most circumstances. Its now very easy to install using apt or dnf from the PSC repo, and is a drop-in replacement for scp.

 


Contact fasterdata@es.net if you have updates or corrections for information on fasterdata.