Ask Leo! by Leo A. Notenboom

Can I adjust some master NTFS table size to handle large number of files better?

Search First! Then browse: Categories | Full Archive | By Date | Newsletter

Home » Windows » Windows Configuration

Summary: The Master File Table is used by the NTFS file system to track how files are laid out on disk. The layout of the MFT itself can impact performance.

I've heard that in NTFS there are some master tables whose size can be changed to handle large numbers of files better. I generate lots of files. How do I increase these table(s) and when?

You're thinking of the MFT or Master File Table. By default 12.5% of your hard disk space is set aside for the MFT when an NTFS drive is formatted.

If the system later needs to make the MFT larger, it will. The problem is fragmentation. Chances are very high that if the MFT grows, then it will be fragmented. Apparently it's also common that if you converted a drive from FAT to NTFS, the MFT is may be fragmented from the start. Unfortunately the defragger that is part of the operating system cannot defrag the MFT.

So is 12.5% enough? If not, how much is enough? Microsoft, in their support article How NTFS Reserves Space for its Master File Table (MFT) doesn't give any guidelines, and suggests experimenting to determine the optimal setting for your system.

But I'll make a wild approximation.

Your MFT needs are primarily a function of the number of files you'll generate and the size of your NTFS partition. MFT entries range in size from 1 to 4k, so if we assume the 4k maximum then that 12.5% on a 60 gigabyte drive can hold entries for just under 2 million files.

There is a registry setting that can be changed such that all future reformats of NTFS drives will set aside more MFT space. The instructions for changing that setting are included in the Microsoft support article I referenced above.

By the way, if 12.5% seems like a lot of space to be dedicating to the MFT, it may not be as bad as you think. Small files, I'm guessing 2k or less in size (it varies), actually reside within their MFT entry. It's only larger files that need any space outside the MFT.

So the bottom line: if you can, FORMAT, don't convert, your drives to NTFS, and if you think you'll need a larger MFT, change the registry setting before you format. If it's too late, then there is one commercial program, Diskeeper from Executive Software, that can defrag your MFT.

In addition to the Microsoft Support article I referenced above, the following resources may also be helpfull:

  • PureNetworking has a very nice article on optimizing disk access for Windows NT and XP.
  • Windows-Help.net has a good overview overview of the of the NTFS filesystem.

Article C1829 - August 12, 2003

Helpful? Get new articles weekly by email in my FREE newsletter!

Your Name:
Your Email:


Why Subscribe?

Recent Comments
14 Comments

I'm told that Windows XP sends reports to Microsoft about what files are on your comp, what you are accessing. Is this true? I'm kinda paranoid, so if I am accessing stuff, I don't like the idea that everything I do is monitored. Is it true? And if so, can it be disabled?

Posted by: Kain at May 25, 2004 9:36 AM

To the best of my knowledge they do NOT. If any information is collected at all, it is done anonymously ... meaning there's no way to track it to the computer that it came from, and even then it's only after they've explicitly asked for your permission to do so.

Everything you do it most certainly NOT monitored by Microsoft. Even they don't have the computing power to monitor millions of Windows users.

Posted by: Leo at May 25, 2004 9:48 AM

My windows Installer is broken. I can't install some programs. I am running Windows XP. If there's a way to fix this without doing a PC Recovery, then i'd appreciate it.

-Joe

Posted by: Joe at May 27, 2004 12:04 PM

First thing I would do is run the System File Checker. http://ask-leo.com/archives/000074.html

Good luck!

Posted by: Leo at May 27, 2004 7:04 PM

Leo, Just the article I was looking for regarding the 12ยท5% default size for the MFT.

I am now using Diskeeper 9 which includes Frag-Guard and had to use Frag-Guard to pad the MFT on one drive partition, since when the entire drive has been running better.

I also followed the advice to run a small paging file on drive C: (the OS drive) as well as a large fixed paging file in its own partition. Easier to format if it is corrupted.

You'll find that Raxco's Perfectdisk v6 will also defrag the MFT and has a one-click setting for doing all drives.

I haven't tried O&O.

What would be a good idea, in my estimation, is a system whereby the used file goes back to its original location.

I can certainly recommend using both Diskeeper 9 Professional and Frag-Guard.

Thank you again for the article.

Iain McGregor Lees.

Posted by: IML at October 19, 2004 11:43 PM

hello peeps

Posted by: julia at October 27, 2004 5:32 PM

A few details here are wrong. The size of each MFT entry is fixed once the drive is formatted. Usually 512 or 1024 bytes, not 4K as suggested here. The actual size of both the entire MFT and each MFT entry is conveniently reported by chkdsk, so there is no need to guess for any actual disk in question.

The percentage reserved through the registry for MFT use is not truly reserved in the sense that the disk fills up more quickly, it is only reserved in the sense that as long as there is at least one free cluster outside the MFT zone, files that grow will grow into those files, not those within the xx% margin from the start of the MFT. This reduces the risk of a fragmented MFT as long as free disk space does not drop below those xx%.

If xx% is set larger than the free space, the risk of a fragmented MFT increases dramatically, even if the MFT is actually much smaller than xx%. If the MFT gets bigger than xx% the same happens. So try to put the xx% selection strictly between the actual MFT size reported by chkdsk and the percentage of free disk space.

Oh, and one of the other posters was correct: The xx% does not affect the format command and is not stored on disk. It doesn't even survive a simple reboot, it just affects which free cluster will be used first by the code in NTFS.SYS, until the next time the registry entry is read by NTFS.SYS (which is at reboot and possibly other times).

Posted by: Jakob B at May 7, 2005 9:49 AM

I copied the contents of a drive to another so that I could format the first drive and now that I've done so and moved everything back, I've found that I have a large 4 gb (my size choice) MFT on both drives. How do I get rid of the one I don't want?

Posted by: GSellars at September 8, 2005 4:02 AM

actually I am wondering if there is any 'rule of thumb' for creating a larger MFT or determining if the default size is enough. I am working with a 4 terabyte raid volume that is currently 2,350 GB in use. The XP defragger reports a total MFT size of 304 MB with 311,559 record count.
Total files is 303,575 with average size of 8MB. The article appears to refer to more general drive space requirements for smaller drives (60 gigs). I have larger space requirements due to the specific applications in use and the data required.

Posted by: David at October 9, 2005 8:15 PM

Good article, saved my bacon!
The reference to Diskeeper was invaluable -- I don't like to manually intervene in the registry.
Cheers!

Posted by: LaoziSailor at December 3, 2008 4:35 PM

Post a comment on "Can I adjust some master NTFS table size to handle large number of files better?":






(Email Address will not be published.)

Remember Me?

By popular demand...
my tip jar
Cuppa Joe
Buy Leo a Latte!

(you may use HTML tags for style)

RSS feed Subscribe to the RSS Feed specifically for comments on this article.

Before commenting, please...

  • Read the article at the top of this page. If your comment shows you didn't, it'll be deleted and ignored.

  • Comment only on this article. Use the Google search box at the top of the page if you have a question about something else.

  • Don't include personal information in the comment. No email addresses. No phone numbers. No physical addresses.

  • Don't spam. Excessive links to unrelated sites within a comment or across multiple comments will cause all such comments to be removed.

  • Don't ask me to recover lost passwords or hacked accounts. I can't, and those comments will be deleted.

  • I can't respond to every comment. And I can't vouch for the accuracy of others who do.

Please wait. Your comment is being processed ...


Question? Ask Leo!