Rock64 slow usb3 transfer speed

  • Hello,


    I just installed OMV 4 on my rock64-2GB. I downloaded the image from https://sourceforge.net/projec…ngle%20Board%20Computers/
    The system seems to be stable but the usb3 speed connection seems to be very slow.
    I'm currently using a usb3 WD Elements XFS formatted;
    Here are some console outputs:
    lusb:

    Code
    lsusb
    Bus 005 Device 002: ID 1058:25a1 Western Digital Technologies, Inc. Elements / My Passport
    Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 004 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 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Code
    lsusb -t
    /:  Bus 05.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 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    /:  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=dwc2/1p, 480M

    fstab:

    Code
    # >>> [openmediavault]
    /dev/disk/by-id/usb-WD_Elements /srv/dev-disk-by-id-usb-WD_Elements xfs defaults,nofail,noexec,usrquota,grpquota,inode64 0 2
    # <<< [openmediavault]

    dd:

    Code
    dd if=/dev/zero of=/srv/dev-disk-by-id-usb-WD_Elements/test1.img bs=100M count=1 oflag=direct
    1+0 records in
    1+0 records out
    104857600 bytes (105 MB, 100 MiB) copied, 38.9054 s, 2.7 MB/s

    I tested the same drive with my laptop and I was able to get at least 80MB/s. Also with OMV on the RPi it was a lot faster.


    The maximum I can achieve with the Rock64 is 3.8MB/s
    Connecting the hdd to the usb2 ports I get 3.7MB/s


    I tried searching the forum but I could not find a solution for my issue (most of the time the issue seemed to be network related)


    Please let me know if you need more debug info.


    Thank you.

  • Problem is back again. After a couple of days the external drive was not spinning down so I enabled the following settings in Storage > Disks
    Advanced power management: 127 Intermediate power usage in standby;
    Automatic acoustic management: Disabled
    Spindown time: 10 minutes
    Write cache: disabled


    Now I get
    READ:

    Code
    hdparm -t /dev/sda
    
    
    /dev/sda:
     Timing buffered disk reads: 274 MB in  3.00 seconds =  91.24 MB/sec


    WRITE:

    Code
    2+0 records in
    2+0 records out
    41943040 bytes (42 MB, 40 MiB) copied, 8.99048 s, 4.7 MB/s


    I reset all the parameters to the default ones but still the same results;


    Is there any way to reset the HDD settings to the default ones?

  • A small update. It looks like the issue was caused by hdparm.
    This was the content of hdparm.conf:

    Code
    quiet
    /dev/disk/by-id/usb-WD_Elements {
        apm = 127
        spindown_time = 120
        write_cache = off
    }

    I removed the content of the file and the hdd write speed is back to 90MB/s after a system reboot

  • Befor you set params with hdparm on omv, try them in the shell.
    Many Disks do not support acousticmanagement and apm as example.
    Most Disks run unconfigured at its best. Don't disable caches...
    look at smart errors... there are lot of possible error sources by managing disks..

    Equipment: a few Computers, lot's of waste heat, little time and a Pile of work.


    When solving problems, dig at the root instead of hacking at the leaves.

  • Hi Rd65,


    thanks for your reply. It looks like hdparm does not support my external hdd. When I execute it in the shell I get the 'bad/missing sense data'.
    Also the smart query returns that my disk does not support write cache;
    The strange thing is; when I get a fresh installation of OMV for a couple of hours (maybe a day) the hdd seems to spin down properly without setting anything in open media vault,
    then it keeps constantly spinning even when nothing is using it.
    I just have a shared SMB folder on it and I disabled all the services including SSH.
    But even when no one is accessing samba the disk does not spin down.
    I also tried hd-idle with the same result (well at least hd-idle does not affect performance).
    Very strange.

  • A lot of external Disks (via USB) use controllers (USB2SATA Bridges) which hide features of the disk and may use own (firmware depended) timeouts. its logic.. you use an usblink.. not sata... only the backend between controller and disk is sata.
    emulating something is never the same as the original.

    Equipment: a few Computers, lot's of waste heat, little time and a Pile of work.


    When solving problems, dig at the root instead of hacking at the leaves.

  • From what I read in the forum other people had the same/similar issue. Unfortunately the hd-idle solution does not seem to be working properly for me.
    I wonder if there is a way to log access to the usb disk to verify if a process/client is accessing the hdd preventing the spindonwn.

  • maybe inotify is your friend...or auditd. Or lsof. Or iotop.. or iostat...
    try to insert the usb disk but not mount it and disable smart. now it stops after few mins. or is it running?
    if it stops, mount it... now it stops after few mins. or is it running
    if it stops, enable smart. now it stops after few mins. or is it running?
    if its running... which damons running in the testtimeframe? take a look on /var/log/daemon.log and /var/log/syslog and var/log/kern.log and #dmesg
    You can even do a #init 1 (switching to singleusermode) on ssh to see if it depends on deamons on the runlevels. and so on...
    i woud try at first #iotop -o -d 30

    Equipment: a few Computers, lot's of waste heat, little time and a Pile of work.


    When solving problems, dig at the root instead of hacking at the leaves.

    4 Mal editiert, zuletzt von Rd65 ()

  • Today I notice that the hdd was spinning down so I double check the status of the [smartmontools] and I noticed that the system reported [Active: failed] (it failed the device scan);
    After I rebooted the system the service was active so I decided to stop it (I saw that the external hdd was added to the 'monitor' list even if I did not enabled the SMART feature in the webui).
    I'll now double check if the hdd spin down properly.
    @Rd65 thanks for your support.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!