Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
    
Flash drive with usb 2.0 is really slow, I don't know why you want to do that. –  warl0ck Sep 27 '12 at 23:48
    
@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. –  antiduh Oct 21 '13 at 15:20

7 Answers 7

Linux has cachefs, which allows you to add a backing cache filesystem to any filesystem. It was originally designed and released in 1993 by Sun Microsystems for use with NFS, and was quickly copied by other Unix-like systems. So yes, it's already there and has been for years. :)

share|improve this answer
7  
This is not even remotely correct. See for yourself in Wikipedia's entry on the subject: en.wikipedia.org/wiki/CacheFS –  user10135 Aug 26 '11 at 6:12
    
Yes, unfortunately, CacheFS does not work on local disk filesystems. Theoretically it could, but the work to add the support to the common local filesystems has yet to be done. –  psusi Sep 27 '11 at 1:21

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.

share|improve this answer
1  
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). –  Nathan Osman Sep 26 '11 at 18:40
    
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. –  David Schwartz Sep 26 '11 at 19:39
3  
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. –  psusi Sep 27 '11 at 1:19
    
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). –  Nathan Osman Aug 13 '12 at 18:31
1  
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 –  antiduh Oct 21 '13 at 15:18

Well, from what I understand, Readyboost is basically an extension to the pagefile, which is comparable to the swap partition on FreeBSD (which I think would be similar in Linux), so you might be able to just make a partition the flashdrive to have a swap partition on it.

However, I know almost nothing about these things.

share|improve this answer
5  
Do note that heavy usage of swap in a flash drive might be harmful for the flash memory, due to the write cycle limitations. –  Renan Aug 13 '12 at 18:30

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!

share|improve this answer

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|improve this answer

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.