Using a CF card as a disk buffer

1362286300000 » Tagged as: cache , readboost

A post that was originally written on Dec 28, 2010, but wasn't published, but being released now to clear up the draft folder before the switch to Jekyll. Since the post was written dm-cache has in fact made it's way into the main branch of the kernel.

Windows has something called ReadyBoost - us linux users have been having half of what Readyboost provides for as long as flash drives have been in existence. That is we have been able to use a flash drive as a swap file for a long long time which is essentially what ReadyBoost does. But there is something more.

Part of ReadyBoost is the ability to store some of the frequently used data on disk on a flash drive. In other words, the flash drive acts as a disk buffer. Again this is nothing new, the linux kernel automatically uses all available RAM as a disk buffer. When applications ask for more memory the buffers are reduced. MS DOS also used to have disk buffering systems but they fell by the way side when Windows came into being before making a come back.

What the mainstream linux kernel doesn't have is the ability to use a flash drive as a buffer. Fortunately there is a third party kernel module called dm-cache that does provide this facility. What's sad is that beaurocracy has kept it out of the mainstream kernel for close upon two years.

The fact that the module hasn't been included in the main source tree means it hasn't been maintained. So the version that's downloadable from github is compatible only with kernel versions upto 2.6.29. Let's see if there is a patch somewhere.

References: http://en.wikipedia.org/wiki/ReadyBoost

comments powered by Disqus