When I connect my USB 2.0 drive to Xubuntu and try to transfer large files, transfer speeds are good at first but drop after a few seconds to 1-2 Mib/s. From what I read, the fast transfer at the beginning is just until the cache is full, then the real USB transfer speed is used.
In Windows, speed is constant at about 25Mib/s, same stick, connected to same port.
This is the output from dmesg when connecting the stick:
[ 5237.580084] usb 1-4: new high speed USB device using ehci_hcd and address 6 [ 5237.714318] scsi4 : usb-storage 1-4:1.0 [ 5238.713909] scsi 4:0:0:0: Direct-Access SanDisk Cruzer 8.02 PQ: 0 ANSI: 0 CCS [ 5238.715264] sd 4:0:0:0: Attached scsi generic sg2 type 0 [ 5238.727225] sd 4:0:0:0: [sdb] Attached SCSI removable disk [ 5242.308981] sd 4:0:0:0: [sdb] 31301631 512-byte logical blocks: (16.0 GB/14.9 GiB) [ 5242.309589] sd 4:0:0:0: [sdb] Assuming drive cache: write through [ 5242.311228] sd 4:0:0:0: [sdb] Assuming drive cache: write through [ 5242.311238] sdb: sdb1
The stick is automounted, here is the output of "mount":
/dev/sdb1 on /media/B82C-6B07 type vfat (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush)
I have to use vfat because I want to transfer files to my Playstation3 system. Althouth the test below shows, that this is not the main cause.
It seems this is a common issue in (X)ubuntu. I haven't found a clear solution yet. It seems that the stick needs to be mounted as async instead of flush but I'm not exactly sure how to achieve this. I don't mind if I have to unmount the stick each time before disconnecting it as long as the transfer speeds are better.
Nov 2: This bug report seems to be related: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/182931. What worries me is that the problem seems to be over 2 years old and still isn't solved.
Nov 10: I started a read-test with palimpstest (from gnome-disk-utility project). This gives me a minimal transfer rate of 23 MBit/s. Also tried it in krusader now, the read speed is constantly > 20 MBit/s. So the problem really is just writing to the stick!
Here is an image of a read-write test in the same program:
I had to delete the filesystem completely before the test which shows that vfat is not the main cause as mentioned above.
Another hint: If I transfer a 100 MB file, once it's at 100% it takes an unusual long time to actually finish the transfer. This again looks to me that the file is indeed in a cache but writing to the usb device is very slow.
Nov 12: "Good news". The problems seems to be memory stick itself. Trying an external harddrive (My Book Elite 1TB) gives me constant write speed of about 20 MiB/s. I first tried to reformat my memory stick so I can really compare the two (file sytems were different). After reformatting, both drives are mounted exactly the same way:
/dev/sdb1 on /media/My Book type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions) /dev/sdc1 on /media/cruzer_ type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
Cruzer is the stick (speed still dropping after a few seconds), My Book is the external harddrive with a constant write speed of 20 MiB/s.
Hard to say what the problem really is then. As I said, in Windows I get equally fast write speeds with the SanCruzer too.
Edit at end of bounty: Unfotunately, the problem with the stick is still not solved. However, after 7 days I want to award the bounty of course. The comment from aking1012 was really helpful as it shed a new light on the matter. However, I feel that I have to give the bounty to harrymc as he showed the most effort of getting the problem solved. Thanks all.