Mark Russinovich explains the file copy improvements in Windows Vista SP1

An interesting blog post from Microsoft Fellow Mark Russinovich:

Windows Vista SP1 includes a number of enhancements over the original Vista release in the areas of application compatibility, device support, power management, security and reliability. One of the improvements highlighted in the document is the increased performance of file copying for multiple scenarios, including local copies on the same disk, copying files from remote non-Windows Vista systems, and copying files between SP1 systems. How were these gains achieved? The answer is a complex one and lies in the changes to the file copy engine between Windows XP and Vista and further changes in SP1. Everyone copies files, so I thought it would be worth a dive deep into the evolution of the copy engine to show how SP1 improves its performance.

Copying a file seems like a relatively straightforward operation: open the source file, create the destination, and then read from the source and write to the destination. In reality, however, the performance of copying files is measured along the dimensions of accurate progress indication, CPU usage, memory usage, and throughput. In general, optimizing one area causes degradation in others.

During Vista SP1’s development, the product team decided to revisit the copy engine to explore ways to improve both the real and perceived performance of copy operations for the cases that suffered in the new implementation. The biggest change they made was to go back to using cached file I/O again for all file copies, both local and remote, with one exception. With caching, perceived copy time and the publishing scenario both improve. However, several significant changes in both the file copy algorithm and the platform were required to address the shortcomings of cached I/O.

One final SP1 change worth mentioning is that Explorer makes copy duration estimates much sooner than the original Vista release and the estimation algorithm is more accurate.

Discuss this Article 10

Sir_Timbit
on Feb 5, 2008
All good news. For me anyway, this was one of my main issues with Vista and I'm glad to hear it's been redone. The few times I used Vista, I'd get so ticked as I would map a share to my XP laptop. Whenever I'd try to copy a number of folders, the amount of time Vista would just sit there calculating time needed to copy was longer than what XP would take to complete the copy operation! I had some other weird issues with network copying, where Vista would suddenly lose access to the share, even though the share was still listed in 'Computer'. Yet once again, I could always connect to the Vista machine from my XP box and copy from there no problem....
daveinla
on Feb 5, 2008
Anybody can comment on that ? Is Vista really slow to copy files or is it another of these Vista myth ?? Reminds me of an article found once in El Register: http://www.theregister.co.uk/2007/12/20/more_vista_copying_problems/
daveinla
on Feb 5, 2008
"The few times I used Vista, I'd get so ticked as I would map a share to my XP laptop. Whenever I'd try to copy a number of folders, the amount of time Vista would just sit there calculating time needed to copy was longer than what XP would take to complete the copy operation!" That itself justify returning back to XP... When I think that people were complaining with OS X 10.0 !!!
brandon.pope
on Feb 5, 2008
I have noticed some issues with copy times over a network only. Still there were way more great improvements over XP to justify switching back. And now they are fixing this and more issues so things are looking up.
xtreem0
on Feb 5, 2008
well lets just say before sp1 file copys were piggishly slow. Now with the service pack it seems trying to copy files are faster then XP dose which is a huge improvement in my opinion. About... (compared to without the service pack... a file that took over 2hrs before to copy now only took 35min.) wow... i have no idea what they changed but man it worked.
Auras
on Feb 5, 2008
I don't know what was in their mind to try to calculate how much time it will take to copy something BEFORE even trying to copy the file to see the real speed.
pmcgrath
on Feb 6, 2008
Well, this is good news. However I also find it troubling. Going back to DOS, the primary job of the OS is to move data from, disk-to-memory, disk-to-disk, and, with the addition of LANs, disk-to-network. Every time the OS is upgraded, this should be one of the things at the top of the list for improvement. I can’t understand why no one at Microsoft said “Hey, did anyone else notice how slow Vista is compared to XP when moving data?” Having to put out a SP to improve file copy performance to “acceptable” only helps to prove all the Vista haters out there. I guess the biggest problem I have with this is it seems that the file copy issue is just one symptom of how Microsoft lost focus on Vista. From reading the blog post, “In reality, however, the performance of copying files is measured along the dimensions of accurate progress indication, CPU usage, memory usage, and throughput. In general, optimizing one area causes degradation in others.” Obviously, they did not make the correct decision on the optimizing. At this point in the game, Microsoft should not be making these kinds of mistakes. I have no problem with the fact that Vista is a resource hog. RAM is cheap and dual core processors are the norm. However, if I’m going to give the OS what it wants, it better damn well perform and do something with the extra power. In a lot of ways, Vista fails to do that.
ibarskiy
on Feb 6, 2008
pmcgrath, if you read Russinovich's post some reasons of why things were the way they were become apparent. You have a very narrow and incorrect view on what an OS's functions are, by the way.
pmcgrath
on Feb 7, 2008
Ibarski, my view of the functions of the OS are not nearly as narrow as my post would infer. I meant to say “one of the primary jobs of…” Slight brain to keyboard error. But in my mind, disk IO is one of the corner stones of the OS. It wasn’t called DOS for nothing. I read the full post, and it’s all great and wonderful but the conclusion pretty much sums it up for me. “File copying is not as easy as it might first appear, but the product team took feedback they got from Vista customers very seriously and spent hundreds of hours evaluating different approaches and tuning the final implementation to restore most copy scenarios to at least the performance of previous versions of Windows and drastically improve some key scenarios.” I stand by my first post. Microsoft lost focus. They should not have had to reengineer something as important as disk IO, post RTM, to bring it up “to at least the performance of previous versions of Windows.”
ibarskiy
on Feb 7, 2008
Well, I did kind of understand that in today's world of abundant resources (from the historical perspective), there are more considerations to a simple copy than open file for read - create file for write - read - write - close files. I think that's what the discussion highlighted. And these complexities create new problems. Yes, I guess they did make the wrong trade-off, but that's what it was, a trade-off. So no, I don't think it's fair to compare it to DOS, and even less so to look too much into what DOS stands for. How about CP/M (which is what, many argue, Bill Gates plagiarized in creating DOS), or UNIX, which was a pun in the first place. And again, clearly, both the hardware and our expectations of what an OS does have evolved since then. Interestingly, UNIX, even at that ancient (in computer age) time was a very, very soundly designed and sophisticated system.

Please or Register to post comments.

IT/Dev Connections

Las Vegas
September 30th - October 4th

Paul ThurottYou'll have the opportunity to experience:
• 120 Technical
Sessions
• Networking with Peers
• Expert Speakers


Come See Paul Thurrott & Mary Jo Foley in Person!

Register Now

Office 365 InfoCenter

Get the latest insight and info from Paul

Read Now!

What I Use