Svetlitski / fcp

A significantly faster alternative to the classic Unix cp(1) command, copying large files and directories in a fraction of the time.
BSD 3-Clause "New" or "Revised" License
767 stars 19 forks source link

Feature request: setting maximum thread count. #17

Closed vi closed 3 years ago

vi commented 3 years ago

Sometimes I want to economize threads. Also I expect that using only one thread can be beneficial if I know that the copying would involve a rotating storage.

Svetlitski commented 3 years ago

You can currently accomplish this by setting the RAYON_NUM_THREADS environment variable. For example, to perform a copy while using only 1 thread you would run:

RAYON_NUM_THREADS=1 fcp source dest

Note that this is not documented as it is an implementation detail, and thus subject to change. An explicit command-line argument for setting the maximum number of threads used may or may not be implemented in the future.

Regarding your second comment, per the README, fcp is optimized specifically for systems with an SSD, and thus I would caution against using it on a system with "rotating storage" (by which I assume you are referring to an HDD).