ITworld.com
  Search  
ITworld Home Page ITworld Webcasts ITworld White Papers ITworld Newsletters ITworld News ITworld Topics Careers ITworld Voices ITwhirled Changing the way you view IT

How to defrag

Network World 4/11/01

Dave Kearns, Network World

File fragmentation is one of the constants of Microsoft’s, and other, operating systems.

On this topic

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.

Dave Kearns, a former network administrator, is a freelance writer and consultant in Austin, Texas.




Sponsored Links

Understanding VPN Technology Choices
Knowing the VPN options can help a manager work more effectively with available technologies.
Client PCs As Strategic Assets
Read How Intel® Is Decreasing TCO And Delivering Measurable Business Value Year After Year.
Experience The Benefits Of Intel® vPro™ Technology
Get Built-In Security And Remote Management Capabilities. Meet Critical Business Challenges.
Enterprise IP Goes Mobile
To maximize full productivity, companies must integrate their mobile applications with the IP network.
Intel® Technology’s Impact On Mobile IT Efficiency
Check Out How Centrino® With vPro™ Technology Is Cost Effectively Keeping PC Fleets Productive.
» Buy a link now

Advertisements
Sponsored links
Top 5 Reasons to Combine App Performance and Security
Locate Hidden Software on business PCs with this free tool
KODAK i1400 Series Scanners stand up to the challenge
Bring harmony to your mix of UNIX-Linux-Windows computing environments
 Home   Applications  System Utilities  Disk defragmentor
www.itworld.com    open.itworld.com     security.itworld.com     smallbusiness.itworld.com
storage.itworld.com     utilitycomputing.itworld.com     wireless.itworld.com

 
Contact Us   About Us   Privacy Policy    Terms of Service   Reprints  

CIO   Computerworld   CSO   GamePro   Games.net   Industry Standard   Infoworld   ITworld  
JavaWorld   LinuxWorld  MacUser   Macworld   Network World   PC World   Playlist  

DEMO   IDG Connect   IDG Knowledge Hub   IDG TechNetwork   IDG World Expo  

Copyright © Computerworld, Inc. All rights reserved

Reproduction in whole or in part in any form or medium without express written permission of Computerworld Inc. is prohibited. Computerworld and Computerworld.com and the respective logos are trademarks of International Data Group Inc.