Rsync faster with AES-NI and ssh options
Copying files per ssh is very convenient, but the default encryption(1) usually takes its toll on the CPU, and the result is that you do not fill the available network bandwidth. The solution is to use a less CPU intensive cipher, which often leads to using a less secure encryption scheme. On a local network this is rarely an issue.
Earlier I was often using blowfish or arc4 as preferred ciphers, but in newer Linux distros (i.e Ubuntu 16.04LTS) these are no longer supported. Nowadays there are some default ciphers that are supported using hardware accelerated AES-NI instructions, helping to offload the ciphering in the CPU. firstname.lastname@example.org and email@example.com is such ciphers.
- Quick and easy
cd /path/to/your/files time rsync -av --delete -e "ssh -T -o Compression=no -x -c firstname.lastname@example.org" . email@example.com:/mnt/remote_filesystem time rsync -av --delete -e "ssh -T -o Compression=no -x -c firstname.lastname@example.org" . email@example.com:/mnt/remote_filesystem
On a 1gbit connection, I often see >110MB/s with the command line above.
- man ssh_config => Default ciphers
maglub@myserver:~$ ssh -Q cipher 3des-cbc blowfish-cbc cast128-cbc arcfour arcfour128 arcfour256 aes128-cbc aes192-cbc aes256-cbc firstname.lastname@example.org aes128-ctr aes192-ctr aes256-ctr email@example.com firstname.lastname@example.org email@example.com