Posts: 52
Joined: Fri Jun 09, 2017 3:11 pm

SSD caching in raspbian?

Sat Oct 20, 2018 1:15 am

Hi. I am thinking in use a SSD for the Rpi3b+ and just read about the Intel SSD caching. Reading the requeriments of it I saw the need for the motherboard or kernel to be compatible with it.

This feature seems really being able to speed up the Rpi in a way where is limited by RAM, so its interesting.

Anyone knows it or tried it?

If you don't know much about it this could help you: https://www.maketecheasier.com/everythi ... d-caching/

W. H. Heydt
Posts: 12360
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: SSD caching in raspbian?

Sat Oct 20, 2018 2:27 am

I seriously doubt it would help Pi very much, primarily for two reasons. The first being that, if you need that much mass storage, SSDs are now cheap enough to just use an SSD (very recently I bought a 500GB Samsung EVO 860 for just under $90, for instance), so there is no need to cache from an HDD to an SSD. Note that the technique dates to a time when SSDs were (a) expensive, and (b) didn't have much capacity. The second reason is that data transfer rates for mass storage devices on a Pi are limited to USB 2.0 speeds, nominally 480 Mb/s. With overhead plus the need to convert to and from SATA, you're going to top out around 30-35MB/s. Since modern HDDs can transfer data faster than that, there is little or nothing to be gained from caching, and quite a bit to lose, since you'd be transferring data from the HDD through the Pi to the SSD, which will drop the transfer rate to around 17MB/s as it all takes place on the same USB bus.

Now *if* a future Pi has USB 3.0 (or--better yet--USB 3.1), then you could transfer data faster than the HDD could supply it and putting selected data on an SSD could--in theory--speed things up. (I tested a WD PiDrive on an type of SBC that has a native USB 3.0. Transfer rates jumped from around 35MB/s to 80MB/s. In theory, USB 3.0 could go as high as about 500MB/s. In practice, I saw speeds around 125MB/s with an SSD but that board had much less capable ARM cores than a Pi3B has, let alone whatever one might expect from the next generation.)

tl;dr Not going to be of be of any benefit on a Pi...and it'd be a real pain to get working.

Posts: 52
Joined: Fri Jun 09, 2017 3:11 pm

Re: SSD caching in raspbian?

Tue Dec 04, 2018 5:45 pm

Sorry for the delay...

I think you didn't understand something, because there is no HDD on what I want to build. Just a Rpi and a SSD.

Anyways I am going to buy, probably, the same SSD than you.

Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: SSD caching in raspbian?

Tue Dec 04, 2018 11:10 pm

Yotaphoner wrote:
Tue Dec 04, 2018 5:45 pm
I think you didn't understand something, because there is no HDD on what I want to build. Just a Rpi and a SSD.
Its possible to use an ssd (or hdd) with a pi via a USB sata interface. As was mentioned before you'll be limited to the speed of usb2 which might mean a spinning hdd works as well as an ssd.

However your first post and the linked article is specifically about ssd caching which is a specific use of using an ssd with spinning hdd to provide some performance boost in certain workloads. This isn't something that makes sense on a pi (and probably not for most people). It's an idea that's still used where large storage is needed by using large hard disks for bulk storage and SSDs to cache recently used data.

User avatar
Posts: 5682
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: SSD caching in raspbian?

Thu Dec 06, 2018 12:15 am

The raw speed benefits of SSD are mostly lost on the Pi computers, due to their single USB 2.0 interface. However, SSD typically has much better random IO performance (IOPS), so they can speed things up slightly when compared to micro SD cards. It's not going to be a huge speed boost, so caching anything won't accomplish much (and may even be slower).

If your storage needs are modest (<=64GB) just get a good "A1" rated micro SD card. I have several Pi computers running off of SanDisk Ultra A1 cards, and I've been happy with their performance. In sizes of 128GB+ an SSD makes more sense, because large micro SD cards get expensive (more expensive than SSD at 256GB+ sizes).

Data integrity should be better with SSD, assuming you're not getting a crap SSD from ebay or Alibaba. If you are only using the SSD as storage (and booting from a micro SD card), then just about any USB SSD or USB-SATA adapter should work. If you want to boot and run the OS from SSD, well then things can get a bit tricky. The Pi boot-loader is not compatible with all USB mass storage devices, and finding something that works reliably often requires some trial and error (and wasted money). There's lots of info here on the forums regarding booting from SSD. If you need more help with that, try a search, and ask if you can't find what you need.

As far as SSD vs HDD goes, in my experience HDD is even slower than micro SD card, and much slower than SSD. They are still the king of storage vs price, and even better for data integrity, but if faster performance is your goal, HDD is not the solution. USB boot from HDD is also more troublesome, due to power requirements and slow spin-up times for HDD. Not saying it can't be done, but it may require even more trial and error troubleshooting than SSD (simpler to just use HDD as storage device).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Return to “Advanced users”