defrag /x - consolidate free space not really working - Windows Server 2012

I've tried many tools, starting with defrag C: /X (which tries, but doesn't give good results) and found out these steps give the best results:

  1. Perform an Ultradefrag full optimisation
  2. Perform a MyDefrag Consolidate free space script on the drive.

Note that MyDefrag (formerly named JkDefrag) is not maintained any more but the 4.3.1 version in the WayBack machine still works very well as the underlying defragmentation APIs in Windows haven't changed.

References:

  • (WayBack) UltraDefrag - An Open Source Defragmenter
  • WayBack: MyDefrag v4.3.1
  • (WayBack) MyDefrag - Wikipedia
  • (WayBack) Defragmenting Files (Windows)
  • (WayBack) The Challenge of Defragmenting an NTFS Partition | Systems Management content from Windows IT Pro
  • (WayBack) windows - How do you defragment the MFT on an NTFS disk? - Super User

Certain system files are not moved by MS defrag and deliberately spread on the disk. You need to use a bootable 3rd party defrag tool to do an offline defragmentation. Just google defrag bootable