Have you tried plugging it in to one of the USB2 ports to see if it's faster?jkirby0610 wrote: ↑Thu Apr 23, 2020 2:21 amSo, I am running into a bit of an issue... maybe someone can help me out.
I decided to use my Raspberry Pi 4m, with 4 GB of ram running the latest Raspian Lite image as of (4/22/2020), as a NAS for my Media server. I wasn't expecting it to be super fast but right now I have a 5TB Western Digital USB 3 external hard drive, with a 7200rpm drive in it, attached directly to one of the USB 3 ports on the Raspberry pi. When it was attached to my mac mini (Plex Server) it was giving me about 34mbps read and write speeds over the network. Like the mac mini, the Pi 4 has a gigabit NIC so I was expecting about the same speed. I am currently seeing about 256 Kbps (yes you read that right). I have ruled out the potential of a bottleneck in the network with Shaper rules in the network to allow up to 100Mbps speeds with the NAS. So the only thing I can figure is there is some throttling happening on the pi... I have made sure that there isn't currently any throttleing happening on the pi due to temperature, I added a pi fan just to make sure and it has maintained a cool 54*C and ran "vcgencmd get_throttled" and it returned "throttled=0x20000" which means at one point it was throttled but is no longer.
That is about the extent of my troubleshooting capability when it comes to this kind of thing... any suggestions would be appreciated.
Yes and no it’s not faster at all... I ran iperf -s on the computer I am transferring data from and iperf -c on the pi got 851 Mbits/sec so obviously the Gbit speeds are there.
Code: Select all
lsusbCode: Select all
sudo hdparm -t /dev/sda1So I put a powered USB3 hub on it, thinking maybe it it was just under powered, that stoped the Pi from booting completely so I removed the power and it boots. After it boots I plug the power back in and it operates normally. But I am still getting the seriously slow speeds.procount wrote: ↑Thu Apr 23, 2020 1:52 pmWhat is the output ofandCode: Select all
lsusbCode: Select all
sudo hdparm -t /dev/sda1
Code: Select all
$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
|__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=uas, 5000M
|__ Port 4: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000MCode: Select all
sudo hdparm -t /dev/sda
/dev/sda:
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Timing buffered disk reads: 464 MB in 3.01 seconds = 154.20 MB/secSorry about that, here is what I get when I run the commands you asked for, I was just thinking I may give you a little more info to see if maybe that would help. This is for an instance of OMV I have installed on the Raspian Lite OS, if that helps any.
Code: Select all
$ lsusb
Bus 002 Device 004: ID 0480:a006 Toshiba America Inc External Disk 1.5TB
Bus 002 Device 003: ID 0bc2:3322 Seagate RSS LLC SRD0NF2 [Expansion Desktop Drive]
Bus 002 Device 002: ID 05e3:0626 Genesys Logic, Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubCode: Select all
sudo hdparm -t /dev/sda1
/dev/sda1: No such file or directoryMaybe this might help... Looks like the partitions were mounted as LVM's... that could be an issue...
sudo lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 4.6T 0 disk
└─HS01-HomeShare 254:1 0 4.6T 0 lvm /srv/dev-disk-by-label-HomeDrive
sdb 8:16 0 465.8G 0 disk
└─NS01-NetShare 254:0 0 465.8G 0 lvm /srv/dev-disk-by-label-NetDrive
mmcblk0 179:0 0 29.8G 0 disk
├─mmcblk0p1 179:1 0 2.4G 0 part
├─mmcblk0p2 179:2 0 1K 0 part
├─mmcblk0p5 179:5 0 32M 0 part
├─mmcblk0p6 179:6 0 256M 0 part /boot
└─mmcblk0p7 179:7 0 27.1G 0 part /
So I went back and looked for how that LVM was mounted and found it was mounted as /dev/dm-1 and here is the output from that:procount wrote: ↑Thu Apr 23, 2020 2:17 pmI took /dev/sda from your second post "sudo hdparm -I /dev/sda".
I assumed it would be partitioned and formatted so that /dev/sda1 would exist.
If /dev/sda1 is not correct, please substitute for the device name of a suitable partition on your 5TB HDD.
Edit: It appears to be a SEAGATE HDD. So I assume it was just a simple mistake to describe it as a Western Digital HDD?
Code: Select all
sudo hdparm -t /dev/dm-1
/dev/dm-1:
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Timing buffered disk reads: 540 MB in 3.00 seconds = 179.70 MB/secCode: Select all
usb-storage.quirks=0bc2:3322:uCode: Select all
usb-storage.quirks=0bc2:3322:tThank you, I will give that a try.procount wrote: ↑Thu Apr 23, 2020 2:37 pmThat makes more sense.
Unfortunately, I'm not familiar enough with LVM to say how to use hdparm with it, or whether hdparm does work with it (some google fu required).
If you've tried adding:to cmdline.txt and rebooting, another option would be to try:Code: Select all
usb-storage.quirks=0bc2:3322:uCode: Select all
usb-storage.quirks=0bc2:3322:t
You are a genius!!! That's the bottleneck!!! I was thinking hard drive performance was the issue...procount wrote: ↑Thu Apr 23, 2020 2:47 pmA little Google suggested that LVM logical volumes can also be found at /dev/mapper/XXXX where XXXX related to your volume group. That might also be worth a try with hdparm. But I'm only suggesting using hdparm -t to get a local read performance of your HDD without the network affecting it.
I have a similar Seagate 6TB HDD (0bc2: ab38) but the hdparm result is more like 98MB/s rather than 256KB/s for comparison.
Code: Select all
sudo hdparm -t /dev/mapper/HS01-HomeShare
/dev/mapper/HS01-HomeShare:
Timing buffered disk reads: 4 MB in 4.08 seconds = 1003.12 kB/secCode: Select all
sudo hdparm -t /dev/mapper/NS01-NetShare
/dev/mapper/NS01-NetShare:
Timing buffered disk reads: 138 MB in 3.01 seconds = 45.86 MB/secThank you for your help getting this far, I changed the parameter to "t" and the speeds got even slower... down to 176kB/sec, so I may just turn that back to "u". I am probably going to try wiping it and starting from scratch... good thing I have the time lol.procount wrote: ↑Thu Apr 23, 2020 3:13 pmNope. That's the limit of my knowledge I'm afraid.
Any joy with the quirks?
I think the 'u' parameter is to turn off UAS access, which may get it to work better for some unsupported drives.
Some drives are automatically blacklisted for UAS, so the 't' parameter marks them as ok to use UAS, AIUI.
Code: Select all
$ sudo lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 4.6T 0 disk
└─HS01-HomeShare 254:1 0 4.6T 0 lvm /srv/dev-disk-by-label-HomeDrive
sdb 8:16 0 465.8G 0 disk
└─NS01-NetShare 254:0 0 465.8G 0 lvm /srv/dev-disk-by-label-NetDrive
mmcblk0 179:0 0 29.8G 0 disk
├─mmcblk0p1 179:1 0 2.4G 0 part
├─mmcblk0p2 179:2 0 1K 0 part
├─mmcblk0p5 179:5 0 32M 0 part
├─mmcblk0p6 179:6 0 256M 0 part /boot
└─mmcblk0p7 179:7 0 27.1G 0 part /Code: Select all
sudo hdparm -t /dev/sda
/dev/sda:
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Timing buffered disk reads: 330 MB in 3.06 seconds = 107.81 MB/secCode: Select all
sudo hdparm -t /dev/mapper/HS01-HomeShare
/dev/mapper/HS01-HomeShare:
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Timing buffered disk reads: 458 MB in 3.01 seconds = 152.40 MB/secCode: Select all
$ iperf -s -N
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 128 KByte (default)
------------------------------------------------------------
[ 4] local 10.10.1.11 port 5001 connected with 10.10.1.3 port 44378
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 1.06 GBytes 912 Mbits/sec
[ 4] local 10.10.1.11 port 5001 connected with 10.10.1.3 port 44382
------------------------------------------------------------
Client connecting to 10.10.1.3, TCP port 5001
TCP window size: 129 KByte (default)
------------------------------------------------------------
[ 6] local 10.10.1.11 port 54799 connected with 10.10.1.3 port 5001
[ 6] 0.0-10.0 sec 1.02 GBytes 878 Mbits/sec
[ 4] 0.0-10.0 sec 794 MBytes 664 Mbits/secCode: Select all
iperf -c 10.10.1.11 -d
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 128 KByte (default)
------------------------------------------------------------
------------------------------------------------------------
Client connecting to 10.10.1.11, TCP port 5001
TCP window size: 179 KByte (default)
------------------------------------------------------------
[ 5] local 10.10.1.3 port 44382 connected with 10.10.1.11 port 5001
[ 4] local 10.10.1.3 port 5001 connected with 10.10.1.11 port 54799
[ ID] Interval Transfer Bandwidth
[ 5] 0.0-10.0 sec 794 MBytes 665 Mbits/sec
[ 4] 0.0-10.0 sec 1.02 GBytes 877 Mbits/sec