slow write speed ( 9MB/s) with RPI4 (4GB) and usb 3 hdd

  • Dear OMV community,


    i started building my first OMV nas recently. After slow results with my Pi3 i started new with a brand new PI4 this week.


    Unfortunately my write speed is much slower than anticipated. I get around 9 MB/s, but i hoped for a bit more to be practicable.


    My setup is as follows.

    RPI4. 4gb. original 3A psu, raspbian lite and OMV (this weeks versions).

    Western digital elements 3tb, usb3 hdd which is directly connected to the Pi's usb 3.

    Format: Ext4

    Router: Linksys E3000 ( the led's confirm that both units, the Pi and the PC utilize the gigabit connection.


    The network speed seems fine:


    412218-Unbenannt.jpg



    The usb hdd seems to utilize the standard driver, but my speed seems slow even for that, right ?


    412224-Unbenannt.jpg



    i tried the suggestions to improve SMB write speed from here in the forum with no luck. (Advanced settings, extra options)



    my speed is still slow.


    Unbenannt12.jpg




    Reading from the share is very fast though. I reach 90MB/s when transferring from the Pi to my PC.


    Out of curiosity i connected a USB3 thumb drive to the Pi and write speed was around 20 MB/s. ( slower than what it could be written on on the pc but at least faster than the hdd)



    Any help would be highly appreciated.

  • low quality USB cables or even a USB gender adapter reduce transfer speed significantly.

    1.) try original USB cable supplied by Western Digital (USB cables all look the same, hence the right one is hard to find)

    2) test with a HDD benchmark application ( I use CrystalDiskMark)

    3) repeat step 2 with other cable(s) until you find one giving acceptable performance, mark this cable with a tag

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

    Einmal editiert, zuletzt von mi-hol ()

  • according to the router, both devices Pi and Pc utilize the gigbit connection ( green LED, slower connection like 100 Mbit with the old Pi3 are indicated by a blue LED)

    Both devices are directly connected to the router, no additional switch used.

    Am i wrong that the iperf result confirms good network transfer speed ?


    I tried another USB3 cable that fits the hdd enclosure, but the result was the same.

    It seems first the buffer fills up, then when it comes to actual write speed on the hdd the transfer rate slows down.




    the Pi itself is mounted in a aluminium enclosure that acts as heatsink, so overheating can be ruled out.

  • To allow for a comparison of apples to apples

    Pi4 omv 5.5.19-1 (usul) on RPi4 with 4GB RAM and 2x 6TB Toshiba HDWT360 HDD in Icy Box IB-RD3662-C31 /RAID1

    Performance of OMV SMB share connected via wired 1Gb Ethernet versus 2 WLAN routers using (802.11n) & (802.11.ac = WiFi5) protocol

    measured with CrystalDiskMark 8


    1) Connected via 1Gbit switch & wired Ethernet performance

    [Read]

    SEQ 1MiB (Q= 8, T= 1): 93.033 MB/s [ 88.7 IOPS] < 88762.80 us>

    SEQ 1MiB (Q= 1, T= 1): 95.386 MB/s [ 91.0 IOPS] < 10926.24 us>

    RND 4KiB (Q= 32, T= 1): 43.243 MB/s [ 10557.4 IOPS] < 3026.89 us>

    RND 4KiB (Q= 1, T= 1): 8.415 MB/s [ 2054.4 IOPS] < 485.29 us>


    [Write]

    SEQ 1MiB (Q= 8, T= 1): 117.253 MB/s [ 111.8 IOPS] < 70680.67 us>

    SEQ 1MiB (Q= 1, T= 1): 111.385 MB/s [ 106.2 IOPS] < 9401.16 us>

    RND 4KiB (Q= 32, T= 1): 26.701 MB/s [ 6518.8 IOPS] < 4891.26 us>

    RND 4KiB (Q= 1, T= 1): 9.575 MB/s [ 2337.6 IOPS] < 426.58 us>


    2) Connected via WiFi/WLAN(802.11n) (WiFi router was old single core model)

    [Read]

    SEQ 1MiB (Q= 8, T= 1): 6.081 MB/s [ 5.8 IOPS] <1174090.67 us>

    SEQ 1MiB (Q= 1, T= 1): 5.868 MB/s [ 5.6 IOPS] <174304.11 us>

    RND 4KiB (Q= 32, T= 1): 5.715 MB/s [ 1395.3 IOPS] < 22828.59 us>

    RND 4KiB (Q= 1, T= 1): 1.284 MB/s [ 313.5 IOPS] < 3165.95 us>


    [Write]

    SEQ 1MiB (Q= 8, T= 1): 11.743 MB/s [ 11.2 IOPS] <655514.79 us>

    SEQ 1MiB (Q= 1, T= 1): 10.059 MB/s [ 9.6 IOPS] <102725.05 us>

    RND 4KiB (Q= 32, T= 1): 9.650 MB/s [ 2356.0 IOPS] < 13529.73 us>

    RND 4KiB (Q= 1, T= 1): 1.301 MB/s [ 317.6 IOPS] < 3122.85 us>


    3) Connected via WiFi/WLAN (802.11n) (WiFi router was new dual core model)

    [Read]

    SEQ 1MiB (Q= 8, T= 1): 14.224 MB/s [ 13.6 IOPS] <555902.87 us>

    SEQ 1MiB (Q= 1, T= 1): 13.617 MB/s [ 13.0 IOPS] < 76838.01 us>

    RND 4KiB (Q= 32, T= 1): 11.329 MB/s [ 2765.9 IOPS] < 11534.01 us>

    RND 4KiB (Q= 1, T= 1): 1.989 MB/s [ 485.6 IOPS] < 2052.90 us>


    [Write]

    SEQ 1MiB (Q= 8, T= 1): 12.163 MB/s [ 11.6 IOPS] <641750.03 us>

    SEQ 1MiB (Q= 1, T= 1): 11.296 MB/s [ 10.8 IOPS] < 92317.61 us>

    RND 4KiB (Q= 32, T= 1): 10.876 MB/s [ 2655.3 IOPS] < 12013.82 us>

    RND 4KiB (Q= 1, T= 1): 1.876 MB/s [ 458.0 IOPS] < 2174.58 us>


    3) Connected via WiFi/WLAN (802.11ac) (WiFi router was new dual core model)

    [Read]

    SEQ 1MiB (Q= 8, T= 1): 38.377 MB/s [ 36.6 IOPS] <213709.02 us>

    SEQ 1MiB (Q= 1, T= 1): 19.925 MB/s [ 19.0 IOPS] < 52194.71 us>

    RND 4KiB (Q= 32, T= 1): 21.056 MB/s [ 5140.6 IOPS] < 6176.01 us>

    RND 4KiB (Q= 1, T= 1): 1.745 MB/s [ 426.0 IOPS] < 2339.12 us>
    [Write]

    SEQ 1MiB (Q= 8, T= 1): 31.042 MB/s [ 29.6 IOPS] <261352.52 us>

    SEQ 1MiB (Q= 1, T= 1): 17.825 MB/s [ 17.0 IOPS] < 58443.87 us>

    RND 4KiB (Q= 32, T= 1): 15.042 MB/s [ 3672.4 IOPS] < 8691.43 us>

    RND 4KiB (Q= 1, T= 1): 1.734 MB/s [ 423.3 IOPS] < 2348.94 us>



    ------------------------------------------------------------------------------



    Profile: Default

    Test: 64 MiB (x5) [Z: 22% (1237/5544GiB)]

    Mode: [Admin]

    Time: Measure 5 sec / Interval 5 sec

    Date: 2020/12/20 15:53:48

    Client OS: Windows 10 Professional [10.0 Build 19042] (x64)

    ------------------------------------------------------------------------------


    Server:

    root@nas:~# lsusb -t

    /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M

    |__ Port 2: Dev 2, If 0, Class=Mass Storage, Driver=uas, 5000M

    /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M

    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M

    root@nas:~# uname -a

    Linux nas 5.4.79-v7l+ #1373 SMP Mon Nov 23 13:27:40 GMT 2020 armv7l GNU/Linux


    ------------------------------------------------------------------------------


    CrystalDiskMark 8.0.0 x64 (C) 2007-2020 hiyohiyo


    Crystal Dew World: https://crystalmark.info/

    ------------------------------------------------------------------------------

    * MB/s = 1,000,000 bytes/s [SATA/600 = 600,000,000 bytes/s]

    * KB = 1000 bytes, KiB = 1024 bytes

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

    11 Mal editiert, zuletzt von mi-hol ()

  • shadowlord searching a bit gives the answer on what to expect from this specific HDD

    https://www.cloudwards.net/western-digital-elements-review/

    "Our Western Digital Elements review ... our experience with the drive, we’ll give you our verdict, which will determine if the Elements drives can make it on our best external hard drives list or if they’re just another mediocre option.

    The answer is a bit of both. An Elements drive is a great way to get a lot of storage for cheap, but you’ll need to deal with the slow spinning disk, as well as a shroud that doesn’t inspire a lot of confidence. That’s true for most inexpensive external hard drives and, unfortunately, Western Digital doesn’t seem interested in going against the status quo."


    From my view the specific HDD you tried is not a good fit for a NAS (as you already experienced)

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

  • are you interested to compare apples with apples?

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

  • you are right that my test with the stick was not comparable. ( or did you mean my test of the hdd on the pc ?)

    So today i borrowed some old usb2 external hdd.

    i directly mounted the NTFS formated disc (vs. ext4 i'm using on my disc) and got write speeds up to 25 MB/s.

    So i guess my problem has something to do with the specific WD hdd and pi combination. ( out of curiosity i tried my disc with NTFS format but results were the same around 9 MB/s)


    Anyone else used a western digital elements on a rpi ?

  • I'd recommend reading section "My NAS Build" .

    I'm unaware of a "guide" directly helping with hardware selection, considering available budget and required performance.

    It took me considerable time to find a good balance myself.

    Most signatures in the forum show the decisions take by NAS owners but unfortunately the requirements are unknown.


    Best approach I can think of is to specify:

    - amount of money for purchase

    - yearly operations cost for energy

    - number of users

    - planned usage (i.e. backup of other computers, music/video library,...)

    - storage space capacity

    - any constraints/specials to consider (i.e. max loudness of HDD due to placement in living room)


    Draft a first version of a "wish list" and ask for feedback here.

    At the end it will still be your decision what to buy.

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

  • well after trying a lot of different parameters and another different usb enclosure ( that one had better results too) i gave it one last try with the wd drive and reimaged the sd card and started again from scratch.

    This time it worked quite well.

  • I have been experiencing this problem too.


    I spent some time stuck on the UAS versus USB-STORAGE issue with some enclosures but that's only telling some of the story.


    My USB-3 enclosure has always used USB-STORAGE (UAS has never worked) and was rock steady giving read/write at around 90-110MB/s until about a month ago when the issue arose.


    Thoughts:


    * Both Pi and Windows machine connected to network at 1gb.

    * Drive is EXT4

    * There is only one client connected to the NAS at any one time.

    * When it's working, transfer is steady 90-110MB/s which is obviously as good as it will get over 1gb ethernet.

    * When it's not it drops to 15-30MB/s.

    * Read speed is normal, this only affects write.

    * The PC can write to other SMB shares on other NAS boxes at the normal speed.


    As part of testing this, I reinstalled OMV and recreated my shares, and the problem was gone... then I made one change to the Physical Disk Properties (Storage->Disks->Edit) - I changed Spindown Time from Disabled to 5 minutes... and the transfer speed dropped like a stone right there in front of me.


    I changed the Spindown Time back from 5 minutes to Disabled and this has not recovered the situatoin.


    Meanwhile, HDPARM is telling me that the Pi itself communicates with the drive at a reasonable speed:

    Something isn't right here.


    Reboots do nothing (NAS and client). Deleting the SMB share and recreating does nothing. The problem is manifest directly addressing the NAS by IP address and by Hostname.


    I am currently experimenting with SMB settings and will next create an NFS share to verify if this is an SMB issue.

  • USB-3 enclosure

    Please tell us more details about it.

    A certain chipset used in your enclosure might be the root cause.

    A known good combination of enclosure and RPi4 is documented in my signature and a link with measured performance

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

    Einmal editiert, zuletzt von mi-hol ()

  • It's everybody's favourite, the JMicron JMS567. It's known to be be flaky with UAS but I think in these cases the UAS issue is a red herring.


    The enclosure is the Kcy Box IB-3640SU3 which has been working perfectly and stable in OMV on a Rpi4 until a few months ago when this started:



    Here's the same file going the other way - reading from the NAS copying back to the PC:



    If I do a clean install of OMV, I get normal speeds for twelve to twenty-four hours and then this starts again - I've tried booting the Pi without the disks connected and then connecting them later, powering down and restarting the enclosure, rebooting the Pi, changing cables, changing USB3 ports, ensuring cables are away from potential interference, deleting and re-creating the SMB shares.


    I have not been able to test an NFS share as I can't get it to mount in Windows, but will keep trying.


    I'm on the brink of abandoning the platform and handing over my cash to Synology. There are now enough people reporting this same problem to make me think an update of some kind has changed something - but what, I don't know. The Rpi firmware hasn't changed since September, and in September my box was working fine. Something in OMV? A USB / chipset driver in RpiOS? Quirks not working properly? Samba? I don't even know how to begin diagnosing this... :(

  • To get an idea on "how to diagnose" a few questions first

    - what is OMV? a UI over many other tool

    - is it likely that OMV is the root cause? unlikely, but not impossible


    helpful IT troubleshooting hints are documented in many places i.e.

    https://www.spiceworks.com/it-…es/troubleshooting-steps/

    https://blog.rapid7.com/2017/1…ctive-it-troubleshooting/

    0. retest with disabled power saving

    1. find out what changed via log files

    2. isolate and replicate assumed root cause

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

    2 Mal editiert, zuletzt von mi-hol ()

  • My NAS is a Gigabyte BRIX Celeron 8GB 120GB SSD micro PC with a Terratec 2 bay RAID enclosure running in single disk mode with 2 Seagate Ironwolf 2TB NAS drives. It has a parallel install of Linux Lite - another Debian instance.


    I tested read by "hdparm" and write by "dd".


    I had a similar issue - very poor speeds with USB3 enclosures. I tried 2 enclosures both using Jmicron chipsets - a Startech 4 bay and a QNAP 4 bay, neither worked either read or write with speeds about 10MB/s. Both were using xhci drivers and UAS, I did try plain USB3 but always poor speed.


    The Linux Debian instance did perform differently and I got good 150MB/s read and write speeds, I tried Proxmox on OMV but never more than 10MB/s read and write. I even installed the same kernel as used by Linux Lite 5.4.0-58 on OMV but no improvement.


    I changed the USB enclosure to a Terrmaster 2 bay RAID as stated above with disks as singles. This uses an ASMedia chipset - and it all seems to be good with 150MB/s + speeds read and write.


    I never got to the bottom of why the Linux Lite worked OK with JMicron and the OMV didn't.


    I hope this experience might assist.


    :)

  • Well it has been working fine for some time, but without me changing anything, the write speeds are suddenly back to painfully slow ( ~ 9Mb /sec.)

    This time even reading from the disc seems to start out very slow.


    If it is really a usb enclosure problem, why was it working fine for some weeks. ?

Jetzt mitmachen!

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