X-bit Labs takes a closer look at hardware defragmentation:
Defragmentation in Windows XP is supposed to be done with a standard integrated tool based on the commercial Diskeeper from Executive Software. Like most third-party defragmentation utilities, this program uses Microsoft’s API, the FSCTL command set (follow this link to learn more about it). As opposed to earlier implementations, e.g. in Windows NT and Windows 2000, the version integrated into Windows XP can defragment the Master File Table (MFT) and supports clusters larger than 4KB that are created when disk partitions larger than 4GB are formatted with the system default formatting tool. This application had proved so successful that it was transferred into Microsoft’s newest OS, Windows Vista, without modifications.
It is necessary to note, Microsoft recommends that you have at least 15% of free disk space on the disk volumes you want to defragment.
In this article we’ll see if defragmentation can be used as a performance test for hard disk drives. We will also see how the time it takes to perform a defragmentation procedure depends on the HDD’s support of Native Command Queuing technology..