For years, SBCs that aren't Raspberry Pis experimented with eMMC and M.2 storage interfaces. While the Raspberry Pi went from full-size SD card in the first generation to microSD in every generation following (Compute Modules excluded), other vendors like Radxa, Orange Pi, Banana Pi, etc. have been all over the place.
Still, most of the time a fallback microSD card slot remains.
But microSD cards—even the fastest UHS-II/A2/V90/etc. ones that advertise hundreds of MB/sec—are laggards when it comes to any kind of SBC workflow.
The two main reasons they're used are cost and size. They're tiny, and they don't cost much, especially if you don't shell out for industrial-rated microSD cards.
They're so small, in fact, that it can be hard to pick one up off a desk. In many cases, a small tweezers are required to extract them once inserted. My GoPro's slot is so poorly placed I've damaged both my fingernail and a microSD card trying to use the infernal push-push mechanism in the tiny battery compartment.
With SBCs, the rest of the world (outside Raspberry Pi) settled on either a space for an eMMC module, built-in eMMC, or an M.2 M-key slot for primary storage. Almost all the main boards have them either on top or bottom.
But the Pi—even the latest Pi 5 variant—stubbornly avoided this, opting for external USB storage for those wanting more speed or reliability.
Today, Raspberry Pi introduced a first-party M.2 HAT+. They've even released the schematics, so people can build off their reference design more easily.
In fact, there are already dozens of other NVMe and M.2 HATs for the Pi 5, but it's nice to have a more finalized HAT+ specification vendors can work from. Some creative adaptations include Radxa's use of their existing Penta SATA HAT for the Pi 5 with a special PCIe adapter cable.
But back to the topic of this post: despite what many commenters on my YouTube videos think, Raspberry Pi still holds the lion's share of the entire SBC market. As goes Raspberry Pi, so goes the rest of the SBC market.
And their new M.2 HAT (along with the inclusion of PCIe accessible to the end user) signals what I think will be a transition to faster primary storage. Maybe a revision to the Pi 400 will include an internal M.2 slot?
I remember when desktop computers transitioned from primarily spinning hard drives for boot volumes to SSDs. It was a life-changing difference, as random access was especially fast on solid state storage. The immense performance gains all but ended the hard disk's reign as the de facto standard for desktop PC storage.
Hard drives still have a ton of utility—I have a bunch in my NAS, and they're great for value, beating out most other storage media for cost per TB.
Similarly, microSD cards are great for recording and transferring files like photos and videos for mobile devices—whether phones, drones, or small cameras.
But I know for me, except in cases where I use a Pi in a more 'embedded' style use case (which is honestly better suited for microcontrollers like the ESP32 or Pico these days), I've deployed Pi 5s with a cheap 128 or 256 GB $25 NVMe SSD and a $12 HAT, giving a nice, well-supported Linux device sipping 4-5W of power for $100 or so. The NVMe drives are generally 10-100x faster than microSD (especially at IOPS/random access), though they cost about 2x per GB, and use about 1W vs 0.1W at idle—YMMV.
Sure, mini PCs in the $150-200 range are faster, and in many cases better for desktop use. But a Pi is great, too (especially if you do need to add on some embedded integration using GPIO or cameras or displays). Now that the shortages are over, Pi's are also available, which is nice :D
I'm especially excited Raspberry Pi finally has NVMe boot behind a PCIe switch working. Even though current multi-drive HATs take a hit on PCIe speeds, they add to the Pi's potential utility, especially with HAT's like Pineboards' HatDrive! AI Coral bundle, which matches up a Coral TPU (included) with an NVMe slot, for a tidy little 5W setup for something like Frigate with object detection.
I made a video where I did some more testing of the Pi M.2 HAT+ and other HATs, which you can watch below:
Comments
Thanks for letting me know about Pineboards. This will make me choose Raspberry Pi to build Frigate first. Since I only have one camera and there is no way to use a large PoE switch for power supply, I have been looking for a small product with low power consumption. It can power the camera through 12V at the same time through a dedicated UPS driver with 3 batteries, and there are two network ports for connecting to the network and the camera respectively. Now maybe I can use Raspberry Pi 5+Pineboards+USB ethernet +UPS to achieve it.
> The two main reasons they're used are cost and size.
The third is (idle) consumption.
True, true—like 0.1W versus 1-2W depending on the NVMe drive.
Does this support stacking with a PoE hat?
If you harden your os just a 'little' by putting /var/log into tmpfs and always work out of a tmpfs partition you don't need to spend that money. Even on an ancient pi a tmpfs pseudo-ramdisk is faster than any physical media. That cuts your cost in half per unit.
My couple examples are a fswebcam/ffmpeg based webcam and a little cron magic to assemble and rsync the assembled timelapse movie to a cheapo AWS instance. Runs great on an ancient old model-B pi with a USB webcam. Other example is a pi4 running multiple weather stations via weewx. Doesn't even breathe hard and no SSD required at all.
Just make the os semi-embedded-like by putting where it writes into tmpfs and you can buy two setups for the price of one+M2 HAT.
Hi Jeff, do you know if this will work alongside the official PoE hat?
I hope we will soon see a drop price in NVMe, 4 TB are still very expensive
Got my m.2 Hat+ today
Cloned my ubuntu drive
Using Disks on Ubuntu 23.10
256 GB Disk — Sabrent SB-2130-256 [R21B47.1] (/dev/nvme0n1)
at 18 May 2024 17:42:07 BST (5 minutes ago)
10.0 MiB (10,485,760 bytes)
462.2 MB/s (1000 samples)
0.08 msec (2000 samples)
Happy with that
Nice! You might be able to force PCIe Gen 3 speed too, to get it even faster.
This is a great board! Using a 1TB m.2 Lexar Play nvme drive and its solid. I have the Pineboards Hat Drive Dual, but could never get it working reliably. Never heard back from support unfortunately, so it went in the forever bin.
For the HatDrive Dual, there are some issues with certain drives (most that use the Phison controller), and we debugged a lot of that in this issue: https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/633. Hopefully the fixes for it will end up in Pi OS soon!
Thanks for the reply! I did look at that post before I tossed it in the bin of doom. I'll be on the lookout for those updates!
Hi! Has anyone created a compatibility list for M.2 SSDs for the new HAT?
The only information I found googling is people pointing to Pimoroni's list of unofficially supported SSDs (https://shop.pimoroni.com/products/nvme-base?variant=41219587178579) but they're mostly (all?) in the 2280 format.
Thanks!
I keep a list of all the NVMe SSDs I've tested on my Pi PCIe database here: https://pipci.jeffgeerling.com/#m2-and-nvme-adapters. I think Pineboards also has a list around somewhere.
Great, thanks for sharing! (I swear I did look on your website, clearly I didn't look hard enough)
I see you list the Sabrent Rocket NVME 8Tb, which is a bit rich for me, but I have a Rocket SB-2130-256 in (on?) my M.2 HAT+ and it seems to be pretty solid. It even scored just under 62000 on the Pimoroni test which seems good for C$60 inc taxes (US$40 from the big river US)
If anyone's interested I installed a 256GB WD SN530 SSD PC (SDBPMPZ-256G) and it seems to work fine, I did some minimal testing with hdparm and it rates around 450MB/s.
Nobody's going to stick a M.2 in a smart speaker, streaming stick, IP phone, doorbell camera... They're going to stick with eMMC, so SOCs and SBCs are going to continue to support SD. M.2 is only going to serve a small slice of higher performance edge compute.