Skip to main content

Faster USB Disk IO For Raspberry Pi

raspberry pi 4
(Image credit: Shutterstock)

In recent weeks the Raspberry Pi Foundation have been publicly testing their new USB boot firmware for the Raspberry Pi 4, and as this edges ever closer to a stable release there are many looking to add faster and better storage for their Raspberry Pi.

One of those intrepid hackers is Jeff Geerling who has been testing USB 3.0 storage solutions and discovered “a USB 3.0 SSD was ten times faster than the fastest microSD card I tested.” But a chance comment on his video revealed that there was something even faster, UASP (USB Attached SCSI Protocol).

Jeff explains “Without UASP, a drive is mounted as a Mass Storage Device using Bulk Only Transport (or BOT), a protocol that was designed for transferring files way back in the USB 'Full speed' days, when the fastest speed you could get was a whopping 12 Mbps!” He then further explains how the BOT protocol cripples the throughput gains offered by USB 3.0.

Raspberry Pi 4 UASP

(Image credit: Jeff Geerling

Throughout Jeff’s blog post we learn more about UASP via the careful steps he has taken to test this protocol and the knowledge gained by examining the different types of USB 3.0 SATA enclosures. One of Jeff’s benchmarks shows just how much of a difference UASP can be, hdparm tests show a BOT transfer running at 172.13MB/s, but with UASP the transfer speed was 296.71MB/s! Jeff also took the time to run a random 4k read / write test “...UASP still makes a big impact. Random reads are 35% faster, and random writes are 20% faster.”

Raspberry Pi 4 UASP

Two USB to SATA boards from one manufacturer, one uses BOT and the other UASP. But which? (Image credit: Jeff Geerling

If you are thinking of using a USB 3.0 SSD enclosure to boot your Pi, then our guide to booting from SSD  and Jeff’s blog post are two must reads.