Fragmentation issue with multithread

Issue relates to how rclone seems to write files when multithreading from say FTP to a local HDD. I transferred 753000 files using 1.5TB of space using 4 threads on initial sync.

The result was 78% file fragmentation on the HDD. Seems rclone does not pre-allocate the file data before writing, and instead writes the "chunks" of data, but when multithreading, this will cause fragmentation on NTFS drives.
One issue with pre-allocating is if the data transfer was not complete, but the file size is the same. Only a CRC check would confirm the data, but you can always write to {filename}.partial until download is complete, then rename. You can also purge rouge .partial files if rclone exited unexpectedly. I've done similar with my projects.

rclone v1.69.3

  • os/version: Microsoft Windows 11 Pro 24H2 24H2 (64 bit)
  • os/kernel: 10.0.26100.4652 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.24.3
  • go/linking: static
  • go/tags: cmount

Example of command used:
rclone sync ftpserver:/Websites/the-website "D:/Backups/Websites/the-website" --progress --fast-list --use-server-modtime

This is an old rclone (4 releases behind). If you suspect some bugs please test with the latest rclone version.

Nobody is interested in going through different versions releases notes to check if maybe something is already fixed or not.

Or in other words reporting bugs in old rclone versions is waste of time. Yours and people reading it,

Ah crap! I thought I was. I'll update and test again.

1 Like

Have a look at this old issue:

It seems it is still something waiting to be fixed.

Yes, seems so thanks. Can you remove my post please? No point it being on here. Thanks for the info, appreciated.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.