Into the (open) source


Bcache: the advantage of having a layer between SSD and HDD in terms of speed


This article was written in the 2014, there may have been some developments in the subject matter.
If in doubt please leave a comment in the bottom of the article.


Ok, the truth is that these days are not very inspired with titles, unfortunately you will have to settle. Today we talk about speed and SSD / HDD. We will not make the usual benchmark to demonstrate the superiority in speed of solid state disk (it is a fact that it is faster), Instead we understand that it can be useful and economical to add a layer to take care of to communicate the two disks to speed up the process of burning the old HDD.

The problem

Who among us would not want a fast disk and economic? It would be great if they cost the same size as the SSD HDDs. But no, being il SSD a recent technology, costs more.

Let's say you have (as often happens) a computer with two hard. SSD will be installed on the operating system, with all its programs and configurations, while the HDD files (photo, video, music, documents, etc..). The operating system is on the SSD because in this way it will be more responsive, programs (even heavy ones) they will throw in a moment and not waste time.

To access the data on the HDD instead we will have to wait the time of HDD, that are not endless, but they are definitely longer than to have them on the SSD.

The solution

The project "bcache" born for this. It is a program that runs in the background and stands between the two disks, creating a veritable cache. When a large file is retrieved from the HDD, is simultaneously copied to the SSD and the user will work on this file. In this way, the bailouts will be fast (this is. multimedia file, huge images) because physically stored on the SSD. When the work is finished and the file will be closed, Bcache overwrite the edited file in the HDD in the background, so you will not have the feeling of working on the HDD if you do not open the file. In fact it will overwrite cycles, but the procedure is broadly, need to understand.

The nice thing is that with this solution we will take advantage of the strengths of both media: the speed of the SSD and HDD capacity.

How to install?

Bcache is a project just so useful that has been integrated in the next official release of the Linux kernel. This means you will not have to be installed from the version 3.10 the 3.11, because it will already be included. Until that time we will have to install these in the following ways:

Un repository git dedicato:

A PPA repository for Ubuntu users: ppa:g2p/storage.

A git repository dedicated to Fedora users:

As you start?

Does not start, it just works. Alone.


I keep this blog as a hobby by 2009. I am passionate about graphic, technology, software Open Source. Among my articles will be easy to find music, and some personal thoughts, but I prefer the direct line of the blog mainly to technology. For more information contact me.