USB 3.0 2.5' HDD low speed

Hi all,

with my canvio basics 2TB USB 3 disk I can get write speeds up to 15MB/s on the ROCK PI 4 with debian 9. Using the USB 2 connector it is 11 MB/s. The power supply should be sufficient, as it is a USB PD supply.

The drive works at expected performance when I connect it to my Notebook.

Does anyone else have problems with USB hdds and low speed?

Best regards

Do you see anything in dmesg? Also, paste here the output of lsusb and lsusb -t command. I suppose there is issue with uas driver and the chipset in your enclosure.

dmesg shows no errors. Earlier I had power issues (external hdd seems to draw a bit too much for the USB PD supply). Now that I connected the Lenovo USB-C supply of my notebook, the power issue is resolved but the low speed remains.

lsusb -t:

/: Bus 08.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/: Bus 07.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M

lsusb:

Bus 006 Device 002: ID 0480:0900 Toshiba America Inc
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

What filesystem you use on your hard disk? And how you mount it

I am using ext4 and fstab with options: auto, nouser, exec, rw, sync, atime 0 0

Well the driver is already the fail-safe option (usb-storage instead of uas). If there is indeed no error messages, it has to be some low-level hardware issue that does not report errors but prohibits proper performance.

Anything I could dig out from the internet on this is here: https://forum.odroid.com/viewtopic.php?f=181&t=35031 Maybe worth giving it a shot.

There are dmesg errors, but none that I can relate to the USB drive issue. But it’s weird that after a fresh install I get that many errors.

Here is the dmesg output:
https://justpaste.it/6htqn

NTFS given max 30 MB/s, where ext4 on the same drive given much higher speed.

I am using ext4.

What tools did you use to test it?

I found out about the issue by copying a file over SSH and wondering about the slow speed (GBit LAN). Then I tried copying from sd card to external HDD and found out that that’s the bottleneck. It got more precise with a “dd bs=1M count=1000” from sd to HDD.

I just connected the hdd to my notebook (Centos 8) and I see the full transmission speed when using the usb-storage driver as well.

I also think there present some pwer issue, at least Ive posted it long time ago https://forum.radxa.com/t/usb-connected-ssd-leads-to-feeeze

I just copied the 1GB file not to the USB drive but to my home folder (SD card), and again I got 20MB/s. How is that possible? No USB involved, just

sync;dd if=/dev/zero of=tempfile bs=1M count=1000;sync

Probably the SD card is the limiting factor then… It’s a Samsung Evo 32GB
I am going to use my Rock Pi mainly to receive Backups from LAN and store them on the USB HDD. Is the speed really limited by the SD write performance?

I am going to use my Rock Pi mainly to receive Backups from LAN and store them on the USB HDD. Is the speed really limited by the SD write performance?

The SD card speed should not affect the network to USB speed. What’s the output of

dd if=/dev/sda of=/dev/null bs=1M count=1000

The speed is 134MB/s. So that seems to be a good transfer speed.

Check your network speed with iperf

On ROCK Pi 4:

iperf -s

On another PC

iperf -c rockpi.local

Or

iperf -c IP

IP is the IP address of ROCK Pi 4.

Network speed is not the issue.
My problem is that dd if=/dev/zero of=/home/-user-/tempfile bs=1M count=1000 results in 40MB/s. No network involved, no USB HDD involved.
When writing to the USB 3.0 HDD (Toshiba Canvio Basic) write speed is ~10MB/s.

Measurements with 1GB file:
/dev/zero->SD: 40MB/s
/dev/zero-> USB HDD: 13.6MB/s
SD->/dev/null: 1.4GB/s
USB HDD -> /dev/null: 1.1GB/s

So I just bought a USB Y- cable (2x USB A <-> HDD USB) to check if the issue is due to a single USB port not being able to supply enough current. There was no change however. The USB HDD write speed remains to be around 14 MB/s.