Native M.2 NVMe SSD on a Raspberry Pi 4 - Fastest Disk IO Speed

Native M.2 NVMe SSD on a Raspberry Pi 4 -  Fastest Disk IO Speed

I've been on a quest to creating the fastest Raspberry Pi 4 IO speed. It just sucks that this quest had to come at a time where Raspberry Pi market is insane. On my quest I found out that there is no hat or board that provides me a direct M.2 to connect my SSD on the Raspberry Pi 4. Every solution led to SSD over USB3.0 which reduced the disk IO speeds making me only inches away from succeeding in my quest.

That was until I came across the glorious TOFU board by Swiss company ORATEK. This baby packed not only what I needed, a direct M.2 port, but also 3x USB-A ports, full-size HDMI port, Camera and display ports, two power inputs, Micro SD card slot, and a USB-C port. This board provided me everything I needed and more. So we at InterestingSoup reached out to Oratek to see if we can receive a board to review (and complete our quest!). They got back super quick and agreed to send us the TOFU board. They were even kind enough to send the TOFU - M.2 M Key Adapter and Switchblade Enclosure. This was sweet because my Western Digital Black SN850 is an NVMe SSD so it require M.2 M Key port which the adapter solves. Otherwise I'd need to get a new SSD to fit the board.

Why is this native M.2 port so important to me? That is because it's I/O speed is unmatched at the moment. I ran a benchmark script to see how fast were my Raspberry Pi 4's I/O speeds were with various drive options and here are the results. You can compare the score to the results on this site.

Micro SD: 1,290
SATA SSD over USB 3.0: 6480
NVMe SSD over USB 3.0 (UASP): 7884
Upgraded NVMe SSD over USB 3.0 (UASP): 10458

As you can see the score increases as I use better peripherals and SSDs. You can only imagine how fast a native M.2 port would be and the score it would output. Thanks to Oratek for bringing our imagination to a reality.

Enable NVMe Boot

To boot from NVMe you need a recent version of the bootloader (after July 2021), and a recent version of the VideoCore firmware and Raspberry Pi OS Linux kernel. The latest Raspberry Pi OS release has everything you need, so you can use the Raspberry Pi Imager to install the software to your SSD.

Bootloader
You might need to use rpiboot to update the CM4 bootloader. Instructions for building rpiboot and configuring the IO board to switch the ROM to usbboot mode are in the usbboot Github repository.

Remember to add the NVMe boot mode 6 to BOOT_ORDER in recovery/boot.conf.

Firmware and kernel
If you are using CM4 lite, remove the SD card and the board will boot from the NVMe disk. For versions of CM4 with an eMMC, make sure you have set NVMe first in the boot order.

Speed Results

Now that we have our CM4 booting from NVME, lets run that benchmark and get our score.

Score: 14781

So having an M.2 port dramatically increases the disk speed for sure. In the coming weeks, we will deploy a service to get an actual feel of the disk performance. This setup seems ideal for an Urbit Star deployment. If you have any other service we should deploy on this setup, let us know!

Oratek TOFU Board

Oratek's build quality is next level. Out of the box we can just understand the work and effort put into developing such a compact powerful board for the CM4. With the power input options provided on this board, we aren't even fully leveraging its capabilities. That goes to show how far ahead Oratek was thinking in regards to it's board use cases. Once this insane single board computers craze settles down we definitely for see more and more videos surfacing with Oratek's Tofu Board.

Purchase TOFU Board by Oratek here: https://store.oratek.com/collections/tofu/products/tofu