Really slow file transfer from Ubuntu 18.04 to USB 2.0 pendrives

14,986

Solution 1

It's probably crappy USB drive. Cheap USB drives have a write speed of <15MB/s, some as low as 1-2MB/s. Want faster? Buy an more expensive one.

10 minutes for 2GB works out to approx. 3.3MB/s, which is reasonable for a cheap drive.

The reason it show a quick progress is memory caching. The file is only written at the end of the copy process, which tricks the UI into believing that copying is further along than it actually is.

(As a sidenote: I've even seen drives advertised as USB 3.0... and 5MB/s write speed!)

Solution 2

try to copy files from the command line to know if nautilus faults

cp /source-path/source-file /dest-part/dest-file
Share:
14,986

Related videos on Youtube

np_3ka
Author by

np_3ka

Updated on September 18, 2022

Comments

  • np_3ka
    np_3ka almost 2 years

    Every time I send files (almost 1-2GB movies) to my parents' pendrives I'm about to fall asleep. It's not pendrives fault because the other Windows laptop transfers at a fair USB 2.0 speed...

    I always send them through Nautilus: from 0 to 100 in seconds, then it gets stuck and remains for about 5-10 minutes, when it finally completes. It never occurs when I'm using 3.0 devices, speed is ok.

    I really think that's Nautilus fault, maybe connected to my architecture, I don't know, but that's really frustrating. Is there something I can do?

    EDIT: I just tried sending the same file through Nautilus and then with cp /source-path/source-file /dest-part/dest-file as suggested by @Bob91 and I found that it seems to take the same time to transfer 1.5GB (~4-5 minutes), so we can exclude Nautilus.

    EDIT 2: @sudodus You turned on my light bulb, so I did a benchmark in both laptops (Windows vs Ubuntu): I tested my parents' Sony & Sandisk 2.0, my old Sony 3.0 and my WD external HDD and result in write speed surprised me: we have about 4-5MB/s for the 2.0 drives, a sad 7MB/s for my old Sony 3.0 and a good 68-70MB/s for my external HDD.

    According to @vidarlo:

    The reason it show a quick progress is memory caching. The file is only written at the end of the copy process, which tricks the UI into believing that copying is further along than it actually is.

    Thanks everyone. I'm going to buy decent pendrives for my parents' birthday 😂

  • np_3ka
    np_3ka over 5 years
    Well, I wrote that on Windows speed is completely different with the same pendrives, like 1 minute vs 10 minutes. So I don't think it's pendrive (every damn 2.0 pendrive) fault...
  • Vijay
    Vijay over 5 years
    Is your Windows on the same laptop? If not how can it be compared. May be some hardware or driver problem.
  • np_3ka
    np_3ka over 5 years
    @Vijay Nope, it's my parents' laptop, with low specs compared to mine. I struggle to believe that their old and cheap laptop can trasfer at a higher speed than mine... Also, I had Windows here, I didn't have transfer speed problems.
  • sudodus
    sudodus over 5 years
    @nplezka, Are you sure that Windows reports when it has flushed the buffers? My experience is that many USB pendrives are very slow, but you can get much faster USB 3 pendrives, when you know which ones to select. See this link and links from it, help.ubuntu.com/.../FromUSBStick#Notes_about_speed. After using a pendrive for some time, it becomes slower, and you can make it fast again by writing zeros to the whole drive.
  • np_3ka
    np_3ka over 5 years
    @sudodus you turned on my light bulb, so I did a benchmark in both laptops:
  • sudodus
    sudodus over 5 years
    And what's the result of your benchmark, @nplezka?
  • Thiago
    Thiago almost 5 years
    vidarlo and @Vijay, I never had that problem using any Windows in any machine. I used Windows in exactly the same PC that I use Ubuntu and never had that problem. This should be a basic and straightforward feature and users should not have to worry about that at all.
  • vidarlo
    vidarlo almost 5 years
    @Thiago have you verified that windows does not cache writes? And what feature are you asking about? Caching makes sense in some scenarios, on others not. It's not entirely clear what problem you've never had with windows either.
  • Thiago
    Thiago almost 5 years
    @vidarlo the feature is: OS allows users to transfer a large file to a pen drive. Sincerely I do not know if windows cache writes, I just don't have to worry about that. As I said before, it should be a straightforward feature.
  • Thiago
    Thiago almost 5 years
    There are algorithms for that kind of problem, the OS should transfer using the highest possible speed, considering possible bottlenecks.
  • vidarlo
    vidarlo almost 5 years
    @Thiago Which algorithms? Usually you don't have multipath to a USB drive, so there's really nothing the OS can do about bottlenecks. And with cheap USB drives, the bottleneck is always the drive itself.
  • Liam Baker
    Liam Baker over 4 years
    Does anyone have any idea why the UI has this issue where the displayed progress is further along than has actually been written to the drive? I remember this issue from years ago, and frankly I'm surprised that it hasn't been fixed yet.