Raspberry Pi Cheap SSD Upgrade (~$30)

I’ve covered the benefits of taking your Raspberry Pi to a solid state drive (SSD) before extensively in this article but in a nutshell you get around a 280% increase in raw throughput and a 1000% increase in 4k random read/writes over a MicroSD card.

That’s fantastic but SSDs have traditionally been very expensive costing you as much as 4+ Raspberry Pis so it seemed silly to use a drive like that as Pi storage. Until now.

That’s right. Thanks to technologies such as 3D NAND flash solid state drives for consumers have now become cheaper than mid-high range MicroSD cards. With 10x the performance of MicroSD cards they are now a no-brainer upgrade for servers or IO intensive Raspberry Pi projects.

Why Choose SSD?

MicroSD cards were not designed to serve as living storage for operating systems. They are designed for devices such as cameras and smart phones that need to write and reliably store data. They’re very good at this and some cards have excellent throughput fast enough to even record 4K video.

But one thing they are not good at is 4k random writes and rewrites. These are small writes throughout a disk and consist of about 25% of all hard drive activity on a computer. Almost every action you take and even routine log file updates trigger these updates so they are very important for performance.

To show you how bad they are here is an excerpt from my MicroSD and SSD benchmarks article I linked at the top:

Contenderdd test4k random read4k random write4k read4k write4k rewrite
EMTEC 32GB MicroSD8.4 MB/s64222057431209204
Samsung Evo+ 32GB MicroSD7.3 MB/s476876149146131117
SanDisk Ultra 64GB MicroSD13.6 MB/s92472686955823242895
SanDisk Extreme USB SSD Flash Drive16.1 MB/s7339907711491973210291
Crucial 2.5″ SATA SSD USB (Adapter)35.1 MB/s1016711419110811041211443

Yikes. MicroSD performance varied wildly based on quality of the card (poor EMTEC). But here’s the key part: all SSDs tested capped out around ~11k. This is because SSDs are so fast that they are limited by the speed of the Raspberry Pi’s USB 2.0 ports.

Solid state drives also have very large write caches. This lets your Raspberry Pi push data to the drive and start doing other things and let the drive itself figure out how to organize the data. Much of the throughput and other performance differences in the above chart are because of much better and faster read/write caching.

Which SSD to Buy?

Since all models and types of solid state drives hit the Raspberry Pi’s USB 2.0 transfer speed limit you should buy the cheapest one that fits your needs!

If your Raspberry Pi is mostly stationary it’s easiest and cheapest to just use a normal 2.5″ SATA SSD with a USB adapter. Here’s the adapter that I use:

$8.99 – Sabrent USB 3.0 to SSD / 2.5-Inch SATA Adapter

And here are two ~$20 120GB solid state drives from reputable manufacturers:

$19.99 – Kingston A400 SSD 120GB SATA 3 2.5” Solid State Drive

-OR-

$22.95 – Crucial BX500 120GB 3D NAND SATA 2.5-Inch SSD

You can see my Sabrent USB adapter in the below picture attached to the Crucial SSD. There is no power adapter needed as SSDs are low power and are powered by the Pi through USB.

The contenders for the RPI storage benchmarks
Different storage types for Raspberry Pi

Compact SSD Options

If you move your Pi around a lot or need something more compact there are several options.

Option 1: $49.57 – SanDisk Extreme Pro USB Solid State Flash Drive

There are some flash drives (a very small number) that are actually solid states. This one is the best one. I actually have a old discontinued model in my picture above. You have to be extremely careful when looking for these as 99.9% of flash drives are NOT solid states. The SanDisk Extreme Pro is a true solid state. The cheaper SanDisk Extreme and Extreme Gos are not (needs to be the pro). If you are looking at a flash drive and they don’t explicitly state it’s a solid state drive then it surely isn’t!

Option 2: Build from parts

Unless you already have an old solid state you can use the price of the adapter + the drive will likely be more than the SanDisk above. If you can find killer deals on eBay you may be able to save a little bit.

You can build a M.2 USB stick but you need to be careful with which type of M.2 drive you have/buy. They can be B-key, M-key, or M+B keyed. By far the most common and cheap ones are SATA with a B or B+M key. The adapter I have is this one.

In the picture above of different storage types you can see I am using an old mSATA drive as a USB stick. To learn how to build one see my article here. These SSDs can be picked up pretty cheap on eBay but I wouldn’t recommend buying one new as they are now specialty parts since M.2 has replaced mSATA.

Using SSD With Raspberry Pi

Once you have chosen your SSD it is time to configure the Raspberry Pi to boot off USB storage. Fortunately this is extremely simple. To enable booting from USB storage simply boot up your Raspberry Pi and run this command:

echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt

Alternatively you can put your MicroSD into your computer and open /boot/config.txt and add the line:

program_usb_boot_mode=1

Now reboot your Pi and USB boot support will be permanently enabled. This only needs to be done once per Raspberry Pi as the change is permanent.

Note that USB boot is available on the Raspberry Pi 3B, 3B+, 3A+ and Raspberry Pi 2B v1.2 models only!

The full documentation on USB booting is available from the Raspberry Pi foundation’s site here: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md

Creating your bootable drive is also very easy. You simply image it the same way you would image a blank MicroSD. I use Win32DiskImager and simply select the USB drive just like I would with a MicroSD card.

Conclusion

A solid state drive is the biggest upgrade you can give your Pi. When I am configuring my Minecraft Raspberry Pi servers the performance difference is night and day. They boot faster, respond faster and write/read much faster. It’s very difficult to go back to MicroSD after using one of these with your Pi.

This should be a future proof upgrade as well because presumably the Raspberry Pi 4 will have USB 3.0 and support much higher transfer rates. At this point the individual performance of SSD drives might actually matter but for at least the next couple of years until the Pi4 comes out it makes sense to buy the cheapest drive possible.

Leave a Reply

Your email address will not be published.