On Sunday, 8 April 2012 at 16:14:05 UTC, Jay Norwood wrote:

There are signficant improvements also in copy operations as a result of defrag by Name. 43 seconds vs 1 min 43 secs for xcopy of sorted 2GB vs unsorted.


this is the 2GB folder defragged with sorted LCN by pathname
G:\>cmd /v:on /c "echo !TIME! & xcopy /q /e /I tz h:\tz & echo !TIME!"
12:28:15.30
34119 File(s) copied
12:28:58.81


this is the same 2GB folder, but not defragged
G:\>cmd /v:on /c "echo !TIME! & xcopy /q /e /I tz h:\tz & echo !TIME!"
12:34:10.58
34119 File(s) copied
12:35:53.14

I think it is probable you would see a large part of this improvement if you sorted accesses by LCN, so you would need to have support for looking up the lcn for a directory entry.

This guy has made c# wrappers for some of the ntfs defrag api. It includes looking up the lcns for a filename. We would just need the first lcn, and sort accesses by that. After unzip, there were only 300 of the 34000 entries that were fragmented, so my guess is just sorting accesses by the start lcn would provide most of the benefit that would be achieved by reorganizing the files with the defrag by filename.

http://blogs.msdn.com/b/jeffrey_wall/archive/2004/09/13/229137.aspx

Reply via email to