Home > Windows Server Tips > Windows Systems Management and Administration > Optimizing NTFS file system performance
Windows Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

WINDOWS SYSTEMS MANAGEMENT AND ADMINISTRATION

Optimizing NTFS file system performance


Brien M. Posey, Contributor
02.06.2008
Rating: -4.35- (out of 5)


Expert advice on Windows-based systems and hardware
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Part 1 | Part 2

Brien M. Posey

If you look at the various components in your computer, the hard disk is typically the slowest. This means that disk I/O can become a major bottleneck in the system's overall performance. When you combine slow hardware with inefficiencies in the file system, these delays can quickly become very noticeable. Fortunately, you can do several things to improve the efficiency of NTFS beyond occasionally defragmenting the volume.

Legacy filenames

Back in the days of DOS, the file system of choice was FAT (file allocation table). The FAT file system limited the length of a filename to eight characters plus a three character extension. Newer file systems such as FAT32 and NTFS allow the use of long filenames, but they also retain a FAT-style filename for backward compatibility purposes.

This filename alias can cause performance problems in a couple of different ways. First, the process of writing the filename alias consumes disk I/O cycles. Also, the filename alias forces the operating system to stop and calculate what the abbreviated filename should be.

Windows file system basics

Understanding Windows XP file systems FAT32 and NTFS 

How data recovery for NTFS differs from FAT 

That in itself incurs a minor performance hit. The real problem, though, is in the way that the filename alias is calculated. To create a filename alias, Windows looks at the first six characters of the original filename and then derives the alias from those six characters. Typically, the alias consists of the first six characters of the filename, a ~ sign and a number. A number is used at the end of the filename because it's possible that multiple files within a folder will have filenames in which the first six characters are identical.

Herein lies the problem. If you have a few files in which the first few characters of the filename are identical, it isn't really a big deal. However, when you start having large numbers of files in which the initial portion of the filenames are identical, Windows begins to spend more and more time trying to figure out what the filename alias should be. Once a directory contains a few thousand files with these characteristics, performance can really begin to suffer. According to some sources, if a folder contains 300,000 or more files that have identical initial portions of the filename, contradictions can begin to occur because Windows exhausts its pool of aliases for those files.

Today, the old "eight-dot-three"-style filenames are rarely necessary. Almost everyone uses FAT32 or NTFS as their file system, and backward compatibility with the FAT file system is seldom an issue anymore. That being the case, you might consider completely disabling support for backward compatibility. Doing so can greatly improve the file system's performance.

To disable backward compatibility, you can use a tool that was included with the Windows Resource Kit called Fsutil. Fsutil is a command-line tool designed to modify the behavior of the file system. The command for disabling backward compatibility is:

Fsutil behavior set disable8dot3 1
If you need to retain backward compatibility with the FAT file system, then you can improve performance by being careful how you name files. You should avoid placing large numbers of files into a single folder whenever possible. However, if you must place a lot of files into a folder, try structuring the filenames so that the first few characters of each filename are different, as opposed to making the last part of the filename the differentiating factor. Remember that Windows looks at the first six characters of a filename when creating an alias.

Resize the master file table

Another way to improve performance is to adjust the size of the master file table. The master file table is similar to the File Allocation Table used by the FAT file system. It is essentially a directory of all of the files and folders found on the hard disk volume. For this reason, it is critical to the volume's performance that the master file table remains as unfragmented as possible. As such, Microsoft has designed the NTFS so that 12.5% of the volume's disk space is reserved for the master file table.

Normally, this works out OK, but if the volume contains a large number of files (not necessarily large files), the amount of space reserved for the master file table can become inadequate. Likewise, if the volume starts to become low on disk space, Windows may start placing some of the smaller files into the area reserved for the master file table in an effort to avoid running out of disk space.

Either of these situations can cause performance problems. Fortunately, you can adjust the amount of disk space that is reserved for the master file table by using the fsutil command. The actual command is shown below:

Fsutil behavior set mftzone 1
You might have noticed that the command above ends with a "1." The number at the end of the command tells fsutil how much disk space to reserve. The "1" indicates that 12.5% of the total capacity will be reserved. In addition, a "2" reserves 25% of the disk's capacity, while a "3" reserves 37.5% and a "4" reserves 50%.

Brien M. Posey, MCSE, has received Microsoft's Most Valuable Professional Award four times for his work with Windows Server, IIS and Exchange Server. He has served as CIO for a nationwide chain of hospitals and healthcare facilities, and was once a network administrator for Fort Knox. You can visit his personal Web site at www.brienposey.com.

Rate this Tip
To rate tips, you must be a member of SearchWindowsServer.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Windows System and Network Performance Monitoring
Quick hits: Troubleshooting service account failure, batch job execution
Troubleshooting common Windows service failures
Monitor network bandwidth with CyberGauge
How to receive automatic notification of file changes
Sysinternals TCPView monitors network connections on Windows systems
Create data collector sets through Vista's Performance Monitor
Data collector sets simplify monitoring of Vista performance
Performance monitoring in Windows: An overview
RRAS utility in Windows Server 2003 traces network problems
Performance monitoring tools for Windows

Windows File Management
Windows registry hack improves offline file access for mobile users
How to format NTFS: More tricks to improve file system performance
Windows scripting secrets for disk quota management
How to receive automatic notification of file changes
Identify file extension types with TrID
Windows System File Checker helps stop system failures
How to reverse NTFS object ownership from administrators to object's creator -- and why
Use PageDefrag to defragment immovable system files
Case Study: Troubleshooting Distributed File System Replication
Creating discrete pagefile volume increases system performance
Windows File Management Research

Windows Systems Management and Administration
Tips for Windows domain controller optimization
Quick hits: Troubleshooting service account failure, batch job execution
Case Study: Troubleshooting Windows service dependency failures
Troubleshooting common Windows service failures
How to format NTFS: More tricks to improve file system performance
Key enhancements to SCCM give admins more control over assets, licensing
Windows scripting secrets for disk quota management
The new Microsoft System Center: What happened to SMS and MOM?
New Russinovich tool scans for open file references from command line
Identify file extension types with TrID

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
NTFS  (SearchWindowsServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Server Room Design - Planning, Cooling, Maintenance
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2004 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts