BTRFS remove files slowly

btrfs, remove delete, file large files, slow poor performance long time hours

Copy-on-write feature of btfrs is not suitable for database and torrent downloading applications, which feature random write on files (eg. data is not sequentially written to the filesystem). It will create a lot of fragments (check by using filefrag) which turns removing one file into removing thousands of extents, and cause the IO to hang.

To turn of CoW for a directory: chattr +C path (new file or directory created afterwards will not use CoW, use lsattrto check)

Then turn on "pre-allocate disk space" in your bittorrent software.

Last updated