From my answer at [WayBack] hard drive – defrag /x – consolidate free space not really working – Windows Server 2012 – Server Fault
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:
- Perform an Ultradefrag full optimisation
- 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
The original MyDefrag disappeared two times (temporarily in 2014 because the domain expired, then permanently in 2017 because the domain went off-line).
Luckily, the WayBack machine at archive.org has the latest version saved (not all the links from the archive.org search page have an executable as sometimes it shows the expired domain or a non-existing redirect when the domain got off-line):
- https://web.archive.org/web/20150811002116/http://www.mydefrag.com/Downloads/Download.php?File=MyDefrag-v4.3.1.exe
- https://web.archive.org/web/20120517021802/http://www.mydefrag.com/Downloads/Download.php?File=MyDefrag-v4.3.1.exe
- via [WayBack] map –unmap hanging on non-contiguous ISO file · Issue #212 · chenall/grub4dos · GitHub
- which also pointed to the installation documentation: [WayBack: MyDefrag v4.3.1]
Note that chocolatey install --yes mydefrag --version 4.3.11
fails because of the missing download. See [WayBack] Chocolatey Software | MyDefrag 4.3.1.
(The --version
parameter trick is from [WayBack] Chocolatey – How to install hidden and unlisted package? – Super User, via [WayBack] “This package is unlisted and hidden from package listings.” – Google Search).
–jeroen