You are on page 1of 2

Speed up scp file transfer

20/05/2008
Syed Atif Ali

Whats the fastest encryption to transfer files with SCP ?

Description :
Many times it is required to transfer files across machines on the same network , all machines
being on the same network and behind proxy its useless to transfer them with an encryption
which is more CPU intensive than other and also slower than others.
There can be other methods to transfer files of course , ftp , sftp , rsync, but this document is just
about scp command.

Objective :
To find out what is the faster cypher to define in scp command to transfer files on an internal
local network.

Environment :
Two Linux machines, with same openssh versions.
Connected on a 100 Mbps LAN . Both being idle nothing is running on them at the moment .
Before each test files will be cached on the file system buffer , so the tests are not affected with
cache.

Tests :
Copy 1000 small, medium , large files across the network using different cyphers in scp
command and measure their real time.

These are the file sizes :


Small : 10K
Medium: 100K
Large: 1000K

Results:

Times are in seconds and they reflect time taken to transfer 1000 fies.

size aes128- 3des-cbc blowfish- cast128- arcfour aes192- aes256-


cbc cbc cbc cbc cbc
10K 8.758 9.041 8.725 8.740 8.051 8.760 8.934
100K 47.540 44.172 46.174 48.279 46.103 46.458 47.116
1000K 1311.878 340.359 118.553 120.532 116.352 127.579 124.799

Overall arcfour performed better than any other cypher used. It is safe to say that arcfour can be
used to transfer files using scp on an internal network.
You can define which cypher to use by -c option of scp .

scp -c arcfour filename.txt host:/path/filename


Graphs :

small :
arcfour appears to be the fastest cypher to
use if the size of the file is really small

Medium:
Here 3des-cbc performed better than
arcfour which stands second in terms of speed .

Large:
Again arcfour the most efficient in terms of
speed than all other cyphers , aes128-cbc and
3des-cbc are comparatively slower .

You might also like