NTFS Performance with Numerous Long Filenames

This article was previously published under Q130694
This article has been archived. It is offered "as is" and will no longer be updated.
SYMPTOMS
Windows NT takes a long time to perform directory operations on Windows NTfile system (NTFS) formatted drives that contain a large number of fileswith long file names (names that do not conform to the 8.3 convention) in asingle directory.
CAUSE
When you save a file with a long file name to an NTFS drive, NTFS creates,by default, a second file directory entry with a short file name conformingto the 8.3 convention.

When NTFS enumerates files in a directory, it has to look up the 8.3 namesassociated with the long file names. Because an NTFS directory ismaintained in a sorted state, corresponding long file names and 8.3 namesare generally not next to one another in the directory listing. So, NTFSuses a linear search of the directory for every file present. As a result,the amount of time required to perform a directory listing increases withthe square of the number of files in the directory. For small numbers offiles (less than a few hundred) the time delay is negligible. But as thenumber of files in a directory increases to several thousand, the timerequired to perform a listing can increase to minutes, hours, or even days.The problem is aggravated if the long file names are very similar --differing only in the last few characters.
WORKAROUND
To work around this problem in Windows NT 3.1, avoid having large numbersof files with long file names in a single directory.

To work around this problem in Windows NT 3.5, turn off NTFS automatic 8.3name generation using the Registry Editor:

WARNING: Using Registry Editor incorrectly can cause serious, system-wideproblems that may require you to reinstall Windows NT to correct them.Microsoft cannot guarantee that any problems resulting from the use ofRegistry Editor can be solved. Use this tool at your own risk.
  1. Run Registry Editor (REGEDT32.EXE).
  2. From the HKEY_LOCAL_MACHINE subtree, go to the following key:
          \SYSTEM\CurrentControlSet\Control\FileSystem						
  3. Select NtfsDisable8dot3NameCreation.
  4. From the Edit menu choose DWORD.
  5. Change the Data value to 1. Leave the Radix set to Hex.
  6. Shutdown and restart Windows NT.
NTFS will no longer create short file names (8.3 names) when you createfiles with long file names.

NOTE: Files that already have long file names and short file names are notbe affected by this change.
STATUS
Microsoft has confirmed this to be a problem in Windows NT version 3.5. Afix to this problem is in development, but has not been regression-testedand may be destabilizing in production environments. Microsoft does notrecommend implementing this fix at this time. Contact Microsoft ProductSupport Services for more information on the availability of this fix.

3.10 prodnt lfn 0x1
Properties

Article ID: 130694 - Last Review: 12/04/2015 11:25:32 - Revision: 3.1

Microsoft Windows NT Advanced Server 3.1, Microsoft Windows NT Workstation 3.1, Microsoft Windows NT Advanced Server 3.1, Microsoft Windows NT Workstation 3.5, Microsoft Windows NT Server 3.5

  • kbnosurvey kbarchive KB130694
Feedback