scp performance
Speed comparison between various ciphers supported by SSH. The
test measures the time to copy a file from the client to the
server using scp. This script was
used to run the tests. I used the linux source code as a test
file because it has a reasonable size (about ½ Gig) and can be
compressed.
Key findings:
-
Performance improved a lot over the last 3 years. I'm not
sure whether this is because of hardware or software
improvements. I'll have to repeat these measurements on old
hardware with new SSH versions some day.
-
In late 2013, only arcfour could saturate a gigabit lan.
In early 2017, all algorithms can. The AES variants are all close to 5 Gbit/s.
-
Chacha20 is much slower than AES, but only if you have faster h
-
Compression is always a bad idea on a gigabit LAN. It
It should be beneficial at speeds below ~ 300 Mbit/s
(with fast CPUs).
Client CPU | Intel(R) Xeon(R) CPU E5-2643 v3 @ 3.40GHz |
Client SSH | OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.1t 3 May 2016 |
Server CPU | Intel(R) Xeon(R) CPU E5-2643 v3 @ 3.40GHz |
Server SSH | SSH-2.0-OpenSSH_6.7p1 Debian-5+deb8u3 |
Network | loopback |
File | linux-4.9.11.tar (664MiB) |
Note | |
Cipher | Compression | Speed MiB/s | elapsed (min:s) |
aes192-ctr | | 552.5 | 00:01.2 |
aes256-gcm@openssh.com | | 551.7 | 00:01.2 |
aes128-gcm@openssh.com | | 536.1 | 00:01.2 |
aes128-ctr | | 509.6 | 00:01.3 |
| | 497.0 | 00:01.3 |
aes256-ctr | | 488.2 | 00:01.4 |
chacha20-poly1305@openssh.com | | 209.7 | 00:03.2 |
aes128-ctr | -C | 35.5 | 00:18.7 |
aes192-ctr | -C | 35.4 | 00:18.7 |
aes256-ctr | -C | 35.2 | 00:18.8 |
aes128-gcm@openssh.com | -C | 35.2 | 00:18.9 |
| -C | 34.9 | 00:19.0 |
aes256-gcm@openssh.com | -C | 34.7 | 00:19.1 |
chacha20-poly1305@openssh.com | -C | 33.9 | 00:19.6 |
Client CPU | Intel(R) Xeon(R) CPU E5-2643 v3 @ 3.40GHz |
Client SSH | OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.1t 3 May 2016 |
Server CPU | Intel(R) Xeon(R) CPU E5-2643 v3 @ 3.40GHz |
Server SSH | SSH-2.0-OpenSSH_6.7p1 Debian-5+deb8u3 |
Network | 1 Gbit/s LAN |
File | linux-4.9.11.tar (664MiB) |
Note | |
Cipher | Compression | Speed MiB/s | elapsed (min:s) |
aes256-ctr | | 109.5 | 00:06.1 |
aes128-ctr | | 109.5 | 00:06.1 |
| | 109.5 | 00:06.1 |
aes192-ctr | | 109.5 | 00:06.1 |
aes128-gcm@openssh.com | | 109.4 | 00:06.1 |
chacha20-poly1305@openssh.com | | 109.3 | 00:06.1 |
aes256-gcm@openssh.com | | 109.3 | 00:06.1 |
aes128-gcm@openssh.com | -C | 36.5 | 00:18.2 |
aes256-gcm@openssh.com | -C | 36.4 | 00:18.2 |
aes128-ctr | -C | 36.4 | 00:18.2 |
aes256-ctr | -C | 36.4 | 00:18.2 |
| -C | 36.0 | 00:18.5 |
aes192-ctr | -C | 35.9 | 00:18.5 |
chacha20-poly1305@openssh.com | -C | 35.6 | 00:18.7 |
Client CPU | Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz |
Client SSH | OpenSSH_6.0p1 Debian-4, OpenSSL 1.0.1e 11 Feb 2013 (32 bit) |
Server CPU | Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz |
Server SSH | SSH-2.0-OpenSSH_6.0p1 Debian-4 (32 bit) |
Network | WAN connection. Uplink limited to 24 Mbit/s at the client side with traffic shaping. 25/5 Mbit/s cable on server side. |
File | linux-3.12.tar (519 MiB) |
Note | |
Cipher | Compression | Speed MiB/s | elapsed (min:s) |
aes256-ctr | -C | 9.8 | 00:52.8 |
aes192-cbc | -C | 9.8 | 00:53.0 |
arcfour128 | -C | 9.5 | 00:54.6 |
aes256-cbc | -C | 9.5 | 00:54.7 |
aes128-ctr | -C | 9.5 | 00:54.8 |
arcfour256 | -C | 9.2 | 00:56.4 |
| -C | 9.1 | 00:56.8 |
aes192-ctr | -C | 9.0 | 00:57.4 |
cast128-cbc | -C | 8.7 | 00:59.6 |
3des-cbc | -C | 8.4 | 01:02.1 |
arcfour | -C | 8.2 | 01:03.1 |
blowfish-cbc | -C | 7.5 | 01:09.3 |
aes128-cbc | -C | 7.1 | 01:12.9 |
aes128-cbc | | 2.1 | 04:04.3 |
aes192-cbc | | 2.1 | 04:05.1 |
aes256-cbc | | 2.1 | 04:07.7 |
aes128-ctr | | 2.1 | 04:09.9 |
3des-cbc | | 2.0 | 04:18.7 |
arcfour256 | | 1.9 | 04:26.4 |
| | 1.9 | 04:30.7 |
arcfour128 | | 1.9 | 04:31.8 |
arcfour | | 1.9 | 04:40.3 |
cast128-cbc | | 1.8 | 04:47.7 |
aes192-ctr | | 1.8 | 04:49.0 |
aes256-ctr | | 1.8 | 04:50.3 |
blowfish-cbc | | 1.8 | 04:54.9 |
Client CPU | Intel Atom E6xx [Genuine Intel(R) CPU @ 1.60GHz] |
Client SSH | OpenSSH_6.0p1 Debian-4, OpenSSL 1.0.1e 11 Feb 2013 (32 bit) |
Server CPU | Intel Atom E6xx [Genuine Intel(R) CPU @ 1.60GHz] |
Server SSH | SSH-2.0-OpenSSH_6.0p1 Debian-4 (32 bit) |
Network | 1 Gbit/s directly connected |
File | linux-3.12.tar (519 MiB) |
Note | |
Cipher | Compression | Speed MiB/s | elapsed (min:s) |
arcfour256 | | 34.0 | 00:15.2 |
arcfour128 | | 34.0 | 00:15.2 |
arcfour | | 33.8 | 00:15.3 |
blowfish-cbc | | 20.8 | 00:24.9 |
cast128-cbc | | 14.5 | 00:35.7 |
aes128-cbc | | 11.0 | 00:47.4 |
aes192-cbc | | 9.5 | 00:54.4 |
aes128-ctr | | 9.3 | 00:55.6 |
| | 9.3 | 00:55.8 |
aes256-cbc | | 8.3 | 01:02.3 |
aes192-ctr | | 8.1 | 01:03.9 |
aes256-ctr | | 7.2 | 01:12.0 |
3des-cbc | | 6.2 | 01:23.8 |
arcfour | -C | 4.6 | 01:53.3 |
arcfour256 | -C | 4.6 | 01:53.5 |
arcfour128 | -C | 4.6 | 01:53.5 |
blowfish-cbc | -C | 4.5 | 01:56.3 |
cast128-cbc | -C | 4.4 | 01:58.1 |
aes128-cbc | -C | 4.4 | 01:58.5 |
aes192-cbc | -C | 4.4 | 01:58.5 |
aes256-cbc | -C | 4.3 | 02:00.4 |
aes192-ctr | -C | 4.2 | 02:02.5 |
| -C | 4.2 | 02:02.8 |
aes128-ctr | -C | 4.2 | 02:03.0 |
aes256-ctr | -C | 4.1 | 02:05.1 |
3des-cbc | -C | 4.0 | 02:09.2 |
Client CPU | Intel(R) Xeon(R) CPU E5520 @ 2.27GHz |
Client SSH | OpenSSH_5.5p1 Debian-6+squeeze3, OpenSSL 0.9.8o 01 Jun 2010 (64 bit) |
Server CPU | Intel(R) Xeon(R) CPU E5530 @ 2.40GHz |
Server SSH | SSH-2.0-OpenSSH_6.0p1 Debian-4 (64 bit) |
Network | 1 Gbit/s LAN |
File | linux-3.12.tar (519 MiB) |
Note | |
Cipher | Compression | Speed MiB/s | elapsed (min:s) |
arcfour | | 94.0 | 00:05.5 |
arcfour256 | | 85.3 | 00:06.1 |
aes128-cbc | | 83.8 | 00:06.2 |
arcfour128 | | 82.3 | 00:06.3 |
aes192-cbc | | 77.1 | 00:06.7 |
aes256-cbc | | 71.4 | 00:07.3 |
blowfish-cbc | | 55.1 | 00:09.4 |
aes128-ctr | | 52.9 | 00:09.8 |
| | 52.4 | 00:09.9 |
cast128-cbc | | 51.1 | 00:10.1 |
aes192-ctr | | 46.9 | 00:11.1 |
aes256-ctr | | 41.5 | 00:12.5 |
arcfour128 | -C | 19.9 | 00:26.1 |
arcfour | -C | 19.8 | 00:26.2 |
| -C | 19.8 | 00:26.2 |
aes192-ctr | -C | 19.8 | 00:26.3 |
aes256-cbc | -C | 19.7 | 00:26.3 |
aes128-cbc | -C | 19.4 | 00:26.8 |
aes192-cbc | -C | 19.2 | 00:27.0 |
blowfish-cbc | -C | 19.2 | 00:27.0 |
aes128-ctr | -C | 18.8 | 00:27.6 |
cast128-cbc | -C | 18.7 | 00:27.7 |
aes256-ctr | -C | 18.6 | 00:27.8 |
arcfour256 | -C | 17.5 | 00:29.7 |
3des-cbc | | 17.3 | 00:30.0 |
3des-cbc | -C | 16.4 | 00:31.7 |
Client CPU | Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz |
Client SSH | OpenSSH_6.0p1 Debian-4, OpenSSL 1.0.1e 11 Feb 2013 (32 bit) |
Server CPU | Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz |
Server SSH | SSH-2.0-OpenSSH_6.0p1 Debian-4 |
Network | loopback |
File | linux-3.12.tar (519 MiB) |
Note | |
Cipher | Compression | Speed MiB/s | elapsed (min:s) |
arcfour128 | | 140.3 | 00:03.7 |
arcfour | | 139.0 | 00:03.7 |
arcfour256 | | 137.4 | 00:03.8 |
aes128-cbc | | 98.4 | 00:05.3 |
aes192-cbc | | 90.7 | 00:05.7 |
aes256-cbc | | 79.9 | 00:06.5 |
blowfish-cbc | | 69.9 | 00:07.4 |
| | 56.4 | 00:09.2 |
aes128-ctr | | 55.6 | 00:09.3 |
cast128-cbc | | 54.0 | 00:09.6 |
aes192-ctr | | 50.7 | 00:10.2 |
aes256-ctr | | 45.9 | 00:11.3 |
3des-cbc | | 21.5 | 00:24.2 |
arcfour128 | -C | 17.4 | 00:29.8 |
arcfour | -C | 17.3 | 00:30.0 |
arcfour256 | -C | 17.3 | 00:30.0 |
aes128-cbc | -C | 17.1 | 00:30.4 |
aes192-cbc | -C | 17.0 | 00:30.6 |
aes256-cbc | -C | 16.9 | 00:30.7 |
blowfish-cbc | -C | 16.5 | 00:31.4 |
| -C | 16.2 | 00:32.1 |
aes128-ctr | -C | 16.1 | 00:32.1 |
cast128-cbc | -C | 16.1 | 00:32.3 |
aes192-ctr | -C | 15.8 | 00:32.8 |
aes256-ctr | -C | 15.7 | 00:33.1 |
3des-cbc | -C | 13.5 | 00:38.5 |
The following results were obtained by hand or with a shell script.
They may not be directly comparable to the results above.
Client | Intel(R) Xeon(R) CPU E5520 @ 2.27GHz (VMware guest) |
Server | Intel(R) Xeon(R) CPU E5520 @ 2.27GHz (VMware guest) |
File | 5144 MiB gzipped mysql dump |
Note | The client was busy at the time, YMMV |
Cipher | Speed (MB/s) | elapsed (m:s) |
arcfour128 | 41.5 | 02:04 |
aes128-cbc | 34.3 | 02:30 |
blowfish-cbc | 30.3 | 02:50 |
default (aes128-ctr?) | 26.8 | 03:12 |
Client | Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz |
Server | Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz (VMware guest) |
File | 512 MiB 0 filled |
Cipher | Speed (MB/s) | elapsed (m:s) |
aes128-cbc | 73.1 | 00:07 |
arcfour128 | 56.9 | 00:09 |
arcfour | 56.9 | 00:09 |
aes256-cbc | 56.9 | 00:09 |
aes192-cbc | 51.2 | 00:10 |
blowfish-cbc | 46.6 | 00:11 |
arcfour256 | 46.6 | 00:11 |
aes128-ctr | 39.4 | 00:13 |
aes192-ctr | 36.6 | 00:14 |
cast128-cbc | 34.1 | 00:15 |
aes256-ctr | 32.0 | 00:16 |
3des-cbc | 14.6 | 00:35 |