Results 1 to 8 of 8

Thread: Windows vs Linux USB Copy Speed (Linux 10x slower)

  1. #1
    Join Date
    May 2018
    Beans
    5

    Windows vs Linux USB Copy Speed (Linux 10x slower)

    I have been transfering music to my MP3 player (yes, I still use MP3 player...) and I've noticed that the process takes A LOT longer then on Windows.

    I went ahead and measured the time using time on Linux and just wrist-watch for windows:
    Code:
    119 Files, 687MB total
    LINUX COPY:
        garzet@GarzetRig:~$ time cp -r Music/Norther/ /media/garzet/WALKMAN/
            real 19m38.427s
            user 0m0.005s
            sys 0m1.109s
        AVG SPEED: 0.58319185059 MB/s
    
    WINDOWS COPY:
        time  2m5s
        AVG SPEED: 5.496 MB/s
    I have tried using rsync and GNOME files/Nautilus- more or less the same results.
    OS: Ubuntu 18.4 / Windows 10
    USB: 2.0
    CPU: i7-6700k @ 4.4GHz
    Other: Dual boot, same USB port

    I have seen some kernel issue back from 2008 which is supposed to be the result of slower copy speeds on Linux when compared to Windows, but don't think it is relevant anymore.
    I did googling-morning and couldn't find any solution.
    Are there any ways to speed this up?

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Windows vs Linux USB Copy Speed (Linux 10x slower)

    How is the storage mounted? gvfs is terribly slow.

  3. #3
    Join Date
    May 2018
    Beans
    5

    Re: Windows vs Linux USB Copy Speed (Linux 10x slower)

    Quote Originally Posted by TheFu View Post
    How is the storage mounted? gvfs is terribly slow.
    Pretty sure it's GVfs since it mounts automatically. Not sure how to use any other method - I did try umount and then mount manually, but then timed copy doesn't work. Files are copied in background, but cp returns control instantly which is strange.
    This is the output:
    Code:
    $ sudo time cp -r Music/Norther/ /media/garzet/TEST/
    0.00user 0.10system 0:00.70elapsed 14%CPU (0avgtext+0avgdata 2788maxresident)k
    208676inputs+207384outputs (0major+179minor)pagefaults 0swaps

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Windows vs Linux USB Copy Speed (Linux 10x slower)

    Please show the exact mount command used.

    Proper mounts use disk cache. To flush that, use "sync" if you can't wait for that to happen automatically. When sync returns, all data is written. Sync will be called due to umount as well.

    On spinning disks, you can tweak parameters using hdparm to optimize the on-board. I doubt it is helpful for flash storage devices, but I don't know. For USB storage, always use USB3 ports even if the storage interface is only USB2. It does help, IME, unless the storage is really slow.

  5. #5
    Join Date
    May 2018
    Beans
    5

    Re: Windows vs Linux USB Copy Speed (Linux 10x slower)

    Quote Originally Posted by TheFu View Post
    Please show the exact mount command used.

    Proper mounts use disk cache. To flush that, use "sync" if you can't wait for that to happen automatically. When sync returns, all data is written. Sync will be called due to umount as well.

    On spinning disks, you can tweak parameters using hdparm to optimize the on-board. I doubt it is helpful for flash storage devices, but I don't know. For USB storage, always use USB3 ports even if the storage interface is only USB2. It does help, IME, unless the storage is really slow.
    It was sudo mount /dev/sdc1 /media/garzet/TEST/

  6. #6
    Join Date
    Oct 2005
    Beans
    585
    Distro
    Lubuntu 18.04 Bionic Beaver

    Re: Windows vs Linux USB Copy Speed (Linux 10x slower)

    odd, i've always found my linux computers are noticeably faster transferring stuff to usb than windows.

  7. #7
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Windows vs Linux USB Copy Speed (Linux 10x slower)

    That mount will probably work. You can check the mount options by running mount without options. Every different file system has different mount options. Some options can impact performance.

    Whenever I connect my portable devices via USB to a computer to transfer files, I'm always amazed at the terrible performance and simply transfer any files well before I need them on the device (or use a Nextcloud server).

  8. #8
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,791

    Re: Windows vs Linux USB Copy Speed (Linux 10x slower)

    There are recurring bugs in the USB stack for certain hardware. It sounds like you are one of the unlucky ones. Some of the USB problems can be fixed with 'ionice'.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •