CXO

Optimizing your hard disk performance

If you have a souped-up system that doesn't seem to work as fast as it should, then look no further than the hard disk. In this Daily Feature, Deb Shinder discusses techniques you can use to ensure that you're getting the most out of your system.


As computers become more powerful, with processors in the gigahertz range and memory prices falling, you will find the performance bottleneck in your system is hard disk access. Although you may not be able to afford expensive, high-speed SCSI disk arrays for your computers, there are ways to optimize disk performance, thus increasing overall system operation. In this Daily Feature, I will take a look at some of the ways you can ensure that you’re getting all you can out of your hard disks.

File systems and performance issues
Windows 2000 supports the FAT16 (FAT), FAT32, and NTFS file systems. There are a number of good reasons to use NTFS on all your disk partitions. File encryption, file compression, disk quotas, file level security, and other Windows 2000 features require NTFS; you cannot use these features on partitions formatted in the FAT file systems. Because NTFS is a more powerful file system, it does carry more system overhead. However, in most cases, the small performance difference is outweighed by its advantages.

Formatting vs. converting
What many people are unaware of is that you can increase disk performance by doing a clean format in NTFS. Windows 2000 allows you to convert a FAT or FAT32 partition to NTFS, but a converted disk will not perform as well as one that has been formatted in NTFS. Thus, if you have a choice between converting and formatting, you may want to save your data and format the partition in NTFS.

Tip
Be sure to back up any data on the FAT/FAT32 disk before you format it in NTFS, because formatting causes you to lose all the data on the partition.

NTFS performance tuning
By disabling unneeded features and functions, you can improve the performance of NTFS. For backward compatibility, NTFS creates a corresponding “eight-dot-three” filename (MS-DOS type name) along with the long filename you give a file. If you are not sharing files with 16-bit operating systems (MS-DOS, Windows 3.x) or applications, you don’t need this feature. Disabling the automatic creation of short names will eliminate the overhead required to perform this task and enhance performance. Another NTFS feature that can be disabled for improved performance is the automatic update of the time/date stamp (last access update) when a directory is traversed. Both of these performance-tuning modifications require that you edit the Registry. Always exercise caution when making direct changes to the Registry.

Tip
The performance hit caused by last access updates may not be significant on small NTFS volumes but can be noticeable on large volumes.

From the Run command on the Start Menu, type Regedit or Regedt32 and access the following key (see Figure A):
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\
FileSystem


Figure A
You can enhance performance by editing the Registry to disable unneeded NTFS features.


To disable short filenames, change the value of NtfsDisable8dot3NameCreation to 1. To disable last access updates, change the value of NtfsDisableLastAccessUpdate to 1. If the entry is not already present, you will have to create it.

Dynamic disks
Windows 2000 supports the creation of a new disk type. The traditional way of organizing disks is to divide them into partitions (called a basic disk). This new disk type, which goes by the name of dynamic disks, supports software RAID levels 0, 1, and 5. These RAID levels provide fault tolerance and can also increase performance. The fault tolerant RAID levels (1 and 5) are available only on Windows 2000 Server, but Windows 2000 Professional allows you to create striped volumeson dynamic disks.

Tip
By default, disks are configured as basic disks. To convert a basic disk to dynamic, open Disk Manager (right-click My Computer, select Manage, and select Storage | Disk Management in the left console pane). Right-click the disk in the right pane and select Upgrade To Dynamic Disk. Note that you cannot reverse the process and downgrade to basic without losing all data on the disk.

Performance effects of striped volumes
Striped volumes (RAID 0) do not offer any fault tolerance benefit. The purpose of creating a RAID 0 volume is to enhance disk performance. A striped volume spreads data across two or more physical disks, which make up one logical volume, in stripes. Throughput is increased, because the operating system can access both disks simultaneously. Striped volumes offer the best performance of all Windows 2000 volume types.

Disk fragmentation
Fragmentation is one of the most common reasons for a slowdown in disk performance. A disk becomes fragmented when files are deleted and new files are written to the disk, because the new files may not be stored in contiguous clusters. This increases the seek time because the system must find all the “pieces” of the file that are scattered in different physical locations on the disk.

A disk defragmentation tool rearranges the data on the disk so that files are made up of contiguous clusters. Windows 2000 Professional includes a Disk Defragmenter tool, accessed via the Computer Management console or through Start | Programs | Accessories | System Tools. You should use the Disk Defragmenter tool to analyze your disks on a regular basis (as shown in Figure B) and defragment when necessary. This can significantly speed disk performance.

Figure B
You should analyze disks regularly and defragment them when needed.


Monitoring disk performance
If you suspect your hard disk(s) is the bottleneck that is slowing down your system’s performance, you can use Windows 2000’s built-in Performance tool to monitor disk performance.

The Performance tool is accessed via Start | Settings | Control Panel | Administrative Tools in Windows 2000 Professional. The Performance tool includes two parts: System Monitor and Performance Logs and Alerts. Use the System Monitor to set up monitoring of disk-related performance data.

There are two performance objects to be concerned with:
  • LogicalDisk, which monitors performance for individual partitions/volumes, as designated by drive letter C, D, E, etc.
  • PhysicalDisk, which monitors performance for individual hard disks, as designated by number 0, 1, 2, etc.

In Figure C, you see that you can select from a list of counters for the specified object.

Figure C
You can monitor performance data for logical disks (partitions) or physical disks.


By default, in Windows 2000, the PhysicalDisk counters are activated, but you must activate the LogicalDisk counters before System Monitor can use them. This is done with the Diskperf command.

At the command line, enter the following:
diskperf –yv

This activates counters for logical disks (volumes, as designated by the v switch). To deactivate them (which you should do after you finish using them, since activated counters themselves create a slight performance hit), enter diskperf –nv (y indicates yes, or on; n indicates no, or off). The physical disk counters can be turned on and off using a d switch with the y or n instead of a v.

Tip
For detailed information on using the disk counters to monitor disk performance, see Chapter 30, “Examining And Tuning Disk Performance,” in the Windows 2000 Professional Resource Kit.

Conclusion
Disk bottlenecks are common culprits when your Windows 2000 Professional machine’s performance slows down. There are several actions you can take to optimize disk performance and increase the overall speed with which your computer performs disk-related tasks. In this Daily Feature, I have explained some steps you can take to ensure that your disks are operating at maximum efficiency.

 

About Deb Shinder

Debra Littlejohn Shinder, MCSE, MVP is a technology consultant, trainer, and writer who has authored a number of books on computer operating systems, networking, and security. Deb is a tech editor, developmental editor, and contributor to over 20 add...

Editor's Picks