Socket 3: 4x PCI Express up to 4 GB/s fits
modules with the “M” key …
My PC motherboard (gigabyte) has M2 slot, the same as M2 slot at bottom of Rock 5B (including physically - visually), so socket 3.
If i understand correctly, the SSD will communicate as a device with M key. The problem is there is no power on the SSD, on the SSD device there are two red LEDs, one is power, and the other is communication with the controller, i think.
The power LED is not ON when attached to the M2 socket (Rock 5B). I changed to sata0 but this breaks PCIe 2.5 ethernet. And still no power. no red LED ON.
This is stuff from the past. The new socket was called NGFF back then but after standardization happened is called M.2 now and socket 2/3 have names (those funny keyings and so on).
RK3588 has five PCIe controllers and three Combo PIPE PHYs. Of these three latter things the first is routed to the RTL8125BG chip, one to the key E slot and the other to USB3. As such as you experienced if you turn just a random PCIe Gen2 lane to SATA (sata0) things break (the RTL8125BG is only PCIe capable and if you change the PHY mode to SATA it will get disconnected).
The only two ‘slots’ where you could get SATA signals are the key E slot and one USB3-A receptacle. In both cases ‘all’ that’s needed is a DT overlay and some custom made adapter for your B/M keyed SATA SSD.
The M.2 key M slot has no SATA capabilities whatsoever so simply forget about inserting a SATA SSD here. It will never work and power is the least problem. The only way to bring the key M slot together with SATA is by slapping a SATA host controller into and by wiring your SSD to this thing (maybe on Aliexpress M.2 SATA host controllers exist that feature another M.2 slot to insert a SATA SSD).
BTW: the keying also has no direct relationship to the physical protocol layer since key B is specified to carry ‘PCIe ×2, SATA, USB 2.0 and 3.0, audio, UIM, HSIC, SSIC, I2C and SMBus’ and key M is able to carry ‘PCIe ×4, SATA and SMBus’.
And there’s a reason nowhere NVMe is mentioned since NVMe is the storage protocol above the physical layer (that is almost everywhere PCIe with NVMe, with SATA the storage protocol is always AHCI but a decade ago PCIe SSDs that relied on AHCI instead of NVMe were a thing).
TL;DR: the way Radxa decided to route the available PCIe/SATA lanes there’s no way to get any SATA SSD attached directly into the M.2 key M slot to work. Since this slot is unable to be turned into SATA. This is both Rock 5B and RK3588 specific and what happens on mainboards or somewhere else is irrelevant
Check the SSD for fake capacity with f3 and then use it somewhere else unless you’re willing to build/use mechanical adapters and then attach the thing to the key E slot or USB3-A.
Interesting, here it is rated read 1700MB/s, write 1100MB/s with good price.
The only problem i see is if i start compiling things, it will be filled up in 2 months…
Never mind, what is important is the TBW: Up to 960GB.
A time back i saw a video about a external SSD drive that was bought on a chinese website. These guys are not dumb. They know how to work the controller firmware and put some microsdcards in it to fool everything.
About SSD having power by just inserting it into the m.2 slot. Both the M.2 NGFF (SATA) as well as M.2 NVME use very to almost no wattage. So you do not need extra power to make it work. The only difference is for example with a M.2 NGFF (SATA) you need to connect it to a SATA port, while the M.2 NVME uses the PCI slot itself for connection.
And yes with the Rock 5B, you just put the M.2 NVME in the M.2 slot and it works. At least the Samsung 970 Evo Plus NVME SSD of mine.
You are comparing benchmarks with random numbers generated by hdparm (which was a benchmark last century but not today any more).
This is 5 times hdparm with a cheap Kioxa consumer SSD (the junk currently mounted on my Rock 5B):
Timing buffered disk reads: 622 MB in 3.00 seconds = 207.27 MB/sec
Timing buffered disk reads: 1506 MB in 3.00 seconds = 501.95 MB/sec
Timing buffered disk reads: 2670 MB in 3.00 seconds = 889.99 MB/sec
Timing buffered disk reads: 4894 MB in 3.00 seconds = 1630.62 MB/sec
Timing buffered disk reads: 4242 MB in 3.00 seconds = 1413.98 MB/sec
First two are with cpufreq on lowest setting, next two with cpufreq on the highest setting. Always a little core first followed by a big one.
With Radxa’s OS images until recently (see here for details) and with Armbian still and most probably forever the needed tweaks aren’t applied to ramp up CPU clockspeeds with I/O workloads. As such with hdparm in ‘fire and forget’ mode you’re ‘benchmarking’ the cpufreq scheduler/governor more than storage. And as can be seen above this makes a difference of 210 - 1630 MB/s.
Last check above was with default settings (random behaviour based on what scheduler and cpufreq governor do). Are these 1413.98 MB/sec the ‘drive performance’?
No of course since hdparm uses a block size from last century (128KB were huge back then when Linux developers added the -t and -T switches to the tool when they dealt with spinning rust attached to an IDE interface or worse). And also the --direct switch was missing.
Today we should check with 1M or better 16M. With my junk Kioxa SSD this then looks like this using taskset -c 4 iozone -e -I -a -s 1000M -r 16384k -i 0 -i 1:
Please stop posting such nonsense. NGFF is how M.2 was called. It’s a mechanical connector, nothing more, nothing less. Just think about to which page this link redirects: https://en.wikipedia.org/wiki/NGFF
I have an M3 Station board with RK3588s processor that works with m2 sata by default but can also work with M.2 NVME depending on dtb, I tried it personally. I saw that it works with the m2 to sata adapter, so it should work. I didn’t try it on rock 5b because it has a lower speed…
M3 Station cannot work on 4 pcie buses because it does not have them and then it works better on m2 sata.
sure m3 is more expensive because of the s of super
If it’s NVMe ofc it’s compatible. I would better check whether it has a fake capacity with f3 and check what this thing really is (“Goldenfir” does neither NAND flash nor SSD controllers).
Searching for this reveals that this thing claims to be based on a Silicon Motion SM2263EN controller (used by countless OEMs like Fanxiang, Kingston, Kingchuxing and whoever else). While I personally would never buy from those OEM brands slapping together 3rd party NAND flash and 3rd party SSD controllers (Kingston included) maybe that’s a legit drive.
Now you know that this thing gets dog slow with continuous writes even if the usual hdparm BS shows way higher numbers.
But did you execute f3read as well? Since that’s the verify step to ensure your flash devices doesn’t show a fake capacity…
BTW: when refering to f3 to check for fake/real drive capacity (regardless of type, be it an SSD or an SD card or whatever else flash storage) I’m usually talking about f3probe first at a stage where the new device is yet not mounted (the check is non-destructive unless you set --destructive):
root@rock-5b:~# f3probe /dev/nvme0n1
F3 probe 7.2
Copyright (C) 2010 Digirati Internet LTDA.
This is free software; see the source for copying conditions.
WARNING: Probing normally takes from a few seconds to 15 minutes, but
it can take longer. Please be patient.
Probe finished, recovering blocks... Done
Good news: The device `/dev/nvme0n1' is the real thing
Device geometry:
*Usable* size: 238.47 GB (500118192 blocks)
Announced size: 238.47 GB (500118192 blocks)
Module: 256.00 GB (2^38 Bytes)
Approximate cache size: 0.00 Byte (0 blocks), need-reset=no
Physical block size: 512.00 Byte (2^9 Bytes)
Probe time: 12.70s
(latest f3 version is 8.0 from 2020 and since then the master branch was updated countless times but I guess the distro version at least when running latest Ubuntu/Debian versions is fine)
rock@rock5b:~/rockchip/nvme/f3-8.0$ sudo ./f3probe /dev/nvme0n1
F3 probe 8.0
Copyright (C) 2010 Digirati Internet LTDA.
This is free software; see the source for copying conditions.
WARNING: Probing normally takes from a few seconds to 15 minutes, but
it can take longer. Please be patient.
Probe finished, recovering blocks... Done
Good news: The device `/dev/nvme0n1' is the real thing
Device geometry:
*Usable* size: 476.94 GB (1000215216 blocks)
Announced size: 476.94 GB (1000215216 blocks)
Module: 512.00 GB (2^39 Bytes)
Approximate cache size: 0.00 Byte (0 blocks), need-reset=no
Physical block size: 512.00 Byte (2^9 Bytes)
Probe time: 16.43s
Regarding f3read i wasn’t aware it would do an error check, i then deleted the files, and later i ran with fewer files, it was about 600 MB/s.
I am building the latest BSP kernel and will redo a complete test with performance and optimization and see what i get.
This SSD was not really cheap, i have seen a video that states Kingston NV2 1TB been almost the same price (well, not really the same as i paid for my 512GB). I tried to find this device with claimed price, but did not find.
I am thinking to order a Lexar SSD NVME M2 7500MB/s 1TB M.2 2280 PCIe 4.0 for $65 (low-end).
Would that work with PCIe 3 and still be fast with PCIe3 (or just a waste)?
Sure, PCIe ‘link training’ is part of the specs and two PCIe devices will always negotiate highest link width/speed both support.
You only need to care if this Lexar thing is a Gen4 x2 offer since then performance on a PCIe Gen3 capable host will be severly harmed.
If it’s a Gen4 x4 drive then Gen3 x4 will be negotiated as such you ‘loose’ half the theoretical max bandwidth and a little bit of random I/O performance (which is way more important anyway even if the whole hobbyist/SBC world only cares about those silly sequential transfer speeds).
And if this SSD will be not already worn out in 5 years being already capable of Gen4 speeds is an advantage since the host it will be combined then with is most likely at least Gen4 capable.