5 ms·
Is btrfs still super slow at deleting large files? It can take multiple seconds (like 5-10) on my fileserver to delete just one ~10GB file.
by knorker 6y ago
Is btrfs still super slow at deleting large files?
It can take multiple seconds (like 5-10) on my fileserver to delete just one ~10GB file.
- cmurf 6y agoThe 'rm' command should complete pretty quickly. Actually freeing up space takes time since a delete is subject to delayed allocation. The default transaction commit time is 30 seconds. And if there are snapshots or reflink copies, a backref walk is needed before extents can be freed.
- knorker 6y agoI'm talking about the time it takes for the `rm` command to finish. I've started the habit of running all `rm` commands in the background on btrfs.
- cmurf 6y agoIf it's reproducible, my suggestion is to strace the rm command and find out what it's doing that's taking so long; and post it to the mailing list: https://btrfs.wiki.kernel.org/index.php/Btrfs_mailing_list https://btrfs.wiki.kernel.org/index.php/Btrfs_mailing_list
- throwme45353464 6y agoDo you have snapshots enabled by any chance, or any other btrfs features?
- knorker 6y agoI'm not aware of using any features. Where should I check this?
- ac29 6y agoI tested removing a 10GiB file of random data from a btrfs filesystem, it took 254ms.