Compacting the "master file table"

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15615
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Compacting the "master file table"

Post by ChrisGreaves »

This MSDN page tells me that

"As files are added to an NTFS file system volume, more entries are added to the MFT and the MFT increases in size. When files are deleted from an NTFS file system volume, their MFT entries are marked as free and may be reused. However, disk space that has been allocated for these entries is not reallocated, and the size of the MFT does not decrease."

and that

"The default MFT zone is calculated and reserved by the system when it mounts the volume, and is based on volume size. You can increase the MFT zone by means of the registry entry detailed in Microsoft Knowledge Base Article 174619, but you cannot make the default MFT zone smaller than what is calculated. Increasing the MFT zone does not decrease the disk space that users can use for data files."

I think that I get that.
Untitled.png
Defraggler 2.21.99(64b) tells me that my TrueCrypt Encrypted drive has about 210MB allocated to this table. This for 171,000 files in 14,000 folders occupying 219GB.

FWIW that suggests about 1,000 bytes per file, which seems to me to be a lot. Unless I'm failing at arithmetic again.

Despite what everyone else says, I am not paranoid about space, but am idly wondering whether a periodic copy-out and copy-back-in would make the $MFT significantly more efficient in terms of space or, perhaps, lookup-time.

I have oodles of space on my encrypted partition, and am retired with mugs of tea and coffee to hand.
It's just that seeing a 200MB file lying there and learning that it can grow like yellow slime-mold in a vermicomposter got me to wondering.

Thanks
Chris
You do not have the required permissions to view the files attached to this post.
There's nothing heavier than an empty water bottle

User avatar
HansV
Administrator
Posts: 78474
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Compacting the "master file table"

Post by HansV »

Disk space is cheap, I wouldn't bother. But if you really want to, Contig by Mark Russinovich can defragment the $MFT file. This does not reduce its size, but it should reduce the disk space it takes up.
Best wishes,
Hans

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15615
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Compacting the "master file table"

Post by ChrisGreaves »

HansV wrote:Disk space is cheap, I wouldn't bother. But if you really want to, Contig by Mark Russinovich can defragment the $MFT file. This does not reduce its size, but it should reduce the disk space it takes up.
Thanks Hans.
I quite agree about disk space.
It is over twenty years since i worked out that it was cheaper to hop in a car and drive across town to buy a new hard drive than to spend time working out what files could be deleted from my (then massive) hard drive.

I'm not all that keen on defragmentation in the first place, but periodically I do take a look at my drives just to see what is going on. The three purple lozenges in Defraggler's display made me curious.
This does not reduce its size, but it should reduce the disk space it takes up
Eh?
I suspect that this means that the allocated space is unchanged, but the portion of that allocated space actually in use is reduced.
Thus, my 210MB of allocated space might see only the first 100MB containing actually useful data (about my files) with 110MB being held "in reserve".

I am still struggling to understand the use of 1,000 bytes of data per file.

Cheers
Chris
There's nothing heavier than an empty water bottle

User avatar
HansV
Administrator
Posts: 78474
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Compacting the "master file table"

Post by HansV »

A fragmented file uses more disk space than an unfragmented file of the same size, since each fragment takes up a multiple of the disk allocation unit. But the difference is minimal, and anyway, Windows does its best not to left $MFT get defragmented.
Best wishes,
Hans

User avatar
John Gray
PlatinumLounger
Posts: 5408
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Re: Compacting the "master file table"

Post by John Gray »

I am not sure whether it is you or I who is/are puzzled.
* The "Truecrypt encrypted drive" has its own MFT.
* The Truecrypt container also appears as a file in the 'enclosing' disk partition, which has a MFT.

PS Defraggler is agonising slow for the larger partitions we have now. Once you prevent all the Unwanted Stuff that Auslogics Disk Defrag attempts to get you to install, you'll find that it defrags more rapidly.
That's if you want to do it at all!
John Gray

"(or one of the team)" - how your appointment letter indicates you won't be seeing the Consultant...

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15615
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Compacting the "master file table"

Post by ChrisGreaves »

John Gray wrote:That's if you want to do it at all!
Well, no, in general, I can't be bothered. At my age ...
... most of my disk-intensive jobs run overnight, so I don't care if it takes three hours or five hours.
I do puzzle over why my spreadsheet health.xls appears as 12 fragments when I change the data contents of three cells. And I have a huge area of unoccupied disk.
That might be a "feature" of TrueCrypt, but it seems to apply to Excel Workbooks more than any other file type.
Cheers
Chris
There's nothing heavier than an empty water bottle