I came across a SSD which have a very significant performance drop (about 20 times). As there is an ExFAT filesystem used, I suspect it might be due to fragmentation.

Is there a tool available in the open source / free software world (= permissive or affordable license) to de-fragment the filesystem?

Yes, I know about the Good old way of backing up, reformatting and putting back. In this case it might be quite lengthy (some TBs of data in an embedded measurement system).

  • Low performance due to fragmentation really only happens on spinning rust, as the system waits for the heads to fly repeatedly across the platters. That 20 times drop may be a sight that the drive does not have very long to go.
    – Bib
    Nov 15, 2021 at 12:57
  • @Bib Not really, most USB flash drive controllers are slow as hell and have atrocious random IO speeds. Nov 15, 2021 at 15:03
  • Uhm, yes, if the performance dropped 20 fold over time.
    – Bib
    Nov 15, 2021 at 15:19
  • How do you have TB of data on ExFAT? That seems to be a very odd choice for large datasets! (I know this doesn't help you, but it might help shift the effort/benefit tradeoff for move away, discard all and format as something different, move back as option.) Nov 15, 2021 at 15:30
  • But I do agree, if it's an SSD, it's really rather questionable that defragmentation would help. Do benchmarks (e.g. gnome-disks) tell you that random access is the problem, or is linear access also slower than you'd like? Nov 15, 2021 at 15:33

1 Answer 1



The same applies to NTFS and FAT32. Actually AFAIK off all filesystems that Linux supports, only ext4 can be defragmented (only individual files one by one), and XFS (full defragmentation available).

As a last resort you could install a trial version of Windows 10 Enterprise and defragment from it. There is no built-in defrag tool in Windows either, but there are some third party tools, e. g. Defraggler, O&O Defrag and UltraDefrag.

Defragmenting SSD/NVMe storage is generally not recommended (possible inessential wearing of flash erase blocks).

Some fragmentation issues are only specific to revolving HDD (seek time), some can be experienced also on SSD when filesystem susceptible to fragmentation is used.

In Linux-only environment a cycle of backup, re-format and restore may be the only (or easiest) option.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.