[ Go to May 1997 Table of Contents ]
Stack Up the Pieces Fix fragmented NT files before your workstation's performance crumbles.
Despite rumors to the contrary, Windows NT Workstations' NTFS file systems do indeed get fragmented. And they don't defrag themselves. So why should you care? Because fragmented files can slow performance to a crawl. When a file becomes fragmented, it's no longer stored as a single contiguous stream of bits on your hard drive. Instead, it's saved as two or more fragments. To retrieve a fragmented file, your computer must position the disk head at the beginning of one fragment, read that data from the fragment, reposition the head to the next fragment, read it and so forth. By contrast, your hard drive's disk head is positioned once when reading an entire contiguous file. So it's easy to see why fragmented file retrieval takes longer than the contiguous alternative. Fortunately, you don't have to live with fragmented files. Several new (and not so new) NT defragmenter utilities can transform your fragmented files into contiguous ones. Best of all, you can download free trial versions of these utilities from the Web (visit http://www.winmag.com/ew/ntfs.htm for the appropriate links) Before we examine the latest NT defrag software, it's important to note which underlying file system you're using-File Allocation Table (FAT) or New Technology File System (NTFS). FAT is a holdover from DOS, Windows and Windows 95; the more secure NTFS was written specifically for NT. If you're running Win95 and NT in a dual-boot configuration, you need to consider these three caveats before defragging the FAT file system from Win95: First, your defrag utility must support long filenames. Second, if you're using the latest Win95 OEM Service Release (OSR 2) with FAT32 support, do not reformat with FAT32, as it's not NT-compatible. Finally, and as you might have guessed, Win95 defrag software can't clean up NTFS. I've always believed that NT users should only use system-level software (like a defrag utility) that runs natively on NT. If a utility doesn't run natively on your operating system, you run the risk of discovering a compatibility problem when a new feature is added to the OS. Early Win95 users discovered exactly this when they ran older DOS defrag software that knew nothing about long filenames. NTFS fragmentation If you're using a high-end NT system, such as an engineering workstation, you're probably using NTFS (if you're not, you should be). As a 64-bit file system, NTFS supports very large partitions and disk arrays (up to a maximum capacity of 264MB). NTFS is also necessary for fault-tolerant disk options (mirrors, duplex drives and RAID), and it's the only format that provides local file security. It also supports automatic file compression. Unfortunately, NTFS partitions get fragmented as badly as-if not worse than-their FAT counterparts. How badly? While researching this column, I examined two of my heavily used NT systems. One has a hard disk divided into FAT and NTFS partitions, and the other is purely NTFS. The first system's FAT partition was messy; more than 200 of its 1,134 files were fragmented, with 312 excess fragments. The system's NTFS partition was also in rough shape-2,397 fragmented files and 15,143 excess fragments. Amazingly, my second system was even worse off: It had a horrendous 26,901 excess fragments. That's alarming, since excess fragments can make your system run at a sixth of its normal performance, as I discovered by using WINDOWS Magazine's Wintune utility (available at http://www.winmag.com/software/) For FAT partitions, the situation's even worse. In fact, really severe FAT fragmentation can make a disk completely unreadable. That doesn't happen with NTFS, but if you try to convert a badly fragmented FAT partition to NTFS, the conversion program may fail. You could be left with a disk that's half-FAT, half-NTFS and all bad news. Fixing NT fragmentation There are two major commercial NT defrag products to choose from: Executive Software's Diskeeper 2.0 for Windows NT 4.0 and Symantec's Norton Speed Disk. There's also a public-domain defrag program (available from a link at http://www.winmag.com/ew/ntfs.htm), an example defrag utility for programmers from NT expert Mark Russinovich (visit http://www.ntinternals.com/defrag.htm) and a forthcoming alternative from an Australian software vendor (we'll provide all the details once the product is formally announced) Finally, there's still the option Microsoft advocated back in the NT 3.1 days (before Diskeeper became available). As one Microsoft insider told me back in 1994, you can defrag your disk by backing up "everything-and I mean everything-off to tape. Then reformat the drive. Then restore the tape." Ouch! I'm sure most of you won't be any happier with that advice than I was, so let's look at today's commercial alternatives. Executive Software's Diskeeper was the first commercial defrag package for NT. It supports automated defrags, but early versions suffered from stability problems because NT 3.5x's kernel lacked defrag programming hooks. Microsoft has since added defrag hooks to NT 4.0, and Diskeeper takes advantage of them. Still, Diskeeper can be costly for large companies ($75 per NT desktop; $399 per server). If your pockets aren't that deep, Executive Software's Web site (http://www.execsoft.com/dklite/) offers Diskeeper Lite, a freeware version that only supports manual defrags. Norton Speed Disk (part of Symantec's product suite, Norton Utilities 2.0 for Windows NT, or NU/NT, $99) is the new kid on the NT defrag block-but it comes with a solid pedigree. The original Norton Utilities for DOS appeared back in 1982, and I've been using it almost that long. My experience told me Symantec's NT version-whenever it finally arrived-would feature solid but minimal NT defrag. I expected a manual, single-pass offline defrag that you could run only at boot-up, but Symantec exceeded my expectations. Speed Disk supports automated defrag and other features first found in Diskeeper. It's tough to choose between Speed Disk and Diskeeper. I prefer some elements of Diskeeper's user interface, which can tell you which files are fragmented and how badly. It truly gives you all the gory details about your NTFS and FAT partitions. Still, Symantec's Speed Disk wins because it's bundled with the NU/NT suite. Undocumented NT APIs In addition to NT defrag, Symantec's NU/NT suite can undelete files and programs. I've been begging for this NT feature since 1994. Why did I have to wait so long? At least one NT software guru-Mark Russinovich, who (as I mentioned) runs an independent NT Web site (http://www.ntinternals.com/ )-claims to know. Russinovich looks at how NT actually works-rather than how Microsoft claims it works. He tells me Microsoft has not documented its defrag API introduced for NT 4.0, so he was forced to reverse-engineer it himself. Russinovich also claims Microsoft has introduced an undocumented database scatter/gather API in NT 4.0 Service Pack 2. With all of these undocumented APIs, developers have a hard time creating NT utilities-such as undelete software. Microsoft claims the defrag APIs are documented in an NT 4.0 Internal File System Kit. Unfortunately, I can't find information about this kit anywhere. For the latest scoop on this rumored kit, stay tuned to our NTFS Web page (http://www.winmag.com/ew/ntfs.htm) Microsoft insiders also insist that scatter/ gather has been clearly documented to the database vendors. The only reason documentation wasn't included in the NT SP2 download was an oversight by Microsoft's documentation group (which caught some heat for leaving it out). On that basis, Russinovich's scatter/gather claims may be bogus, but the defrag API controversy appears to be for real. R.I.P. NT for PowerPC Finally, a few words about the death of Windows NT for PowerPC. Microsoft halted NT/PowerPC development early this year. Only a few months earlier, Microsoft killed NT for Mips development. The Mips and PowerPC versions of NT simply didn't sell. As a result, the forthcoming NT 5.0 will only run on Intel and Digital Alpha chips. I warned you about this possibility (see Windows NT, October 1996). Hopefully, you weren't surprised by Microsoft's decision. I certainly wasn't. That's all I've got time for this month. You are now free to go defrag your NT file system. Senior Technology Editor John D. Ruley is principal author of Networking Windows NT 4.0, Third Edition (John Wiley & Sons, 1996). Contact John via the Web at http://www.winmag.com/ew or at the addresses here.
|