A simple algorithm for defragging is to simply defrag every fragged file. :) Many people believe that backing up, erasing and restoring a partition might reduce fragmentation. This is generally true, BUT the time used (not to mention the downtime of the system) for this procedure is far more than the actual performance gain. I suggest to always use a defrag tool to do the job online and automatically!
This was first published in June 2002