Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was trying to move some files into a folder (E: to E: so i'm pretty sure it's moving and not copying) but it's taking like minutes just to move some 60k files. I was under the impression that file moving is supposed to be really fast, so I was curious what does the computer have to do to move some files into a folder?

(I'm using Windows Vista Home Premium Sp2, but actually I was hoping to target the question in a broader way)

share|improve this question
    
It's a known issue with Vista... encrypted.google.com/… –  Joe Internet Sep 1 '11 at 2:20
4  
Actually that was a problem early on in Vista, it was cured with SP1, something else is wrong, run a chkdsk /r ..on the hard drive. –  Moab Sep 1 '11 at 2:32
add comment

1 Answer 1

up vote 3 down vote accepted

Even though you are just moving the files to a folder that is on the same disk, the filesystem still has to do a bit of work to move the files. The Master File Table (MFT) has to be updated to reflect the new location of the files, and the filesystem journal also has to be updated to allow changes to be rolled back in case the move is interrupted by a power outage, etc.

I'm not sure how to calculate exactly how many different things that the filesystem has to do, but we can assume that it will have to do at least 60k changes to the MFT. This many changes entails a lot of small reads and writes, which hard drives are not very fast at.

share|improve this answer
    
well i believe it took like 3 minutes, so do you mean to say every second it can only handle like 333 changes? –  Pacerier Sep 1 '11 at 3:37
    
Well, my estimation of 60k changes was very optimistic. I haven't been able to find a good source for this, but from memory I think that there are approximately 3 operations necessary for each file (making for ~180k total). (1) Write rename metadata to journal, (2) do actual rename operation, and (3) write that rename was successful to journal. This is a lot of work to do, and filesystems are very conservative in doing these things. So a number more like 1000 changes per second seems reasonable. Which isn't that bad given the number of operations that are necessary. –  cmorse Sep 1 '11 at 4:50
    
I almost forgot. Unless it has already been cached, the filesystem also has to compile a list of all the files and folders the need to be moved. –  cmorse Sep 1 '11 at 4:54
    
to confirm, you mean that moving 1000 1KB files is like 1000x slower than moving a 1GB file because afterall it's the number of files that matter and the size is arbitrary? –  Pacerier Sep 1 '11 at 5:19
    
Yes, that's what I was getting at. –  cmorse Sep 1 '11 at 6:15
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.