Saturday, May 24, 2008

Increasing File System Performance

When we talk about increasing or improving file system performance, we have to talk about the hard drive. On new systems today with such fast processors, the biggest bottleneck is the performance of the hard drive itself. All Windows operating systems use virtual memory. They do this by a process referred to as paging. Paging is the process of moving virtual memory back and forth between physical memory and the hard drive. By optimizing the performance of the file system on the hard drive, we in essence improve the performance of the system itself.There are ways in Windows Vista to improve file system performance. Some are through regular maintenance, and others are through settings within the operating system. We will go over seven different ways of improving file system performance.

■ Disk defrag

■ Cluster size adjustment

■ Short filenames

■ Folder structure

■ Compression

■ Relocate pagefile.sys


Disk Defrag

File system fragmentation is the inability of the file system to lay out related data contiguously. Thus, the hard drive works harder during seeks, which hinders performance. Defragging hard drives is an effort to improve performance and has been going on for years regardless of the file system. In the early days of NTFS, very little talk about fragmentation came up. So little was the subject brought up that some quite mistakenly believed that NTFS couldn’t be fragmented. This is not the case at all. NTFS can and does become fragmented the longer a system is used and the more data that is put on the drive.

Cluster Size (Allocation Unit) Adjustment

As you’ve seen, the performance of NTFS can be affected by disk fragmentation. NTFS performance can also be affected by cluster size (allocation unit). As discussed earlier, regardless whether a file is smaller than the cluster size, the size of that cluster will fill the drive, which means if you don’t choose the right cluster size when creating a volume, you could face a significant performance hit. Some things to think about when creating an NTFS volume and determining the cluster size:

■ Will the files typically be about the same size?

■ Will the files be smaller than the default cluster size?

■ Will the files on the drive remain about the same size or will they grow larger and by how much?

Files that are smaller than the default cluster size, and stay relatively the same size, should use the default size to reduce disk space. The caveat to smaller clusters though is that they tend to fragment much easier and more often than larger cluster sizes. If the files you will be storing on the drive tend to be large (for example, CAD drawings), then you may want to use 16 or 32KB clusters instead of the default 4KB size.

Short Filenames

On NTFS volumes, each time a user creates a file with a long filename, Windows Vista creates a second file entry that has a similar 8.3 short filename. Remember the old 8.3 limitation of FAT12 and FAT16? No? Well, filenames back then could only have a maximum of eight characters for the filename itself, plus a three-character extension. An example would have been genedoc1.doc.With restrictions like that, it was very difficult to know what file contained what without a decent description in the filename. This all changed in the Windows world when NTFS came on. Now we have a maximum of 256 characters for our filenames.

On systems with a large number of files with long filenames that contain the same initial characters, the time required to create the files increases, thus file system performance is hurt. This is because NTFS bases the 8.3 filename on the first six characters of the long name. When you have a large number of files with similar long names under the same folder, this can cause problems. To reduce the time required to create files, use the FSUTIL command, as shown next, to disable the 8.3 short filename service. After disabling 8.3, don’t forget to restart the system.

fsutil behavior set disable8dot3 1

Folder Structure

One of the advantages of NTFS is its ability to support volumes that contain large numbers of files and folders. Some guidelines, however, can improve performance by altering your folder structure. First, do not put a large number of files into a single folder. Users that have programs that quickly open and close file frequently can cause a performance hit. Try separating the files into folders that will distribute the workload on multiple folders at a time. If this is not possible, keep the files in one folder, and just like we did previously in this section, disable the 8.3 filename structure.

Compression

It’s no secret that file compression causes a performance hit. This is because on a compressed NTFS file it is decompressed, copied, and then recompressed as a new file, even if it’s copied onto the same computer. Systems that are CPU-bound should not use compression.

Relocating Pagefile.sys

Another way to improve file system performance is to relocate pagefile.sys to another physical drive and dedicate that drive to it. By relocating the page file to a separate dedicated hard drive, you take advantage of the spindles of that drive and speed up the process of paging. This improves system performance and limits the amount of fragmenting on each physical drive.

*.* Source of Information : Syngress How to Cheat at Microsoft Vista Administration

No comments: