Pen Drive Speed problem

oneeye_72

Honorable
Jul 14, 2012
116
0
10,690
As I haven't used a pen drive in 2 or 3 weeks, I don't know exactly when the problem started! I think it may be related to a Linux mint update, as I have had quite a few to install (via shield pop-up) over the last few weeks.
Yesterday, when I tried to transfer a 3.3Gb file from my hard drive to a pen drive, the 'file operations' pop-up showed; first a tremendous speed (in the 100's of Mb's) quickly slowing down and dropping below it's normal speed of about 50 Mb/s, all the time the shown speed reducing at a slower and slower rate, while the 'time to completion' went from reducing to increasing, eventually going back to reducing again. The time till 'time to completion' showed zero, took maybe 10 minutes (I didn't time it), but after it had reached zero, instead of the 'file operations' pop-up disappearing as it usually did, it stayed there for a further 3.5 minutes before closing (I did time that). The odd thing is that; a transfer of the same file from the pen drive back to the hard drive works as expected.
I have confirmed that it is not a hardware problem; by trying different pen drives of different makes and sizes, on different hard-drives and also on different machines (with completely different H/W), the only thing in common being Mint 17.0 O.S. on both machines. Same problem every time!
Anyone with the same problem, or am I just unlucky?

Thanks in advance for any help.
 
Solution
Sounds pretty normal to me - that's how it's always worked on my Gentoo systems.

I'd guess that one of the Mint updates may have changed the I/O policy for USB media so that writes are buffered then the cache is flushed when the file is closed (which in this case is when the file copy completes). That has the effect of causing the file to be read in at hard-drive speed and cached in memory so the flash drive gets further and further behind (most pen drives, even USB3 ones, don't have very fast write speeds). When the copy is completed and the output file is closed, the system has to wait for all the buffered data to be written to the pen drive before it can finish the "file close" operation.

Prior to the updates, I suspect that the...

molletts

Distinguished
Jun 16, 2009
475
4
19,165
Sounds pretty normal to me - that's how it's always worked on my Gentoo systems.

I'd guess that one of the Mint updates may have changed the I/O policy for USB media so that writes are buffered then the cache is flushed when the file is closed (which in this case is when the file copy completes). That has the effect of causing the file to be read in at hard-drive speed and cached in memory so the flash drive gets further and further behind (most pen drives, even USB3 ones, don't have very fast write speeds). When the copy is completed and the output file is closed, the system has to wait for all the buffered data to be written to the pen drive before it can finish the "file close" operation.

Prior to the updates, I suspect that the I/O policy was for unbuffered I/O to USB devices so the copy proceeded at the write rate of the pen drive - slowly but steadily - and, because no data was being buffered, the system was able to close the file and indicate completion of the operation more or less immediately when the copy finished.

Stephen
 
Solution