From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f48.google.com ([74.125.83.48]:45989 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965067AbeF3Chj (ORCPT ); Fri, 29 Jun 2018 22:37:39 -0400 Received: by mail-pg0-f48.google.com with SMTP id z1-v6so4724160pgv.12 for ; Fri, 29 Jun 2018 19:37:39 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Fri, 29 Jun 2018 21:37:27 -0500 Message-ID: Subject: Copy tools on Linux To: linux-fsdevel Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: I have been looking at i/o patterns from various copy tools on Linux, and it is pretty discouraging - I am hoping that I am forgetting an important one that someone can point me to ... Some general problems: 1) if source and target on the same file system it would be nice to call the copy_file_range syscall (AFAIK only test tools call that), although in some cases at least cp can do it for --reflink 2) if source and target on different file systems there are multiple problems a) smaller i/o (rsync e.g. maxes at 128K!) b) no async parallelized writes sent down to the kernel so writes get serialized (either through page cache, or some fs offer option to disable it - but it still is one thread at a time) c) sparse file support is mediocre (although cp has some support for it, and can call fiemap in some cases) d) for file systems that prefer setting the file size first (to avoid metadata penalties with multiple extending writes) - AFAIK only rsync offers that, but rsync is one of the slowest tools otherwise I have looked at cp, dd, scp, rsync, gio, gcp ... are there others? What I am looking for (and maybe we just need to patch cp and rsync etc.) is more like what you see with other OS ... 1) options for large i/o sizes (network latencies in network/cluster fs can be large, so prefer larger 1M or 8M in some cases I/Os) 2) parallelizing writes so not just one write in flight at a time 3) options to turn off the page cache (large number of large file copies are not going to benefit from reuse of pages in the page cache so going through the page cache may be suboptimal in that case) 4) option to set the file size first, and then fill in writes (so non-extending writes) 5) sparse file support (and it would also be nice to support copy_file_range syscall ... but that is unrelated to the above) Am I missing some magic tool? Seems like Windows has various options for copy tools - but looking at Linux i/o patterns from these tools was pretty depressing - I am hoping that there are other choices. -- Thanks, Steve