Welcome! Log In Create A New Profile

Advanced

Copy files between usb drives on dockstar with Debian

Posted by davidnewton 
Copy files between usb drives on dockstar with Debian
June 07, 2011 09:57AM
It seems that the speed is very slow when I copy files between different drives on my dockstar running debian usng "cp -R" command. I have tried many different flash or hard drives with different formats (ext2, ext3, ntfs). When I use hdparm to check the speed for these drives, all of them can reach 20+ MB/s, but when I use cp command, I may get as low as 30kB/s. It is much faster when I copy the files to my pc through samba, then copy these files to another drive from the PC. I am wondering if anyone has the same problem and what is wrong? Thanks.



Edited 1 time(s). Last edit at 06/07/2011 09:59AM by davidnewton.
rat
Re: Copy files between usb drives on dockstar with Debian
June 08, 2011 03:50PM
There's a huge difference between cached read/write speeds and ACTUAL read/write speeds. A lot of USB thumdrives actually have trouble writing faster than 5MB/sec for long files. Small files (and lots of them) will drop your write speeds down below 0.5MB/sec.

When you use the CP command over a benchmark, the benchmark is writing one flat file (in addition to caching it), the CP command copies a file, updates the file table, copies a file, updates the file table... back and forth. Since the files you're copying are likely smaller than the flash's block size, that's an entire block that has to be rewritten in addition to the block that contains the file tables.
Re: Copy files between usb drives on dockstar with Debian
June 08, 2011 04:58PM
Also, check that your destination thumb/hard drive is mounted with async option.



Edited 1 time(s). Last edit at 06/08/2011 04:58PM by bodhi.
Re: Copy files between usb drives on dockstar with Debian
June 08, 2011 08:18PM
bodhi: Thanks a lot. With the option of async, the copy speed is normal now.

rat: Thanks for the information too. My problem is that even with large files, the speed is still very low. bodhi's instruction on mount option with async fixed the problem.



Edited 1 time(s). Last edit at 06/08/2011 08:20PM by davidnewton.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: