Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Now when I copy anything to my flash disk it’s done in ... a flash! For instance, I just copied a 14 MB file, which previously would have taken several minutes to copy from my hard disk to flash disk, in less than 3 seconds. The KDE progress dialog almost didn’t have time to come up! I could hardly believe it.
So, that dismisses my theory that (a) copying files to flash disk in Windows is much faster than it is in Linux (if anything, Linux seems faster – I'll have to test it), and (b) copying from a Linux filesystem such as reiserfs to the vfat system is slowed down by the need for some kind of conversion from one filesystem to the other.
So what does this mean? I have my own theories regarding block devices and HAL, which may or may not be wide off the mark. But that is for you gurus out there to say. What exactly is going on here? (My usb version is 1.1; I guess 2.0 would knock my socks off).
P.S. I must admit that the slow copying (or moving) of files from hard disk to flash disk was becoming a real show-stopper for me. Creating a /dev/sda entry in /etc/fstab was a practice I carried over from my 2.4 kernel days. To think that I was reluctant to migrate to the 2.6 kernel because it was too “bleeding edge” (thanks a lot Patrick Volkerding )!
Type in "mount" by itself and see what mount options the system used. It was probably the "sync" option that caused the problem. However, the speed you are seeing are probably writing to the cashe. It can still take a long time for the flash memory to catch up.
Code:
/dev/sdb1 on /mnt/xmas type vfat (rw,noexec,nosuid,nodev,noatime,flush,uid=1000,gid=1000,fmask=117,dmask=007,utf8,shortname=lower)
For flash memory, you want the "noatime" option to reduce the number of accesses. It will speed things up and increase the life of the memory.
the speed you are seeing are probably writing to the cashe.
To test jschiwal's theory, I picked a random file and copied it to my flash disk. As you can see, it took just a minute and a half to copy the fairly large (48 MB) file. Previously, this would have taken an hour or more!
Quote:
me@tuxilla:~$ du -h AdobeReader_enu-8.1.1-1.i386.deb
48M AdobeReader_enu-8.1.1-1.i386.deb
me@tuxilla:~$ time cp AdobeReader_enu-8.1.1-1.i386.deb /media/disk/
real 1m34.282s
user 0m0.016s
sys 0m1.264s
I doubt that caching is the explanation for the increase in speed. And I did eject the flash disk immediately after copying was completed to establish that there wasn’t anything going on in the background.
P.S. I shall test using the old method, with the noatime option and without sync. I doubt that it will make an appreciable difference, but there’s only one way to find out!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.