External USB HDD too slow

Ask questions about Arch Linux ARM. Please search before making a new topic.

External USB HDD too slow

Postby rafaelcastellar » Thu Nov 09, 2017 12:30 am

Hi all!

I've bought a Seagate external USB HDD for my Pi3. I want to use it as a NAS and Media Center.
I was making some copies to this HD and I found them too slow, comparing its speed when connected directly my laptop. It is a HD 2Tb with NFTS partition.

I did some researches but not found some good solutions. One said its because of NTFS, other said it has no significant difference. Onde said it is because the lack of energy from Pi's USB, other said it is ok for Pi3.

The copies rarely runs above 1,2 Mb/s, when in my laptop are above 16 Mb/s.

Bellow are some information that may help:
When in Pi3:
$this->bbcode_second_pass_code('', '
sudo hdparm -tT /dev/sda:
Timing cached reads: 732 MB in 2.00 seconds = 365.56 MB/sec
Timing buffered disk reads: 80 MB in 3.00 seconds = 26.64 MB/sec

usb-devices:
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev=04.09
S: Manufacturer=Linux 4.9.60-1-ARCH dwc_otg_hcd
S: Product=DWC OTG Controller
S: SerialNumber=3f980000.usb
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 5
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=02 MxPS=64 #Cfgs= 1
P: Vendor=0424 ProdID=9514 Rev=02.00
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=2mA
I: If#= 0 Alt= 1 #EPs= 1 Cls=09(hub ) Sub=00 Prot=02 Driver=hub

T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ff(vend.) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0424 ProdID=ec00 Rev=02.00
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=2mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=ff Driver=smsc95xx

T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 4 Spd=480 MxCh= 0
D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0bc2 ProdID=231a Rev=07.08
S: Manufacturer=Seagate
S: Product=Expansion
S: SerialNumber=NA8JCFES
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

')

When in my laptop:
$this->bbcode_second_pass_code('', '
sudo hdparm -tT /dev/sda:
Timing cached reads: 15760 MB in 2.00 seconds = 7885.76 MB/sec
Timing buffered disk reads: 368 MB in 3.00 seconds = 122.53 MB/sec


usb-devices:
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh=12
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev=04.13
S: Manufacturer=Linux 4.13.11-1-ARCH xhci-hcd
S: Product=xHCI Host Controller
S: SerialNumber=0000:00:14.0
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub

T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 5 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=04e8 ProdID=1f05 Rev=00.00
S: Manufacturer=JMicron
S: Product=Samsung S2 Portable
S: SerialNumber=0000002CE37D4
C: #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=2mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

T: Bus=01 Lev=01 Prnt=01 Port=04 Cnt=02 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=04ca ProdID=3014 Rev=00.02
C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb

T: Bus=01 Lev=01 Prnt=01 Port=06 Cnt=03 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=04f2 ProdID=b571 Rev=99.52
S: Manufacturer=Chicony Electronics Co.,Ltd.
S: Product=HD WebCam
C: #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
I: If#= 1 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo

T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=5000 MxCh= 6
D: Ver= 3.00 Cls=09(hub ) Sub=00 Prot=03 MxPS= 9 #Cfgs= 1
P: Vendor=1d6b ProdID=0003 Rev=04.13
S: Manufacturer=Linux 4.13.11-1-ARCH xhci-hcd
S: Product=xHCI Host Controller
S: SerialNumber=0000:00:14.0
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub

')

Does anyone has some ideia?

Tks!!
rafaelcastellar
 
Posts: 27
Joined: Fri May 12, 2017 12:42 am

Re: External USB HDD too slow

Postby WarheadsSE » Thu Nov 09, 2017 3:59 pm

I don't see the same drive on both, which should be the seagate.

$this->bbcode_second_pass_code('', '
S: Manufacturer=Seagate
S: Product=Expansion
S: SerialNumber=NA8JCFES
')

$this->bbcode_second_pass_code('', '
S: Manufacturer=JMicron
S: Product=Samsung S2 Portable
S: SerialNumber=0000002CE37D4
')

A few key points:
- The Pi shares the USB ports with the Ethernet controller, so you'll always be dividing the network performance with the drive access.
- USB 2.0 is 480Mbps (bits per second) which translates to a maximum of ~60 MB/s, so divide that by 2, and take into account headroom for two devices sharing the bus and you get ~25 MB/s maximum (theoretical). That's before taking into account drive speed, protocol for transfer (and thus CPU, and network level chatter!), filesystem overhead, and lastly memory pressure.
- The Samsung S2 drive is 7200RPM, and most larger Seagate external drives are 5400RPM or slower, and this is a ~2015 model.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: External USB HDD too slow

Postby rafaelcastellar » Thu Nov 09, 2017 11:23 pm

Hi!!

I'm sorry, I was testing with my old Samsung HD and copy the wrong output. That's the correct one on my laptop:

$this->bbcode_second_pass_code('', 'T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh=12
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev=04.13
S: Manufacturer=Linux 4.13.11-1-ARCH xhci-hcd
S: Product=xHCI Host Controller
S: SerialNumber=0000:00:14.0
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub

T: Bus=01 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=04ca ProdID=3014 Rev=00.02
C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb

T: Bus=01 Lev=01 Prnt=01 Port=06 Cnt=02 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=04f2 ProdID=b571 Rev=99.52
S: Manufacturer=Chicony Electronics Co.,Ltd.
S: Product=HD WebCam
C: #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
I: If#= 1 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo

T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=5000 MxCh= 6
D: Ver= 3.00 Cls=09(hub ) Sub=00 Prot=03 MxPS= 9 #Cfgs= 1
P: Vendor=1d6b ProdID=0003 Rev=04.13
S: Manufacturer=Linux 4.13.11-1-ARCH xhci-hcd
S: Product=xHCI Host Controller
S: SerialNumber=0000:00:14.0
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub

T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0
D: Ver= 3.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 1
P: Vendor=0bc2 ProdID=231a Rev=07.08
S: Manufacturer=Seagate
S: Product=Expansion
S: SerialNumber=NA8JCFES
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=896mA
I: If#= 0 Alt= 1 #EPs= 4 Cls=08(stor.) Sub=06 Prot=62 Driver=uas
')

I think I got your point. If I disconnect ethernet it should improve?

The MxPwr in my laptop is 896mA, and in Pi3 500mA. Is it a problem? I heard about people redirecting the Pi3 current to USB... What do you think about it?

Tks!
rafaelcastellar
 
Posts: 27
Joined: Fri May 12, 2017 12:42 am

Re: External USB HDD too slow

Postby rafaelcastellar » Thu Nov 09, 2017 11:37 pm

Forgot: considering the this situation and the differences beetwen the HDDs speeds: should I have bought another model/vendor?

Tks again!
rafaelcastellar
 
Posts: 27
Joined: Fri May 12, 2017 12:42 am

Re: External USB HDD too slow

Postby WarheadsSE » Fri Nov 10, 2017 2:50 pm

$this->bbcode_second_pass_code('', '
T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0
D: Ver= 3.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 1
P: Vendor=0bc2 ProdID=231a Rev=07.08
S: Manufacturer=Seagate
S: Product=Expansion
S: SerialNumber=NA8JCFES
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=896mA
I: If#= 0 Alt= 1 #EPs= 4 Cls=08(stor.) Sub=06 Prot=62 Driver=uas
')

On your laptop, it is connecting with/using USB3, which provides significantly more power, but the data speed is the big difference: USB2: 480, USB3: 5000. Do the same math out, and you'll see well over 10x the maximum possible performance. That doesn't mean the drive can keep up, but it will certainly be way more capable.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

[SOLVED] Re: External USB HDD too slow

Postby rafaelcastellar » Sun Nov 12, 2017 2:31 pm

Thank you very much for the clarification, WarheadsSE !!

Best regards...
rafaelcastellar
 
Posts: 27
Joined: Fri May 12, 2017 12:42 am


Return to User Questions

Who is online

Users browsing this forum: mpausch and 8 guests