Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 23, 2013, 10:10:17 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Controlling the size of the MFT Reserved Zone during a defrag  (Read 8534 times)
TAC109
JkDefrag Senior
****
Posts: 46


View Profile
« on: March 21, 2009, 10:45:57 pm »

On XP, the default (and smallest) size of the MFT Reserved Zone is 12½% of the partition size. Is it possible in a MyDefrag script to specify a smaller size for the MFT Reserved Zone when running the defrag? If not, could you consider making this feature available in the future?


On fairly static partitions with only a small percentage of file changes it seems rather wasteful to have such a large MFT Reserved Zone which will never be used for that purpose. There is also the disadvantage that a large MFT Reserved Zone near the beginning of the partition has the effect of locating files above the Zone further towards the slower end of the disk.

Many thanks for your amazing program!
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #1 on: March 21, 2009, 11:07:04 pm »

Thanks for sharing your thoughts, I appreciate it. The reserved area is a Microsoft setting that is applied when a disk is formatted. Windows can sometimes somehow change the size of the area, but it's an automatic thing deep inside Windows and as far as I know there is no (documented) function call in Windows that programmers can use to change the area.
Logged
poutnik
JkDefrag Hero
*****
Posts: 1105


View Profile
« Reply #2 on: March 21, 2009, 11:18:54 pm »

http://www.ss64.com/nt/fsutil.html
( or http://www.windowsnetworking.com/kbase/WindowsTips/WindowsXP/UserTips/Performance/ReserveSpacefortheMFT.html )

If you have a lot of small files, you may need a larger Master File Table to avoid MFT fragmentation:
FSUTIL behavior set mftzone 2 will reserve 25 % of the volume for the MFT.
1 = 12.5 %(default),
2 = 25%
3 = 37.5%,
4 = 50%

So only more, not less. But sometime, when using partition resizing, or maybe if MFT is moved,
then MFT reserved zone is changed.

E.g. My MFT reserved zone in vista is very neglible.
Logged

It can be fast, good or easy. You can pick just 2 of them....
Treating Spacehog zone by the same effort as Boot zone is like cleaning a garden by the same effort as a living room.
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #3 on: March 22, 2009, 12:00:44 am »

Please note that the fsutil setting is only used when formatting a volume. It does not change existing volumes.
Logged
TAC109
JkDefrag Senior
****
Posts: 46


View Profile
« Reply #4 on: March 22, 2009, 04:18:35 am »

... as far as I know there is no (documented) function call in Windows that programmers can use to change the area.
Yes, I appreciate that. I'm not suggesting that you try to control Windows, rather that MyDefrag, when vacating the MFT Reserved Zone, would obey a parameter in the script so that the user could define the size required, and MyDefrag could place files for the next defrag zone immediately following.

My experiences with the MFT Reserved Zone (on XP) is that in general it runs from the end of the MFT along to the next file, or 12.5% of the partition, whichever gives the smaller size. Also, it's maximum size is calculated only at boot time, so it is possible to manually delete files which are currently in the MFT Reserved Zone 12.5%, and the zone will not increase in size until the next boot. (I have verified this by experiments done on my system.)

I have personally reduced the size of the MFT Reserved Zone on my system by using a 'filler' utility to fill up the partition with temporary files such that they eventually get written to the MFT Reserved Zone, which has the effect of reducing it in size, then deleting the temporary files, then running your old JkDefrag program to optimise the real files up against the end of the new MFT Reserved Zone.

I hope you see where I'm coming from, here.
Thanks again.
« Last Edit: March 22, 2009, 04:22:29 am by TAC109 » Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #5 on: March 23, 2009, 09:23:28 am »

that MyDefrag, when vacating the MFT Reserved Zone, would obey a parameter in the script so that the user could define the size required, and MyDefrag could place files for the next defrag zone immediately following.
Sorry, but the Microsoft defragmentation API does allow MyDefrag to move files into the reserved zone. Only out of.

Quote
reduced the size of the MFT Reserved Zone on my system by using a 'filler' utility
Yes, I know about that trick. But I don't think I should build something inside MyDefrag to do that. It could cause serious problems on running computers, especially servers. MyDefrag is able to move the MFT on XP and Vista, and the default scripts place the directories immediately after the MFT. On the next reboot Windows recalculates the reserved zone and makes it smaller, as you have noticed. I don't know what rules Windows uses exactly, but over here on my Vista machine right now the reserved area is less than 0.4 percent. So I don't think there is a need anymore for the filling-up trick.
Logged
TAC109
JkDefrag Senior
****
Posts: 46


View Profile
« Reply #6 on: March 23, 2009, 09:37:47 pm »

Thanks for your reply. I understand how MyDefrag handles the MFT Reserved Zone much better now.
Logged
HolyMan
JkDefrag Hero
*****
Posts: 166


View Profile
« Reply #7 on: March 25, 2009, 03:06:19 pm »

The reserved area is a Microsoft setting that is applied when a disk is formatted. Windows can sometimes somehow change the size of the area, but it's an automatic thing deep inside Windows and as far as I know there is no (documented) function call in Windows that programmers can use to change the area.
A bit beside the point maybe, but I noticed that MyDefrag can at least move 1 MFT zone.
It seems the zones are automatically assigned at boot following the last sector of the files $MFT, $LogFile and $Bitmap. They seem only to work as an aid for automatic defrag of those files by Windows (XP in my case). At least I conclude that after observing what happened when I moved the $MFT file.
Obviously this means that MyDefrag might be able to force manipulate the MFT-zone size as soon as it can also move the $LogFile and $Bitmap.
Logged
HolyMan
JkDefrag Hero
*****
Posts: 166


View Profile
« Reply #8 on: March 25, 2009, 03:32:22 pm »

Please note that the fsutil setting is only used when formatting a volume. It does not change existing volumes.
I just changed the setting and I saw no effect on the MFT size after reboot. So I guess you are right.
Logged
tigeri
Newbie
*
Posts: 2


View Profile
« Reply #9 on: March 31, 2009, 09:41:04 am »

As I understand it right, it is not possible to move $MFT through Microsoft defragmenting api when running ntfs on Windows XP.

My situation is the following: I have a 2 TB ntfs volume which contains almost only huge files and the system is optimized for high throughput. However, the files are on the volume in a suboptimal way since the beginning of the disk is the fastest part, see the following image:



As you can see, in the beginning of the volume is the MFT, then directories and after a little free space there is the $logfile. After that the MFT reserved area occupies next 250 GB (!) (12.5 %) of the volume (dark blue) and that area is the fastest area of my volume. This seems ridiculous since the size of my MFT is about 100 MB and the $logfile is ~67 MB. And then, a whopping 250 GB of reserved space for MFT and logfile growth.

So, I am looking for a solution which makes it possible to move the MFT (and the reserved zone) to the middle (or even end) of the volume so that I can take full advantage of the fastest part of my volume. Do you have any suggestions? Thanks in advance.
« Last Edit: March 31, 2009, 09:43:56 am by tigeri » Logged
jonib
JkDefrag Hero
*****
Posts: 810


View Profile
« Reply #10 on: March 31, 2009, 10:17:09 am »

As I understand it right, it is not possible to move $MFT through Microsoft defragmenting api when running ntfs on Windows XP.
Well MyDefrag is perfectly able to move the $mft on Windows XP(sp2), see FastOptimize.MyD for an example.
Quote
So, I am looking for a solution which makes it possible to move the MFT (and the reserved zone) to the middle (or even end) of the volume so that I can take full advantage of the fastest part of my volume. Do you have any suggestions? Thanks in advance
If you want to move the $mft(and hopefully the reserved area) you need to use a SetBeginOfZone() before FileSelect to specify where you want it, but you have to specify any zones that you want to place before, before the $mft zone.

jonib
Logged

tigeri
Newbie
*
Posts: 2


View Profile
« Reply #11 on: March 31, 2009, 12:20:28 pm »

Well MyDefrag is perfectly able to move the $mft on Windows XP(sp2), see FastOptimize.MyD for an example.

If you want to move the $mft(and hopefully the reserved area) you need to use a SetBeginOfZone() before FileSelect to specify where you want it, but you have to specify any zones that you want to place before, before the $mft zone.

jonib
Thanks for your reply! It was my misbelief. Now I did my first MyD script (after reading some documentation) and I found that the scripting abilities of MyDefrag are great! I managed to get rid of the MFT reserved zone in the beginning of volume. Thumbs up to Jeroen for writing this marvellous piece of software.
Logged
Big Z
Newbie
*
Posts: 1


View Profile
« Reply #12 on: April 03, 2009, 02:29:15 pm »

Hi

Newbie here...
I have been following this post and others related to $MFT file and MFT Zone.  I have a X64 Vista system and when I tried to shrink the volume found that I could only go so far until I bumped into system files.

On my XP 32bit systems I can use MyDefrag and Pagedfrg to iterativly move the $MFT and MFT Zone to the front of the disk (good for my purpose, though I think I see the point of having this elsewhere).  I first use MyDefrag to push out files and relocate the $MFT, then ran Pagedfrg to move up the mft zone, then Slow Opt to put things back together.  Had to run some of this multiple times (dont't have a repeatable process yet).

On my x64 Vista Pagedfrg does not work (per site, this is 2 yrs + old and not written for vista or other 64 bit)  I get an error indicating I need administrator privs, even though I have them and tried run as.  Ran the MS Defrag.exe -b from command promt in safe mode, but I do not think I could see a difference.  Trying to figure out if\how I can add this as a RunOnce in the registry, and if this would run like ChkDsk or Pagedfrg before the system loads to much.

This post implies (jonib) that there is a way to manupulate the MFT Zone with MyD script.  If any of you have been suceesful in this, would you be willing to share some code here or in the appropriate forum.

Thanks

Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #13 on: April 03, 2009, 02:35:22 pm »

when I tried to shrink the volume found that I could only go so far until I bumped into system files.
Take a look at the Gnome Partition Editor.
Logged
WindHydra
JkDefrag Hero
*****
Posts: 69


View Profile
« Reply #14 on: April 03, 2009, 03:23:28 pm »

It is not manipulating the MFT reserved zone directly, but in XP if you move $MFT the MFT reserved zone will follow after you dismount the drive.  On my machine, instead of putting the Directories right after $MFT as in the Fast Optimize script, I made a 0.5% zone between $MFT and the directories and then dismount the drive (or restart the computer for the C drive).  Now instead of one 12.5% reserved zone, there is one 0.5% zone after $MFT and 2 other zone (don't know how to get rid of those), totaling to <2%.
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!