You are not logged in.

#1 2024-06-07 21:29:55

VikJES1969
Member
Registered: 2024-06-07
Posts: 3

[SOLVED] Copying files from AND to USB slows system to a crawl

I recently copied about a dozen large files from a USB 3.0 HDD to a USB 3.0 16 GB thumb drive (both are in exFAT) and the DE (GNOME in my case) just became almost completely unresponsive, in fact the only thing that showed that it wasn't completely frozen was the progress status bar that showed the copy was taking place (and mouse pointer that I could still move).
I just left my PC alone for the half hour it took to finish the copy but I'm wondering how to resolve this so that I can at least continue to use my PC while the copy is taking place, perhaps some kernel parameters in sysctl.conf needs some tweaking and/or changing to a different CPU scheduler.
Thanks in advance for advice or ideas

Last edited by VikJES1969 (2024-06-10 22:25:51)

Offline

#2 2024-06-08 07:31:16

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,979

Re: [SOLVED] Copying files from AND to USB slows system to a crawl

You'll fdirst have to figure what the bottleneck is because unless this is a single-core atom system (which I don't think did come in x86_64), it's probably not the CPU.

- RAM, https://lonesysadmin.net/2013/12/22/bet … rty_ratio/
- bus (are there any processes waiting for IO ie. in "D" state)
- gnome being gnome (could also be the filemanager), does this happen on openbox or when running "cp -r /path/to/porn_collection/ /backup/" in a terminal?


Ftr,

for the half hour it took to finish the copy … USB 3.0 16 GB thumb drive

is ~8.9MB/s - less than half of what USB 2 would get you
- the usb key was really cheap
- the usb key is really old
- you plugged both devices into an external hub that was attached to a usb2 port?

Offline

#3 2024-06-08 10:58:19

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,085

Re: [SOLVED] Copying files from AND to USB slows system to a crawl

Another possibility is the 2 drives are connected to the same internal usb controller.
Please post the output lsusb -tv with both drives attached.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2024-06-09 15:33:29

VikJES1969
Member
Registered: 2024-06-07
Posts: 3

Re: [SOLVED] Copying files from AND to USB slows system to a crawl

Thank you for the replies, for context (I apologize, I should've probably mentioned this in my initial post) the PC I'm using is a fairly new, Minisforum HX99G, which doesn't have a single USB 2.0 port on it.

That being said, lsusb -tv, was very enlightening because I do see quite a few 2.0 (480 Mbps) USB hubs in there (I'm guessing that might be internal stuff).

Before I shutdown my PC, I ran lsusb -tv (with both USB devices connected to the same connectors I used when I did the initial copy that took 30 mins), and I could've swore that the USB 3.0 Thumb drive was connected to a USB 2.0 hub (with the USB 3.0 HDD on a different USB 3.0 hub). After I booted my PC, I ran lsusb -tv again, and now both the thumb drive and the HDD are now on the same USB 3.0 hub! Obviously, I didn't move any of the USB drives to any other USB connectors..
I've I dreamt this or is that even possible?!?

I did the exact same copy again (using GNOME / Files again for consistency) and this time, it ran at approximately 80 Mbps at the very beginning and slowed down to about 40 Mbps towards the end of the copy, instead of 30 mins, it took about 3½ mins.
What boggles my mind is that nothing changed between my initial copy and this copy, I even used the exact same model of USB 3.0 thumb drive (but it's not the same one).

The output of the lsusb -tv command:

lsusb -tv
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 003: Dev 002, If 0, Class=Audio, Driver=snd-usb-audio, 12M
        ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
    |__ Port 003: Dev 002, If 1, Class=Audio, Driver=snd-usb-audio, 12M
        ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
    |__ Port 003: Dev 002, If 2, Class=Audio, Driver=snd-usb-audio, 12M
        ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
    |__ Port 003: Dev 002, If 3, Class=Human Interface Device, Driver=usbhid, 12M
        ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/2p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/3p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 05e3:0610 Genesys Logic, Inc. Hub
        |__ Port 001: Dev 004, If 0, Class=Hub, Driver=hub/5p, 480M
            ID 2109:2817 VIA Labs, Inc. 
            |__ Port 001: Dev 006, If 0, Class=Human Interface Device, Driver=usbhid, 12M
                ID 046d:c52b Logitech, Inc. Unifying Receiver
            |__ Port 001: Dev 006, If 1, Class=Human Interface Device, Driver=usbhid, 12M
                ID 046d:c52b Logitech, Inc. Unifying Receiver
            |__ Port 001: Dev 006, If 2, Class=Human Interface Device, Driver=usbhid, 12M
                ID 046d:c52b Logitech, Inc. Unifying Receiver
            |__ Port 002: Dev 010, If 0, Class=Audio, Driver=snd-usb-audio, 12M
                ID 3302:29b1  
            |__ Port 002: Dev 010, If 1, Class=Audio, Driver=snd-usb-audio, 12M
                ID 3302:29b1  
            |__ Port 002: Dev 010, If 2, Class=Audio, Driver=snd-usb-audio, 12M
                ID 3302:29b1  
            |__ Port 002: Dev 010, If 3, Class=Human Interface Device, Driver=usbhid, 12M
                ID 3302:29b1  
            |__ Port 003: Dev 008, If 0, Class=Human Interface Device, Driver=usbhid, 12M
                ID 05ac:024f Apple, Inc. Aluminium Keyboard (ANSI)
            |__ Port 003: Dev 008, If 1, Class=Human Interface Device, Driver=usbhid, 12M
                ID 05ac:024f Apple, Inc. Aluminium Keyboard (ANSI)
            |__ Port 005: Dev 009, If 0, Class=Billboard, Driver=[none], 480M
                ID 2109:8817 VIA Labs, Inc. 
    |__ Port 002: Dev 003, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 2109:2817 VIA Labs, Inc. 
    |__ Port 003: Dev 005, If 0, Class=Wireless, Driver=btusb, 480M
        ID 0e8d:7961 MediaTek Inc. 
    |__ Port 003: Dev 005, If 1, Class=Wireless, Driver=btusb, 480M
        ID 0e8d:7961 MediaTek Inc. 
    |__ Port 003: Dev 005, If 2, Class=Wireless, Driver=[none], 480M
        ID 0e8d:7961 MediaTek Inc. 
/:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/2p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 5000M
        ID 05e3:0625 Genesys Logic, Inc. 
        |__ Port 001: Dev 004, If 0, Class=Hub, Driver=hub/4p, 5000M
            ID 2109:0817 VIA Labs, Inc. 
        |__ Port 002: Dev 008, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
            ID 0951:1666 Kingston Technology DataTraveler 100 G3/G4/SE9 G2/50 Kyson
        |__ Port 004: Dev 006, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
            ID 1058:07a8 Western Digital Technologies, Inc. My Passport (WDBBEP), My Passport for Mac (WDBLUZ)
    |__ Port 002: Dev 003, If 0, Class=Hub, Driver=hub/4p, 5000M
        ID 2109:0817 VIA Labs, Inc. 
/:  Bus 005.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/1p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 001: Dev 002, If 0, Class=Billboard, Driver=[none], 12M
        ID 0bda:5442 Realtek Semiconductor Corp. 
/:  Bus 006.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/0p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 007.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/1p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
/:  Bus 008.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/1p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 009.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/1p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 001: Dev 002, If 0, Class=Billboard, Driver=[none], 12M
        ID 0639:7213 Chrontel, Inc. CH7213
/:  Bus 010.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/1p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub

Last edited by VikJES1969 (2024-06-10 10:59:15)

Offline

#5 2024-06-09 22:09:41

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,979

Re: [SOLVED] Copying files from AND to USB slows system to a crawl

Please use [code][/code] tags. Edit your post in this regard.

I've I dreamt this or is that even possible?!?

This is a logical assignment - the key was (maybe after resuming from suspend?) registered as USB2 device and attached to that bus.

I even used the exact same model of USB 3.0 thumb drive (but it's not the same one).

One of them might start to degrade but also the condition of the attachment (before/after boot/suspend) might be a factor here (perhaps because of the power supply to the port and how the key responds to that)

Offline

#6 2024-06-10 11:08:00

VikJES1969
Member
Registered: 2024-06-07
Posts: 3

Re: [SOLVED] Copying files from AND to USB slows system to a crawl

Added the code tags as suggested by seth but by the way I did search for documentation on how to do this but couldn't find anything on the subject, if it's somewhere obvious, I wasn't able to find it.

When you said that one of my USB 3.0 thumb drive might be degrading (which is quite possible, I've had those things for years and I've been overwriting them with new ISOs all the time), will it degrade "gracefully" to USB 2.0 first before failing or will it just get slower and slower until it just stops working ?

Offline

#7 2024-06-10 13:37:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,979

Re: [SOLVED] Copying files from AND to USB slows system to a crawl

The bbcode help is right below the input field.

NAND ages by being increasingly slower to write and at some point the FW will set it read-only.
The bus level is most likely a consequence of that and not really relevant.
nb. that usb keys and SD cards are not somehow cheap SSDs, there's (usually) no wear leveling and they typically die when the first cell fails.
(ymmv, the case design doesn't really prove the hardware - you could have an SSD in a dongle but you'd probably know (because it's on the package) and certainly not if you got it for free (advertising give-away)

Offline

Board footer

Powered by FluxBB