Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Whats faster? Copy via nfs-mount or via scp?

we have a network of several machines and we want to distribute a big directory (ca. 10 GB) to every box.

It is located on an nfs-server and is mounted on all machines, so first approach is to just use normal cp to copy the files from the mounted to a local directory. This is easy, but unfortunately there is no progress bar, because it is not intended to use it for network copies (or is it?).

Using scp is intended for copying across network, but it may encrypt everything and therefore be slow.

Should one be faster, and if so, which: cp on nfs-mount or scp?

like image 675
203 Avatar asked Apr 03 '13 09:04

203


People also ask

Is rsync faster than MV?

But note: It's still slower than mv as rsync executes a move on every file and not only on the root dir as mv would.

Is rsync faster than scp?

It turns out that rsync is slower than scp, unless the files are already present. It adds a lot of overhead that's not needed most of the time. I often need to transfer very large binary files. When stuck with standard Linux tools, the fastest process is first transfer via scp.

What is NFS mount point?

A mount point is a directory to which the mounted file system is attached. Make sure the resource (file or directory) is available from a server. To mount an NFS file system, the resource must be made available on the server by using the share command.


1 Answers

You can always use rsync, it can show you the progress (with --progress option) and is more lightweight than scp.

You can enable compression manually with -z.

like image 127
Piotr Zierhoffer Avatar answered Sep 19 '22 17:09

Piotr Zierhoffer