From Essential Windows NT System Administration by Aeleen Frisch, O'Reilly and Associates, 1998.
Disk I/O can be a major performance bottleneck that can affect a system or individual job. In this tip we will look at some of the factors that can affect disk I/O performance.
- Filesystem fragmentation degrades I/O performance. Fragmentation results when the free space within a filesystem is scattered in small chunks, rather than fewer large ones of the same total size. This means that files themselves become fragmented (noncontiguous), and access times to reach them become correspondingly longer.
Filesystem fragmentation tends to increase over time. Eventually, it will be necessary to defragment the filesystem. There are currently several commercially available utilities designed for this purpose.
- Sequential access of large files (i.e., reading or writing, starting at the beginning and moving steadily toward the end) is most efficient when the files are contiguous: made up of a single, continuous chunk of space on a disk. It may be necessary to defragment or even rebuild a filesystem to create a large amount of contiguous disk space.
- Disk I/O to large sequentially accessed files is also improved by disk striping.
- Placing large, randomly accessed files (e.g., databases) in the center portions of disk drives (rather than out on the edges) yields the best performance.
- Random data access is dominated by seek times - the time taken to move the disk heads to the correct radius along the platters - and seek times are minimized when the data is in the middle of the disk; it increases at he inner and outer edges. If you are dividing a large disk into several partitions, you can create one comprising the central portion and place the appropriate files into the filesystem for that partition.
- If you plan to use a fault-tolerant filesystem, selecting the appropriate kind for the disk access patterns you anticipate can optimize its I/O performance. Disk mirroring provides good performance for I/O characterized by small transfers, while disk striping with parity optimizes the number of I/O operations per second.
- Be aware that there may be several options for implementing fault tolerance, with differing performance implications. For example, if you wish to provide a fault-tolerant filesystem for a database file, you may select a hardware RAID device (assuming you can afford it), Windows NT software-based RAID 1 or 5, or the mirroring facility provided by the database application. You need to understand how all of the facilities work to make the best selection. In this example, the best software-based solution is usually RAID, implemented by the Windows NT operating system, since the data mirroring facilities provided by many database applications operate sequentially (i.e., only one copy of a data block is written at a time), rather than in parallel.
To purchase Essential Windows NT System Administration go to http://www.oreilly.com/catalog/esawinnt/
Editor's Note: This tip originally appeared on SearchWin2000.com
This was first published in March 2000