While copying large number of files, it's quite often to use multiple threads with RoboCopy (/MT[:n] option). Can this cause fragmentation on the destination drive? Sometimes I use Beyond compare for copying the file structures to maximum utilize the network/HDD bandwidth. This is also in a way of creating multiple threads. Can both of these cause fragmentation?
If you are unsure you can simply check the copied files if they are fragmented and if yes in how many fragments.
To check a file you can use "Contig" by Microsoft/Mark Russinovich which allows to check fragmentation using the switch
It should not cause any more fragmentation than a single-threaded copy operation which looks for the first available space and then the next and so on as it copies.
Any drive with high read/writes and larger or mixed-size files ought to be defragmented regularly, unless you're using a filesystem that prevents fragmentation.
If you are very concerned about fragmentation, you should consider the benefits you gain by using multithreading (extreme benefit for large numbers of files, less benefit for few larger files) versus any performance hit you may experience from possible fragmentation.
(Not an answer, but as a new user it appears that I can't directly comment on previous answers.)
In response to music2myear, multithreaded copies that do not preallocate space can indeed lead to to extreme fragmentation.
The scenario is this: fileA begins copying to block N on the disk. fileB begins copying to block N+1 on the disk. fileC begins copying to block N+2 on the disk. fileA needs another block, and copies to N+3. fileB needs another block and copies to N+4. And so on... until every file is completely fragmented, with no two blocks contiguous. fileA ends up being on blocks N,N+3,N+5,N+10,N+13 rather than N,N+1,N+2,N+3,N+4.
OK, so that's a little extreme; it probably doesn't become completely fragmented. But it illustrates the problem with multithreaded copy utilities that don't preallocate space. That said, I just tried the robocopy included with Server 2008R2 to copy a large number of files of varying sizes, and it didn't seem to create excess fragmentation. (Previous versions of robocopy were known to cause extreme fragmentation.) More testing is necessary.
i have seen this:
i had also Tried with robocopy and no success, still fragment it.
if i try to defragment after copy, nothing is done.
How to avoid it? I got it by doing some extra steps... and using XCOPY /J command...
I got it by doing this:
I had tried with "copy" and "robocopy" without succed.
I had tried with "XCOPY /J ... " and succed!!!
Why? i do not know... but at least with "XCOPY /J ... " and worked when dest name was changed!!!
It seems like Windows is doing some abnormal things when dest name is some kinf of special name.
To see what i mention just try to use a FAT32 4113MB partition to hold a 4095MB pagefile.sys!!! and try to have it on just one fragment!!! no way to do it normally!!! but, hey, if from a console you re-format the partition and use XCOPY /J pagefile.sys E:AAA and then rename it... it stays in one fragment!!!
Hope this can help other people!