fcp

Dev tools

file copy utility

SHOW HN2021

fcp

A significantly faster alternative to cp(1), written in Rust

github.com

#cp alternative#parallel file copy#rust cli#copy-on-write

88points
86comments
#589of 2,533 in 2021
Top 24%of 2021 by points

How HN took it

CuriousMostly questions and neutral comments

2 positive, 23 neutral or asking, 0 mixed, 13 critical, out of 38 comments about the project. Thread score -0.30.

Performance: 1 for, 8 againstIdea: 1 for, 3 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Large speedup over cp on NFS and some benchmarks

    From 1 comment
    • I just tried this going between my 2 servers with NFS, as compared to cp, rsync, and rclone. This tool wins by >2x. Great work! ~1.5Gbps vs ~3-4Gbps.
      virtuallynathan on HN

Objections

  • Multi-threaded copying is slower on spinning hard drives

    From 2 comments
    • It looks like this is using multiple threads to copy files. That's fine for NVMe which tends to achieve more throughput with higher queue depths. But it will degrade performance…
      the8472 on HN
    • My experiments confirms your analyze. On a SATA hard drive using ext4, I copied a directory with a large hierarchy of file and 216MB overall. After 2 warm-ups, I launch this…
      idoubtit on HN
  • Lacks most of cp's options

    From 2 comments
    • For SSDs this is probably the right thing (maybe use uring tho?) For hard drives this is the opposite of what you want. For hard drives, especially when copying large trees, you…
      formerly_proven on HN
    • Definitely valid points, as I mentioned in a comment below I'll be updating the README to mention this is geared towards systems with SSDs. As for lacking most of cp(1)'s…
      Svetlitski on HN
  • Saturating CPU with threads is undesirable for utility tools

    From 1 comment
    • Why do people think it is acceptable for utility programs like file copies to launch many threads and saturate my CPU? It's usually the case that there are many things being done…
      kccqzy on HN
  • Speed claim based on core count is misleading since disk IO is the bottleneck

    From 2 comments
    • > The primary reason is that it uses all of your computer's available cores to walk through directories and copy files, effectively speeding things up by a factor directly…
      jjav on HN
    • The only thing I'd like "new" in cp is an optional progress indicator, for large files Btw, copying files is mostly bound by disk speed (or network if share), not so much by CPU,…
      gregoriol on HN

Requests

  • Benchmarks on other filesystems

    From 1 comment
    • What filesystem on Linux? Show us some benchmarks on other filesystems.
      cratermoon on HN
  • Man page documentation

    From 1 comment
    • My only gripe with those new unix tools is that many of them don't come with a man page, even though they have essentially the same information elsewhere So, perhaps, take a look…
      nextaccountic on HN
  • Support for reflinks and deduplication

    From 1 comment
    • Does this support reflinks on filesystems that support deduplication? (like cp --reflink)
      nextaccountic on HN
  • Progress indicator for large files

    From 1 comment
    • The only thing I'd like "new" in cp is an optional progress indicator, for large files Btw, copying files is mostly bound by disk speed (or network if share), not so much by CPU,…
      gregoriol on HN

Questions

  • Why is it faster than cp?

    From 1 comment
    • _Why_ is it faster? (particularly on Linux, I see you're using syscalls on mac that mac's cp doesn't, since apple doesn't really maintain their unix userspace)
      jepler on HN
  • Does it sacrifice fsync durability?

    From 1 comment
    • Does this software gain any speed by sacrificing any safety? As in, does it switch off fsync in any way? Are the files guaranteed durable by the time the software terminates?
      mnw21cam on HN
  • Which filesystems are supported?

    From 1 comment

Alternatives named

  • GNU cp with reflink options

    From 2 comments
    • > The massive difference in performance in this case is due to fcp using fclonefileat and fcopyfile under the hood GNU Coreutils' cp, the thing you use on most GNU/Linux systems,…
      kazinator on HN
    • Does this support reflinks on filesystems that support deduplication? (like cp --reflink)
      nextaccountic on HN
  • rsync, rclone

    From 1 comment
    • I just tried this going between my 2 servers with NFS, as compared to cp, rsync, and rclone. This tool wins by >2x. Great work! ~1.5Gbps vs ~3-4Gbps.
      virtuallynathan on HN
  • uutils coreutils rewrite

    From 1 comment
    • I would argue that "the easy parts" of cp account for a very significant fraction of its usage (i.e. copy some files/directories without any other options). The idea with fcp is…
      Svetlitski on HN
  • wcp (io_uring based copy tool)

    From 1 comment
    • Not a question, but I made a similar tool in c++[1], for Linux only using io_uring, and a blog post explaining its internals [2]. I'll definitely have a look some time soon, I'd…
      wheybags on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/27523014)