[SOLVED] USB3 SSD speed is 480Mbps

My Crucial X9 (USB 3.2 / CT2000X9SSD9) speed is extremely slow (~40MB/s) and it seems it is running at 480Mbps (USB 2.0) speed ! I tried every USB ports (the blue one are supposed to be USB 3.0) without success.

I’m relatively new to TrueScale, and I dont really know how to troubleshoot it. Any hints?

root@truenas[~]# cat /sys/kernel/debug/usb/devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh=12
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 6.06
S:  Manufacturer=Linux 6.6.29-production+truenas 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
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0634 ProdID=5605 Rev= 1.10
S:  Manufacturer=Micron
S:  Product=CT2000X9SSD9
S:  SerialNumber=2338E8D65455
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=300mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=uas
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 0 Alt= 1 #EPs= 4 Cls=08(stor.) Sub=06 Prot=62 Driver=uas
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

T:  Bus=01 Lev=01 Prnt=01 Port=04 Cnt=02 Dev#=  3 Spd=12   MxCh= 0
D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0bda ProdID=b85b Rev= 0.00
S:  Manufacturer=Realtek
S:  Product=Bluetooth Radio
S:  SerialNumber=00e04c000001
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms

T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#=  4 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0573 ProdID=1573 Rev=80.07
S:  Manufacturer=CSCTEK
S:  Product=USB Audio and HID
S:  SerialNumber=A34004801402
C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I:* If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I:  If#= 1 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E:  Ad=82(I) Atr=05(Isoc) MxPS= 100 Ivl=1ms
I:* If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I:  If#= 2 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E:  Ad=01(O) Atr=09(Isoc) MxPS= 192 Ivl=1ms
I:* If#= 3 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=(none)
E:  Ad=02(O) Atr=03(Int.) MxPS=  64 Ivl=1ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=10000 MxCh= 4
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 3.10 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev= 6.06
S:  Manufacturer=Linux 6.6.29-production+truenas 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
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

lspci output:

root@truenas[~]# lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Device [8086:461c]
00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-N [UHD Graphics] [8086:46d1]
00:14.0 USB controller [0c03]: Intel Corporation Device [8086:54ed]
00:14.2 RAM memory [0500]: Intel Corporation Device [8086:54ef]
00:16.0 Communication controller [0780]: Intel Corporation Device [8086:54e0]
00:17.0 SATA controller [0106]: Intel Corporation Device [8086:54d3]
00:1a.0 SD Host controller [0805]: Intel Corporation Device [8086:54c4]
00:1c.0 PCI bridge [0604]: Intel Corporation Device [8086:54ba]
00:1c.6 PCI bridge [0604]: Intel Corporation Device [8086:54be]
00:1d.0 PCI bridge [0604]: Intel Corporation Device [8086:54b0]
00:1f.0 ISA bridge [0601]: Intel Corporation Device [8086:5481]
00:1f.3 Audio device [0403]: Intel Corporation Device [8086:54c8]
00:1f.4 SMBus [0c05]: Intel Corporation Device [8086:54a3]
00:1f.5 Serial bus controller [0c80]: Intel Corporation Device [8086:54a4]
01:00.0 Non-Volatile memory controller [0108]: MAXIO Technology (Hangzhou) Ltd. NVMe SSD Controller MAP1202 [1e4b:1202] (rev 01)
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:b852]

Looks like it is running at USB 2.0 speeds.

What does this output reveal?

lsusb -tv

Unfortunately, lsusb is not available on TrueNas Scale…

Really?

What about if you try running /usr/bin/lsusb or /usr/sbin/lsusb ?

I don’t see your hardware list.

You can show your interest in getting lsusb in this jira issue:
https://ixsystems.atlassian.net/browse/NAS-112275

2 Likes

This is a NUC (Intel Alder Lake N100), here. There’s 2 USB 3.0 port.

Did that come with its own cable?

Problem is, there are many variations of cables and it is quite often that a cable provides USB 3 charging power, but only USB 2 data capability. Consider trying 1. different cables, and 2. connecting to another PC to see if this combination of SSD and cable works at USB 3 speed in a different system.

1 Like

That is a big claim:

Many variations of USB cables?
Please list at least 4 or 5 “variations”.

USB 3.0 cable with only USB 2 data speeds?
I gotta see that cable, but it’s an easy claim when you don’t know how the USB protocol works or the cables involved:

Power-only USB cables (2.0 or 3.0), only have 2 wires for the positive and negative power/voltage.

100% of USB cables (2.0 or 3.0) that do data transfer, they ALL have 2 (USB 2.0) or 4 (USB 3.0) extra wires that use differential encoding to transfer the data.

Yes, the USB 3.0 cables do have more data capacity (more twists, like ethernet), but I have yet to see a USB 3.0 cable that was made to do only USB 2.0 speeds).

Now, there is a handshake that does happen when you first connect a usb device to a usb port, that’s what defines the speed at which it would transfer (2.0 or 3.0), so even incorrect usb drivers could cause such thing.

Test the same device/wires on a different system.

I happen to have cables that do exactly that, but I don’t think I can produce a good enough photo.

If you are interested in the details, the spec is at
https://www.usb.org/document-library/usb-type-cr-cable-and-connector-specification-release-23

refer specifically to

  1. Page 34 Figure 2-1 for the difference in wiring
  2. Page 35 Section 2.2 for the list of defined types of cables (not counting low-quality bad implementation), explicitly mentioning USB 2.0 Type-C cable with a USB 2.0 Type-C plug at both ends for USB 2.0 applications.
  3. Page 43 Table 3-1 for list of standard cable variants (12 in total).
2 Likes

Type C is a whole lot more than USB 2-3.

Were we not talking about USB 2 and 3 specifically?

First, there are NOT that many variations. NOT when we are talking about external USB Disk adapters! (how many variations of the connectors in such adapters have you ever seen?).

The standard is one thing, but the real wires available in the field, is what we are talking about. They are made to avoid people using them wrong.

Of course that the USB-C specification would list a USB 2.0 “plug”, as USB-C spans all previous USB specifications, so it’s just an expensive USB-C cable working as a USB 2.0 speeds and the “magic” happens with the connector used towards the device!).

(the variations in the USB C standard accommodate extra power, video and other signals/protocols that use a lot more power and speed than USB 3.0, so if some vendor went and made a USB 2.0 cable for a very specific device, it’s just that).

That table of variations is below, but do you notice how the USB-C cables for the USB 2.0 “variation”, have the very old mini or micro USB on the other side? (that’s alone makes it an OBVIOUS USB 2.0 cable).

The other 2 USB-C to type-A USB2 variations are just that, and I assure you that they came with a very specific device and can NOT be plugged into an external USB 3.0 disk adapter.

You could not even use the “bad variations” of wires that easily:

All external USB 2.5in disk adapters that I have bought in the last 10? years came with the USB 3.0 Micro-B, so it is impossible to connect a USB2 cable (mini, micro or type-A USB 2.).

All external USB Disk adapters for 3.5in disks that I have seen, come with the USB 3.0 Type-B, as they have the space for that connector, but the wires and connections are exactly the same, just bigger connector size than the USB 3.0 Micro-B. Again, impossible to connect any other wire.

(I do have a few older ones that did use the Type-A on both sides -or micro on one side, but again, they were USB 2.0 and you can tell immediately by just looking).

There are USB-C external disk adapters, but most still have the USB3 micro-B on the other side, which makes it a USB 3.0 cable.
Only USB-C to USB-C can support 10 Gbps and faster, and USB 3.0 cables can do USB3.2 Gen2 x1, 10 Gbps, but not 20 Gbps.

Bottom line: If using what looks to be the right cable for the USB 3.0 device, and the device powers-on and can transfer (at any speed), the only real-life possibility for USB2 speeds on a USB3 port, are:

  • Hardware: Damaged cable (making it a USB 2.0 cable).
  • Software: Bad driver in OS (driver recognizes device as USB 2.0 and not 3.0).
    -Firmware: Buggy code in USB chipset in PC (rare, but has happened).
    -Firmware: Buggy code in USB chipset in device (not common, but CHECK for firmware updates for the device).
  • Hardware: Bad port on either side (bent/dirty pins that make the cable USB 2.0).

Giving us the USB spec did not change my opinion that your comment was a generic answer/guess, a bit exaggerated and baseless as far as real life/experience goes.

(Non-precise people/answers/techs can be dangerous as they lead you to the wrong paths/knowledge. Same for book-only smart people that have little real life experience with what exists).

Table 3-2 USB Type-C Legacy Cable Assemblies
Cable Ref Plug 13 Plug 23 USB Version Cable Length2 Current Rating
AC2-3 USB 2.0 Standard-A USB 2.0 Type-C1 USB 2.0 ≤ 4 m 3 A
AC3G1-3 USB 3.1 Standard-A USB Full-Featured Type-C1 USB 3.1 Gen1 ≤ 2 m 3 A
AC3G2-3 USB 3.1 Standard-A USB Full-Featured Type-C1 USB 3.1 Gen2 ≤ 1 m 3 A
CB2-3 USB 2.0 Type-C2 USB 2.0 Standard-B USB 2.0 ≤ 4 m 3 A
CB3G2-3 USB Full-Featured Type-C2 USB 3.1 Standard-B USB 3.1 Gen2 ≤ 1 m 3 A
CmB2 USB 2.0 Type-C2 USB 2.0 Mini-B USB 2.0 ≤ 4 m 500 mA
CµB2-3 USB 2.0 Type-C2 USB 2.0 Micro-B USB 2.0 ≤ 2 m 3 A
CµB3G1-3 USB Full-Featured Type-C2 USB 3.1 Micro-B USB 3.1 Gen1 ≤ 12 m 3 A
CµB3G2-3 USB Full-Featured Type-C2 USB 3.1 Micro-B USB 3.1 Gen2 ≤ 1 m 3 A

1 Like

Meanwhile, the OP patiently waited…

3 Likes

Well, it’s not just an expensive USB-C cable, but it is missing wires and can’t work at USB 3 speeds.

I still don’t think I can make a photo of what I have, so I found someone else’s from Twitter - see x.com

That’s the difference I was thinking about.

So, coming back to the original question, I wonder if the cable came with the SSD or if the original poster was using some other cable, as the original is short. The cable that came with the SSD should work, but other cables may well not.

1 Like

Nothing to wait for:

Try it in a different system and with a different OS if you need.

Then try different cables (IF you simply can’t tell or remember which cable came with the device).

Try a DIFFERENT device with the same cable in the same system and then another system.
Doesn’t anybody have any basic testing skills?

This is NOT rocket science.

I try to tech people to fish. Some refuse knowledge and logic and prefer myth, beliefs and urban legends that only waste time, effort, good-will.

1 Like

@nono240 - In general, using USB attached storage does not work well with ZFS, (and TrueNAS). Their have been a few, (as in more than 10), instances where a USB attached storage device caused problems for a TrueNAS user. (To be fair, those 10 times were over several years…)

There are other issues and problems with USB, thus I wrote about them here;

Sometimes using a USB for the boot device works okay. Especially if you save your configuration often.

I am not trying to stop you from using the NUC or USB attached storage. It is just that if you have trouble, the answer might be to use hardware that is more NAS than miniature PC. Or to use different NAS software that does not use ZFS.

As for the speed issue, I don’t have a direct answer.

But, do you have a known working USB 3.x speed device?
And does it work at USB 3.x speeds on the NUC?

The output you show clearly has 480Mbit/ps, Spd=480, so a USB 3.x speed device should show at least 5Gbit/ps.

2 Likes

Here we go with the urban legends.

“Sometimes” does not work in my world, when I have at least 12 servers, all of them with external USB drives with 2.5in SSDs (Samsung) and none have ever failed to boot, shutdown or upgrade properly.

Yes, upgrades are a bit slower than in a SATA SSD.
But, USB 3.0 with UASP protocol is not terrible as the bulk transfers are fast, but smaller transfers are slower due to the higher latency of the protocols and translations.

How many/kids of setups I have like that?
At least 3 different PC/server (I use both) BRANDS and 2 to 4 different models among them.

When people don’t understand a spec or standard, is one thing, but when they try to use their
limited/flawed logic and declare something as true or valid, well.

Bottom line:
Properly implemented USB ports/stacks/chipsets can be quite reliable:
My “Quasi Enterprise” setups for the last 4 years (8-12 systems) prove so (not one issue with them external usb boot drives!).

Yes, I was using non-ssd USB drives (Samsung fit) before using SSDs, and they NEVER let me down under ESXi (cause ESXi does NOT write much to the boot drive!).

That was not the case for TrueNAS Core, I could tell right away how slow an upgrade took, and it did kill a couple of those not-so-cheap flash drives, within a few months.

(I remember now that FreeBSD had WORSE USB drivers than Linux. Can’t remember now what I was, but the usb driver implementation was more “flaky”. Linux usb driver seems pretty solid -take that bsd groupies!).

That was before SCALE with apps and the ix-systems directory, but that’s when I moved 90% of my systems to external usb drives for boot (why waste a precious 3.5in disk space just for boot!?).

Thanks to everyone ! I was focusing on some kind of drivers issue but you showed me the right direction to look at: the culprit was that cheap USB-C to USB-A adapter I was using (supposed to be USB 3.0, despite its blue color)… Indeed, the drive+cable was working fine using USB-C on my laptop - but drops to USB 2.0 speeds using the adapter… I’m gonna buy a good cable instead!

PS: I’m not using that disk for booting, just for backup.

2 Likes

Good! Consider marking @Alexey 's post (“Did that come with its own cable?”) as Solution.

2 Likes

Now this does work reasonably well, backup disk on USB, (both with ZFS & TrueNAS). I do so myself.

It is not an urban legend that some USB device don’t work well.

However, skip my comments. You seem to have found successful methods to implement USB. So I’d suggest writing a forum Resource, perhaps titled;

Path to success with USB attached storage

You can then include that using USAP helps performance. That it appears FreeBSD, (used in TrueNAS Core), has worse USB support than Linux, (used in TrueNAS SCALE).

Write it once, and reference it as needed or desired.

It is just that we see in these forums people using USB with trouble. For example, just today;

2 Likes