Slow HDD diagnostics

Mar 17, 2021 8 Replies

I have 4 external drives connected to my rpi4b (4G). 1 is a WD Blue SSD co nnected to usb3 port with the rootfs. The other 3 are HDDs connected throu gh an USB3 hub to the other rpi usb3 port. One of the HDDs is much slower than the other drives. What are some diagnostice commands I could use to t ry to diagnose why the drive is slower than the others?



Here are results of lsusb and hdparm outputs with my comments in { }.



pi@rpi4b:~ $ lsusb Bus 002 Device 003: ID 059f:1065 LaCie, Ltd Bus 002 Device 004: ID 0bc2:ab28 Seagate RSS LLC Bus 002 Device 005: ID 152d:1561 JMicron Technology Corp. / JMicron USA Tec hnology Corp. JMS561U two ports SATA 6Gb/s bridge Bus 002 Device 002: ID 2109:0815 VIA Labs, Inc. Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 008: ID 05ac:921d Apple, Inc. Bus 001 Device 005: ID 05ac:911d Apple, Inc. Bus 001 Device 010: ID 05ac:020b Apple, Inc. Pro Keyboard [Mitsumi, A1048/U S layout] Bus 001 Device 007: ID 03f0:134a HP, Inc Optical Mouse Bus 001 Device 004: ID 05ac:1003 Apple, Inc. Hub in Pro Keyboard [Mitsumi, A1048] Bus 001 Device 006: ID 0080:a001 Bus 001 Device 003: ID 2109:2815 VIA Labs, Inc. Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub



pi@rpi4b:~ $ sync; sync; sudo hdparm -t /dev/sda /dev/sda: {4TB 2.5 HDD unknown rpm} SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 2



4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Timing buffered disk reads: 342 MB in 3.00 seconds = 114.00 MB/sec

pi@rpi4b:~ $ sync; sync; sudo hdparm -t /dev/sdc /dev/sdc: {8TB 3.5 HDD 5400rpm} Timing buffered disk reads: 100 MB in 3.01 seconds = 33.25 MB/sec



pi@rpi4b:~ $ sync; sync; sudo hdparm -t /dev/sdd /dev/sdd: {3TB 3.5 HDD 7200rpm} Timing buffered disk reads: 388 MB in 3.05 seconds = 127.37 MB/sec



pi@rpi4b:~ $ sync; sync; sudo hdparm -t /dev/sdb /dev/sdb: {WD Blue SSD 2.5 form factor, rootfs} Timing buffered disk reads: 576 MB in 3.00 seconds = 191.87 MB/sec



Why is /dev/sdc so slow runnning through same usb3 hub as /dev/sda and /dev /sdd? I don't think it is rotation speed of drives.



TIA/ --Steven



On Wed, 17 Mar 2021 10:40:29 -0700 (PDT), " snipped-for-privacy@gmail.com" declaimed the following:

I'd blame rotation speed with a fragmented file system -- fragmentation and head seeks means waiting for the platter to rotate the next desired sector into position.

It's also a larger drive, and if inodes are stored in one area, with data stored elsewhere, and the journal somewhere else, there could be a lot more seeking being performed.

Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

That speed looks like it is running at USB2 speeds. Are you sure the USB adpapter is USB3? Maybe it's USB2

Orico SATA3.0 - 6Gbps enclosure {USB3.0+SATA III; Support capacity 16TB; Support UASP} Seagate Barracuda 8TB HDD

It should be as fast as the other drives.

--Steven

Try testing it without other drives connected to that USB hub.

Filesystem layout isn?t relevant here. ?hdparm -t? doesn?t measure filesystem performance, only raw read.

https://www.greenend.org.uk/rjk/

It _should_ be. But it can happen that a fully USB3 configuration can still negotiate only USB2. One of my backup drives used to suffer from this. Have a look at what appears in the kernel log when you connect the drive (I?m afraid I don?t remember exactly what to look for).

https://www.greenend.org.uk/rjk/

There are lots of issues with RPI4 and USB3 attached drives - check the forum, especially this _long_ sticky thread ...

formatting link

Always make sure your USB3 A plug is _fully_ pushed into the USB3 A socket - otherwise only the USB2 contacts will engage. The USB3 extra contacts are further back and might not engage.

I have a USB3 attached SSD, and then a powered USB3 hub with 2 disks attached and get reasonable individual speeds on the disks, i.e. more than USB2 speeds. My WD passport 1TB 5400 rpm disks are not super-fast (92MB/sec) but that's to be expected.

The easy way to do that it the open a console and run:

sudo tail -f /var/log/messages

and then connect the drive. You'll get severa;l log lines that give details about the device that you just plugged in, and what USB type (USB2, USB3) its connecting as.

Kill 'tail' by typing Ctrl/C when you've finished.

Martin | martin at Gregorie | gregorie dot org

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required