Yesterday evening, I was just going through one of the customer problem. He was having aproblem with Flashbackup backup job that was stalled. Most of the time, It wasstalled during the time when NBU was mapping information of the file system orJust the mapping was literally too slow. Interesting enough! But after theyformatted the drive, copied the data back on the server, took fresh back-up andwow, the problem was somehow resolved.
Norewards for guessing, how it was resolved. It was the MFT file that was highlyinternally fragmented and it was causing the problem, but you can’t format yourdrive daily? Can you?
MFTis master file table. MFT is special file in NTFS which exists per volume andalways has inode number zero. MFT file is actually an array of indices.Each MFT index has size of 1K. Each file on NTFS volume has one index entryassociated in MFT.
Sometimesthe MFT file has internal fragmentation. Few MFT indices are unallocated inbetween allocated indices.
Considerfollowing MFT file:
|Allocated Indices | Unallocated Indices |Allocated Indices |
|0 1000 |1001 2000 |2001 3000|
Whenstandard DeviceIOControl code FSCTL_GET_NTFS_FILE_RECORD is used to retrieveunallocated index say 1500, the API internally goes on reading all indices tillallocated index is found. In above case if index 1500 is requested then the APIwill read all indices between 1000 and 1500 and will eventually return index1500 and still Unallocated. This produces a performance hit.
Insuch scenarios reading directly from volume is way more efficient. FlashBackupprovides you a Registry hack (another way to read MFT). We call it as“DirectRead” because standard DeviceIOControl codeFSCTL_GET_NTFS_FILE_RECORD gets used only once and later all MFT indices areretrieved using pure volume read. Use the smartest way to Back-up your data.Now the question is how to enable it?
AddFollowing Registry Key:
AddDword value called DirectRead Give it a value of 1.
Other choices: Defragmentation can be a option and mayimprove the performance.
There are lot of scenario where you can see FlashBackup isnot doing fast mapping and look like has slowed down from past. Watch out thisspace for the discussion.
The Next Discussion: Mapping is too slow with flashbackup.Look at your exclude file list. Do you really want to exclude 50% of the drive?Finding the fish in a large pond with millions of fish and mark it not tobe fished. Not a great Idea.