External Hard drive gets slow while copying lots of data

7,145

Seems that you have connected external drive to USB2 port. USB2 have more computational overhead and slower speed than USB3, if you have USB3 - connect drive to that port.

Use lsusb -t command to find out wire speed of hard drive.

And, by the way - if it is regular hard drive, not SSD - you are limited by physics. Conventional HDDs are able to read or write from one physical location at time. If you ask to do multiple reads / writes - heads need to be repositioned frequently, it affects overall reading / writing speed.

==== Author pointed out to hardware problem - see comments.

Share:
7,145

Related videos on Youtube

Ionică Bizău
Author by

Ionică Bizău

💻 Programmer ⚡️ Geek 🎹 Pianist & Organist 🚀 Learner 💡 Mentor 💫 Dreamer 🍏 Vegetarian 🙏 Jesus follower Website | GitHub | Twitter | PayPal Donations

Updated on September 18, 2022

Comments

  • Ionică Bizău
    Ionică Bizău about 1 year

    I have an external 5T drive where I want to copy my files (about 22GB). When copying the files everything runs well for a while and then it gets really slow (maybe because of the file size?):

    If I want to do other things in parallel (e.g. cloning a git repository) it is very very slow.

    Is there a solution for this problem? Maybe formatting the hard drive would help? Currently it's formatted to ntfs.

    This doesn't affect the general speed of my machine. It's only happening in the hard drive.


    Relevant output:

    $ lsusb -t
    /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
        |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
    /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
        |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
    /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
        |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=uas, 5000M
    /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
        |__ Port 5: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M
        |__ Port 5: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M
        |__ Port 7: Dev 4, If 0, Class=Video, Driver=uvcvideo, 480M
        |__ Port 7: Dev 4, If 1, Class=Video, Driver=uvcvideo, 480M
        |__ Port 8: Dev 5, If 0, Class=Vendor Specific Class, Driver=rtsx_usb, 480M
    
  • Ionică Bizău
    Ionică Bizău over 7 years
    Yes, it's not an SSD, but I think it shouldn't happen this: when it's very very slow, even if I do ls in the terminal (opened in the hard drive directory) I have to wait until it gets faster (it takes minutes). I posted my lsusb -t output. I'm not sure: do I have USB3?
  • ulcha
    ulcha over 7 years
    It's using USB3, even with UAS driver. Maybe there's huge fragmentation on drive, if you use that also for git? If you want to compare FS speed, try to shrink few gbytes from ntfs and create another ext4 in free space.
  • Ionică Bizău
    Ionică Bizău over 7 years
    Could it be that it freezes because I disconnected the hard drive accidentally when it was copying some stuff on it? Maybe it has some hardware issues—how can I check that? Because, in fact, it freezes for some seconds even when saving a file in VIM.
  • ulcha
    ulcha over 7 years
    You then should definitely check NTFS from windows. Check same from another system. Try also my previous option, if necessary.
  • Ionică Bizău
    Ionică Bizău over 7 years
    If you want to compare FS speed, try to shrink few gbytes from ntfs and create another ext4 in free space. — how can I do that? I now remember that before formatting first time, I saw in gparted ext4 and ntfs in parallel. I'm terrible in file systems and formatting things.
  • Ionică Bizău
    Ionică Bizău over 7 years
    Formatting again: 10k MB ext4 and the rest is ntfs.
  • Ionică Bizău
    Ionică Bizău over 7 years
    I see no difference... I do want to store lot of git repos on this hard drive tho... Is there any way to make it faster?
  • Ionică Bizău
    Ionică Bizău over 7 years
    It turns out that it was a hardware problem. They replaced my hard disk and now it's working pretty good! Maybe you can update this in your answer. Thanks for the info.