Saturday, 28 April 2018

Is (Ubuntu) Linux file copying algorithm better than Windows 7?


Windows Copying is a real mess ever since Windows Vista. Even Microsoft claims they've improved the performance, from a user perspective, it's not quite visible. Even with single file the copying window appears too much time for 'Calculating' and then finishing the copy(Even after 100% completion some times the dialog remains active).


At the same time, I was backing up some files in Ubuntu Linux. I felt it's really fast. Might be a feeling caused by faster UI updates.


I read an informative post from Jeff Atwood few years back on Windows File Copying. but what my specific questions are



  • Is (Ubuntu) Linux file performance is better than Windows-7?

  • Are both algorithms, Windows and Linux is making use of multiple threads and pipelining mechanism to improve the speed? If yes, which one is better?



Answer



The standard copy builtin in Windows isn't very good, but Windows comes with two advanced commands that are far more efficient: xcopy and robocopy. Especially when you need full control over advanced filesystem features like ACLs or alternate data streams, robocopy is the tool of choice.


As an example, if you are copying a large directory structure, you may wish for the target to be unfragmented. The standard invocation of robocopy is already quite good at that, but since directory entries are updated as subdirectories get created, you can still get fragmented directories. To prevent that, you can run robocopy in two passes, the first of which only creates the target directory structure without copying any file content, and the second to actually copy the file bodies.


Altogether, robocopy is very efficient and fully aware of NTFS features.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...