PCI Express Solid State on the Pi 5 for under $25

Since February I’ve been running this website, among other things from a Raspberry Pi 5. The SD card did okay, I actually can’t complain too much and if I’m being honest here I have to say SD card storage has gotten a lot less flaky since the earlier days of the Raspberry Pi.  None the less, this is my server and I want it to be decently equipped. I think the Pi 5 is mildly over priced (depending on why you need one), and getting a Pi, high performance SD card, the active cooler, official power supply, a case… you’re into some money. Not to mention the stupid mini-hdmi to normal hdmi adapter.

If you’ve already got a Pi 5 though, or know you’ll be satisfied with one then here is how I added a 128 GB SK Hynix NVMe SSD for under $25. SSD & hat included.
Geekworm BoxSK Hynix
          BC711
Amazon has various PCI-e hats for the Pi 5. Prices are between $7 and $50. But from what I’ve seen, unless you’re getting a multi-device hat I would cap my budget under $30 or so, and I’ll tell you why that might be worth considering. Spoiler, I didn’t consider it. The priciest of hats allow the use of multiple M.2 devices, but you’re sharing that bandwidth so in most cases I don’t think it makes much sense. But, bear in mind other hardware than PCI storage exists like Ai accelerators, network adapters, anything you can think of pretty much.

In some of Jeff Gearling’s content covering these pcie hats, he mentions that not all of them come with an impedance matched ribbon cable. What  does that mean? Well, PCI express is a pretty high tech thing, and you can’t just pump data over a pair of rusty coat hangers. On PCBs you may have noticed sometimes there are traces which curl or squiggle in odd, seemingly pointless ways.

Well, not so pointless as a matter of fact, it all comes down to impedance, shielding from interference and other matters which effect signal integrity. If you plan on using a high end SSD then you may want to go with this special cable. There are two ways to do that: Buy the cable on its own. (They’re dirt cheap) Or if you don’t feel like sourcing one then you can find a hat which includes one. The cheap-o cables are usually white plastic ribbons, commonly with blue plastic at each end to keep the row of pads rigid for inserting in the female connector. The nicer, to-spec cable will be an amber, pcb looking color, or may be black. But if in doubt, do some research.

SSD
          in hat            So This was annoying though. This hat is sold as being 2230 / 2242 compatible… and it is. But they don’t give you the nut and screw for 2230 drives, the shorter position.

Luckily I had such hardware unused from another adapter card, an mSATA to SATA Hardware board.

So the Pi 5 is certified for PCI E gen 2. Running it faster seems at first glance to be asking for trouble. People have had good luck with it though, and it is easily enable with a single line in the Pi’s config.txt.

Well I tried it, cheap cable and all. The improvement isn’t insignificant, in fact on my Gen 3 SSD I saw substantial benefits from the increased bandwidth.

Lets see the numbers…

Graph:
          Performance Compared

As we can see, you’re not going to be getting the same performance on your Pi as you would in a regular PC — forced gen 3, or otherwise. This is because the Pi only has a single PCIe lane going to the expansion header. That’s okay though, and as you can see it still beats the pants off an SD card, or even most SATA drives. The SSD arrived a few days before the hat, so I put it in my desktop to ensure it was working and see what the SMART data said. The drive only had ever had 300 GB or thereabouts written to it and just 6 power on hours. Not bad for $16 bucks!

Now, to Gen 3 or not to Gen 3, that is the question…

This is my server after all. I take pride in having little to no down time, hence springing for the SSD in the first place. Reliability was more of a motivator for me than throughput, but both are attractive of course. Doing some testing and benchmarks with the Gen 3 config line in place, I have not yet noticed a single error. You can check for them by grepping “nvme” in dmesg, or by reading from /sys/devices/platform/axi/1000110000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/aer* and in my case nothing looked to be amiss.

So, the real comparison then given our choice of Gen 2 or 3. It isn’t as small of a gain as the first chart may have you be thinking it is.

Graph:
          Gen 2 vs Gen 3

    Yeah, that’s what I said. Damn, almost double. So I’m leaving it in Gen 3 mode and I’ll keep an eye on things. To do this upgrade I had fully mirrored this server anyways to my FreeBSD franken-server so that can be quickly set back in place if I need to tweak anything. Up till now, all down time has been planned… in other words, there hasn’t been any.   : )

© 2025 LostGeek.NET - All Rights Reserved. Powered by ClassicPress, NGINX, Debian GNU/Linux.