e4defrag vs xfs_fsr
e4defrag
github.comxfs_fsr
xfs.orgSide by side
| Figure | e4defrag | xfs_fsr |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Linux | Yes | Yes |
| Plans published | 1 | 1 |
| Spec score · Disk Defragmentation Software | 7.5 (#9) | 6.9 (#16) |
| Purpose | e4defrag is an online defragmenter for extent based files on ext4 filesystems. | xfs_fsr reorganizes mounted XFS filesystems by improving the layout of file extents one file at a time. |
Plans
In their own words
e4defrag
e4defrag is a Linux utility for defragmenting extent-based files on ext4 filesystems. It accepts an individual file, a directory and its files, or a device mounted as ext4. The utility aims to place targeted data in more contiguous blocks, which the manual says can improve file access speed. Its -c option reports current and ideal fragmentation counts and a fragmentation score without making changes; the score appears only when the check runs as root. With -v, it prints error messages and each file’s fragmentation count before and after defragmentation. e4defrag checks for ext4 and reports an error for other filesystem types. It does not support swap files, files in lost+found, or files allocated in indirect blocks. A target device or mount point excludes files belonging to another device’s mount point, and fragmented or insufficient free space can prevent improvement. The manual says it is safe to run while another application uses a file, though shared memory and disk bandwidth can slow both. It is free at free.
xfs_fsr
xfs_fsr is a free Linux utility in the xfsprogs project that reorganizes mounted XFS filesystems one file at a time. It copies a target file to temporary storage, then atomically exchanges the data extents of the original and temporary files. With no arguments, it chooses files with the largest extent counts and attempts the top 10% on each pass. A default run lasts up to two hours and records its stopping point for later resumption. You can name filesystems or individual files, with one pass through each target. Targets must be mounted read-write; entries without that option are skipped. Files mapped in memory and files marked no-defrag are not processed. Reorganization needs enough free space to copy the target, with space less fragmented than the original. On quota-enabled systems, the owner also needs sufficient remaining file quota. The manual says system partitions generally do not need this utility and warns that moving bootloader files can prevent booting unless lilo is rerun before reboot.