Deleting files much...
 
Notifications
Clear all

Deleting files much slower than format!?

6 Posts
5 Users
0 Likes
398 Views
Adam10541
(@adam10541)
Posts: 550
Honorable Member
Topic starter
 

This is something that bugs me from time to time and I can't really think of a good reason why.

If I have a hard drive with 10gb of data it takes many times longer to delete that data than what it does to do a quick format of the entire drive, yet the end result is the same isn't it?

 
Posted : 02/02/2017 7:15 am
(@badgerau)
Posts: 96
Trusted Member
 

Adam

You don't state what OS and what option has been chosen for deletion. It appears that your chosen method of deletion is overwriting the data to be deleted, hence why it takes longer than a quick format.

A quick format does not overwrite all the data. If you chose to full format and your choice of deletion is overwriting the data, then the time should be very similar.

 
Posted : 02/02/2017 9:12 am
Mark_Eskridge
(@mark_eskridge)
Posts: 50
Trusted Member
 

Adam,

If you think of it as individual computations or operations, the deletion of the entire MFT or FAT is a single operation, while the deletion of multiple individual files is a much more complex operation, wherein the MFT or FAT has to be updated for each individual and successive file deletion. But, yes, the results are the same.

 
Posted : 02/02/2017 9:21 am
minime2k9
(@minime2k9)
Posts: 481
Honorable Member
 

So the basic operations of a (quick) format for NTFS
Write new MFT, $Bitmap etc to disk
Update volume details and name

When removing a single file
Locate file record in MFT
Mark as deleted
Update $bitmap to show clusters as unallocated

Both very much simplified sequence, however it illustrates the point that the system has to read multiple sectors and in non-sequential order when deleting files as opposed to a format.

This effect will be amplified with a spinning disk compared to flash media due to the seek times of the actual hard disk.

 
Posted : 02/02/2017 12:04 pm
Adam10541
(@adam10541)
Posts: 550
Honorable Member
Topic starter
 

So the basic operations of a (quick) format for NTFS
Write new MFT, $Bitmap etc to disk
Update volume details and name

When removing a single file
Locate file record in MFT
Mark as deleted
Update $bitmap to show clusters as unallocated

Makes perfect sense put like that, thank you D

 
Posted : 08/02/2017 2:14 pm
(@athulin)
Posts: 1156
Noble Member
 

When removing a single file
Locate file record in MFT
Mark as deleted
Update $bitmap to show clusters as unallocated

Both very much simplified sequence, […]

Add 'remove file from directory structure' for added complexity. (Especially as non-resident directories are B-trees, and they may need to get re-balanced as deletions take place…)

 
Posted : 09/02/2017 12:40 am
Share: