title: Fastest way to move 90 million files (270GB) between two NFS 1Gb/s folders
body: <p>I need to move 90 million files from a NFS folder to a second NFS folder, both connections to NFS folder are using same eth0, which is 1Gb/s to the NFS servers, Sync is not needed, only move (overwrite if it exists). I think my main problem is the number of files, not the total size. The best way should be the way with less system calls per file to the NFS folders.</p>
  
  <p>I tried cp, rsync, and finally <a href="http://moo.nac.uci.edu/~hjm/parsync/">http://moo.nac.uci.edu/~hjm/parsync/</a> parsync first took 10 hours in generate 12 GB gzip of the file list, after it took 40 hours and no one file was copied, it was working to 10 threads until I canceled it and started debugging, I found it is doing a call (stat ?) again to each file (from the list) with the -vvv option (it uses rsync): </p>
  
  <pre><code>[sender] make_file(accounts/hostingfacil/snap.2017-01-07.041721/hostingfacil/homedir/public_html/members/vendor/composer/62ebc48e/vendor/whmcs/whmcs-foundation/lib/Domains/DomainLookup/Provider.php,*,0)*
  </code></pre>
  
  <p>the parsync command is:</p>
  
  <pre><code> time parsync  --rsyncopts="-v -v -v" --reusecache --NP=10 --startdir=/nfsbackup/folder1/subfolder2 thefolder /nfsbackup2/folder1/subfolder2
  </code></pre>
  
  <p>Each rsync has this form:</p>
  
  <pre><code>rsync --bwlimit=1000000 -v -v -v -a --files-from=/root/.parsync/kds-chunk-9 /nfsbackup/folder1/subfolder2 /nfsbackup2/folder1/subfolder2
  </code></pre>
  
  <p>The NFS folders are mounted:</p>
  
  <pre><code>server:/export/folder/folder    /nfsbackup2   nfs      auto,noexec,noatime,nolock,bg,intr,tcp,actimeo=1800,nfsvers=3,vers=3 0 0
  </code></pre>
  
  <p>Any idea how to instruct the rsync to copy the files already in the list from the nfs to the nfs2 folder? Or any way to make this copy efficiently (one system call per file?)</p>