Linux equivalent to ReadyBoost?

17,103

Solution 1

Bcache could be exactly what you're looking for:

Bcache is a Linux kernel block layer cache. It allows one or more fast disk drives such as flash-based solid state drives (SSDs) to act as a cache for one or more slower hard disk drives.

I'm eagerly awaiting its inclusion into Linux mainline, but unfortunately it's still not quite there.

Some nice and readable info is also available here:

Try it out and see how it works on your system!

Solution 2

There is none, and it really doesn't make sense anymore.

ReadyBoost was useful for a short period of time when machines were RAM-limited, drives were slow, and flash was cheap. With RAM so cheap now, it makes much more sense to use RAM instead.

Typical flash drives these days have write speeds of only about 5MB/s and read speeds of about 20MB/s. Compare that to your hard drive's 50MB/s read and write and there doesn't seem to be much point.

Real-world performance benefits from ReadyBoost are only seen on heavily memory-constrained systems.

Solution 3

ZFS originated in Solaris in 2004 and now available in a few Unices including FreeBSD and Linux (though on Linux still in beta and not in the mainline kernel due to licensing issues) also allows to add one or more secondary caches called L2ARC on any block device for that same kind of purpose.

Solution 4

I've been asking myself the same question, and being unsatisfied with current answers here, did a bit of research on my own. This is untested so far, but this arcticle on Linux 3.9 changes provided a useful starting point. It mentions three technologies which should achieve effects similar to ReadyBoost, although sometimes the focus appears to be on caching writes instead of reads. Further research found even more.

I'll probably update this answer once I've gained some first hand experience with at least one of these. Until then, searching the web with one of these names as a keyword should yield fair amounts of tutorials, descriptions, opinions and benchmarks.

Solution 5

I haven't found such a module for Linux but DragonFly BSD has something equivalent to Windows ReadyBoost. The feature is called SwapCache. It uses a fast swap partition (SSD/Flash) to cache data and meta-data from another drive (HDD).

The man page explains how to configure the information to cache. It describes use cases and when and how to use such a caching mechanism. It appears to be interesting when the system is swaping only from time to time (i.e. the amount of RAM is slightly short) or for frequent reads and writes of meta-data.

Share:
17,103

Related videos on Youtube

dbush
Author by

dbush

Updated on September 17, 2022

Comments

  • dbush
    dbush over 1 year

    Is there a kernel module or some other patch or something similar to Windows' ReadyBoost?

    Basically I'm looking for something that allows disk reads to be cached on a Flash drive.

    • daisy
      daisy over 11 years
      Flash drive with usb 2.0 is really slow, I don't know why you want to do that.
    • antiduh
      antiduh over 10 years
      @warl0ck, I disagree, even with usb 2.0. USB 2.0 on an uncontended bus has a bandwidth of 480 mbit/sec == 60 MB/sec. Even discounting, say 20 MB/sec of overhead, that's still significant speed. Nevermind that USB 3.0 is becoming popular, and has 5 Gbit/sec worth of capacity. Nevermind that offloading anything from your hard drive is worth it; If you've got 1GB worth of crap to read from disk, and 200 MB happens to be cached on a readyboost cache, that's 200 MB less that has to be read from the disk, and can happen parallel to the hard drive reads.
  • Ryan Long
    Ryan Long over 12 years
    This is not even remotely correct. See for yourself in Wikipedia's entry on the subject: en.wikipedia.org/wiki/CacheFS
  • dbush
    dbush over 12 years
    Would it make sense on say a tablet or netbook which would have limited RAM? Also, I thought the idea behind ReadyBoost wasn't so much that it made reads/writes faster, but that it significantly cut down on random access times (a traditional HD would have a random access time of around 17ms whereas a flash drive would probably have <1ms).
  • ChrisCornwall
    ChrisCornwall over 12 years
    Cutting down on random access time is the same thing as making reads faster. It never makes sense compared to adding more RAM. It was basically a stopgap during a short time when adding RAM wasn't practical.
  • psusi
    psusi over 12 years
    Except that RAM has to be populated by trying to access the files first before it can benefit future access, and this has to be repeated after each boot. Flash allows for a persistent cache, therefore it can help accelerate boot time.
  • Renan
    Renan over 11 years
    Do note that heavy usage of swap in a flash drive might be harmful for the flash memory, due to the write cycle limitations.
  • dbush
    dbush over 11 years
    I have since added an SSD to my machine which runs circles around even my expensive Corsair Survivor flash drive (which has ~36MB/s read speeds).
  • antiduh
    antiduh over 10 years
    I downvoted. Readyboost doesn't have much to do with RAM constraints. It's a block-level cache for a hard drive that has two benefits: 1) It can be accessed simultaneously while the hard drive is being accessed, acting in a sense like a partial raid mirror. 2) It can be scaled as much as you please, while RAM is often limited by motherboard space. I can buy as many flash drives as I want and stick them on each root hub (and thus not sharing bandwidth), and I can make them as big as I want. Good luck getting 128 GB worth of RAM into a desktop for less than $200
  • ChrisCornwall
    ChrisCornwall over 10 years
    @antiduh Scaling it doesn't do anything for you. You see drastically diminishing returns after 4GB. And if you have 2GB of extra RAM, you see basically no benefits at all.
  • naught101
    naught101 about 10 years
    This answer seems a bit out of date. SSDs are 5-10 times faster than the best magnetic HDDs..