How to defrag
File fragmentation is one of the constants of Microsoft’s, and other, operating systems.
On a brand-new drive, the first files written are all written to contiguous parts of the drive, making for the fastest possible read times. Gradually, as more files are added, removed or changed, there is no longer adequate contiguous space, and the new files take whatever space is available. This leads to file fragmentation and longer access times to read the files, as well as longer time spent writing changes or new files.
To overcome this problem, you use a disk defragmenter utility. This moves parts of files and free space around until the files are using as contiguous a space as possible. Windows 2000 (like all Microsoft operating systems since Windows 95) includes a built-in defragmenter utility, which you should run from time to time.
You will notice, though, that some files are never defragmented by this utility. Among these are the NTFS Master File Table (and its mirror copy) and the Virtual Memory Paging file (the so-called "swap file"). Nonetheless, these will become fragmented over time. There are ways to remove the fragmentation, but they're relatively drastic -- so you should be sure to have decent backups before attempting these procedures.
The swap file is best defragmented by re-creating it. To do so, follow these steps (for Windows 2000):
Click Start, point to Settings, click Control Panel, and then double-click System.
On the Advanced tab, click Performance Options.
Click Change to open the Virtual Memory dialog box.
Change the paging file to another drive.
Reduce the minimum and maximum size of the original paging file on the drive you want to defragment to 0M bytes.
Restart your computer to have the system use the new paging file.
Run Disk Defragmenter on the original drive to consolidate the free space segments created by moving the paging file.
Re-create the paging file on the original drive.
Reduce the minimum and maximum size of the temporary paging file to 0M bytes.
Restart your computer.
Defragging the Master File Table also requires re-creating it, but you'll want to make doubly sure you have good backups, because the procedure will destroy all data on the drive! Nevertheless, it can increase access time to files.
First, you'll want to see how fragmented the file table is. Do this by performing a Disk Defragmenter analyze operation to generate a report. View the report and look for the section of the report called "Master File Table (MFT) fragmentation" (it’s under Volume Information). It might look like this:
Total MFT Size = 8512K
MFT record count = 8,504
Percent MFT in use = 99%
Total MFT Fragments = 4
Then get a copy of Microsoft's Knowledgebase article Q174619, "How NTFS Reserves Space for its Master File Table (MFT)":
http://support.microsoft.com/support/kb/articles/Q174/6/19.ASP
You'll use the data from the report according to the instructions in the article to adjust the NtfsMftZoneReservation value. But first you need to back up and reformat the volume in order to create a contiguous MFT using the higher zone reservation space, and then perform a full volume restore. This is not something for the faint of heart! Nevertheless, it can increase the pperformance of your system -- sometimes remarkably.
» posted by ITworld staff
Network World
Sign up for ITworld's Daily newsletter
Follow ITworld on Twitter @IT_world
Brian Proffitt
Microsoft/Novell: Breaking Down the Coupon Numbers
Esther Schindler
Drupal's Dries Buytaert on Building the Next Drupal
Tom Henderson
Top Ten General Operating Systems Rants
pasmith
PS3 motion controller delayed; goes up against Project Natal
sjvn
Neolithic Windows security hole alive and well in Windows 7
claird
Perl source code comparison makes for good reading
mikelgan
Cell phones don't create stress or interrupt much
Sandra Henry-Stocker
How to: The Unix Interview
Where Google Chrome security fails: the password
I heard mention that the Chrome OS will have some sort of encryption available a la bitlocker. If it's possible to encrypt personal data using another password or key, then it may have potential for very secure data.... And Ubuntu has an 'encrypt home directory' option, perhaps google should follow suit.
- Dann
Join the conversation here
Quick, practical advice for IT pros. Made fresh daily.
- Ubuntu advances: Why Ubuntu server installations will surge in 2010
- Social media marketing: How to make friends with benefits
- More...
Want to cash in on your IT savvy? Send your tip to tips@itworld.com. If we post it, we'll send you a $25 Amazon e-gift card.








