Scrap the SCP. How to copy data fast using pigz and nc
intermediatesql.com
intermediatesql.com
nc -l 8888
Doesn't make any encryption, right?If the answer is yes, then why they are compared here? Anyone on public network might sniff what you are actually sending / receiving.
"tar/pigz/nc transfer is not secure
Finally, there is one advantage that scp still holds: its transfer is secure while pigz/nc transfers data in clear text. So, if you are using unsecured networks, this option is probably not for you."
tar -cf - /u02/databases/mydb/data_file-1.dbf | pigz | ssh user@destination "pigz -d | tar xf - -C /"
All those solutions ( from the OP ) are faster, but you will need some setup, before you could use it from one host remotely and in the end you might end up using good old SMB or NFS which will give you speed ( http://www.linuxquestions.org/questions/linux-networking-3/s... )
Have you also done any testing with ssh + gzip?
Also, as you note at the end, the security concerns are not trivial.
I guess the title should be a little more mild - scp isn't going away, or rsync via SSH for that matter.
At some point, the only way to copy data faster is to not copy it at all.
I wrote a blog post about it here: http://www.aktau.be/2014/10/23/pg-dump-and-pigz-easy-rsyncab...
http://www.psc.edu/index.php/hpn-ssh
It's able to consistently fill 1G ethernet links.
The main difference now it that hpn tweaks the tcp window to function better on high-latency links.
> It's able to consistently fill 1G ethernet links.
Between two stock Debian sid laptops:
dd if=/dev/zero bs=1048576 count=4096 | ssh <otherhost> dd of=/dev/null
8388608+0 records in
8388608+0 records out
4294967296 bytes (4.3 GB) copied, 37.0848 s, 116 MB/s
That's 90% of the theoretical bandwith, right?If you're really transferring huge file files across fat WAN links, why not use GridFTP like the supercomputing centers use? They transfer TB daily.
I wouldn't mess with patching openssh, especially with patches for old versions of openssh.
bbcp,[2] which was mentioned in the original article, also looks promising. Particularly because it actually uses ssh, unlike pigz and nc.
heck you can just use rsync over SSH for simplicity.
That's not the case if the data you're sending is already compressed. But you're right that it's not a fair comparison. scp/ssh also has integrated compression with "-C".
xz: tar -cJ /home/me/source/directory | ssh target tar -xJ --directory /home/you/target/directory
ssh -C won't be as good. in particular with a recent xz that's threaded it will probably be faster than OP's with a good CPU
But, that tunnel still isn't encrypted. So, either encrypt your data first, or setup some vpn tunnel. The inefficiency of scp isn't just due to the encryption, there's overhead in the ssh protocol.
If you still have the setup up and running, throw this in the mix:
rsync -a -e 'ssh -c arcfour' source dest:destpath
and rsync -az -e 'ssh -c arcfour' source dest:destpath
still encrypted! The latter enables compression, but I've found it slower when dealing with several small files (ex: source code files)I agree that scp is dog slow and it can be pretty frustrating. As others have mentioned, cranking down the cipher provides a modest improvement. Ad-hoc netcat based solutions like this one are the way to go if you need throughput and not security.
My version latest from Debian testing (yes I know it is not cuting edge) says in man page: Multithreaded compression and decompression are not implemented yet, so this option has no effect for now.