Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8609

Interfacing (DSI, CSI, I2C, etc.) • Re: USB 3.0 and raspberry pi 4 (solved)

$
0
0
Sorry for the delay in getting back. Busy with holiday preparations. But today I resolved my issue.

Let me first explain what it is that I was trying to do. I have about five older, external USB 3 drives that range anywhere from 1TB to 6TB. All with NTFS, some are 2.5" without external power, others are 3.5" with external power. As I stated previously I was getting about 150 MBs/sec when connecting one of these to the Windows machine's USB 3 port.

I though I would build a file server by putting them all into an old Craftsman toolbox, along with the raspberry pi, a usb3 powered hub, a surge protection power strip, a stout A/C cooling fan and all the associated power items (wall warts, a 3 amp supply to the USB hub, etc..). BTW, All the 2.5" drives are plugged into the powered hub.

Pi4 is latest image fully updated with firmware update as well.

So, setup fstab, setup smb.conf and you'd think all would be good. But all I was getting was 9-10 MBs/sec transfer from My windows machines on the network. Basically worthless for backup tasks.

So my first experiment (which threw me off track) was to bypass things and just use WInSCP to transfer a large file from the Windows machine to the sd card on the pi. That went at around 40 MB/s, faster, but we all know ssh transfers have encryption overhead. So I thought OK, it must be the USB transfer rate.

Then there were some folks in various forums talking about how the NTFS file system on the drives being a performance problem. Especially pointing out that Samba with ntfs mounted drives being a big issue. So I decided simplify things and just connect one empty 1TB drive to one of the pi's USB 3 ports. Again, transfers from the Windows machine was still 9-10 MBs/s. I then partitioned and formatted the drive as ext4. Again still only 9-10 MBs/s.

So now I decide to WinSCP from my Windows machine a large file to the USB external drive. 40 MBs/sec. Hmmm. Could Samba be the culprit here? That is indeed the case.

So I looked at this:
https://superuser.com/questions/713248/ ... rite-speed

Most of which is useless and outdated samba tweak information. But down at near the bottom it is mentioned to set the following in smb.conf:
interfaces = 127.0.0.0/8 eth0
bind interfaces only = yes

Once I did that I could transfer at a more reasonable 112-115 MBs/s rate.

Subsequent switching back to ntfs on the drive and the tranfer rate remained unchanged. So the file system has no impact at these non UAS usb 3 speeds (mounting with ntfs3 that is). Probably with UAS the performance of ext4 vs ntfs would be revealed.

I thought my cheap $15 USB 3.0 8 port hub would have a negative impact on performance but that is not the case. All drives are now connected back up and transfer rates are consistent across all of them.

So, sorry for the red herring and blaming it on the pi's usb port. Hopefully this will help others attempting a similar project with similar hardware

Here is lsusb for those curious as to the USB chips on these external hub and drives:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 004: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 005: ID 1058:2621 Western Digital Technologies, Inc. Elements 2621
Bus 001 Device 006: ID 1f75:0621 Innostor Technology Corporation IS621 SATA Storage Controller
Bus 001 Device 007: ID 174c:1153 ASMedia Technology Inc. ASM1153 SATA 3Gb/s bridge
Bus 001 Device 008: ID 174c:5136 ASMedia Technology Inc. ASM1053 SATA 3Gb/s bridge
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 174c:1153 ASMedia Technology Inc. ASM1153 SATA 3Gb/s bridge

Statistics: Posted by sprite59 — Mon Dec 08, 2025 3:41 am



Viewing all articles
Browse latest Browse all 8609

Trending Articles