# SSDs and HDs

## crashoverride025

I have a mixture of SSD harddrives and the types that spin. Is there a way, with linux, that I can setup the SSD to be a caching/immediate access drive and the HDDs to be more for archiving? The caching policy that I would want would be for the SSD to hold new files, and frequently used files. 

I'm not really looking for the SSD to increase my storage, just to provide an immediate access device. Also, the files modified on the SSD should be considered to be a modified file.

----------

## asturm

None that I know of. Something like this would need to work as some kind of RAID mode, hiding the actual cache drive from the system.

Intel has done that with its Z68 chipset, they introduced 'Smart Response Technology'.

My Seagate Momentus XT also uses 4GB integrated SLC memory as an OS agnostic file access cache.

----------

## DaggyStyle

 *crashoverride025 wrote:*   

> I have a mixture of SSD harddrives and the types that spin. Is there a way, with linux, that I can setup the SSD to be a caching/immediate access drive and the HDDs to be more for archiving? The caching policy that I would want would be for the SSD to hold new files, and frequently used files. 
> 
> I'm not really looking for the SSD to increase my storage, just to provide an immediate access device. Also, the files modified on the SSD should be considered to be a modified file.

 

how about smart resource ordering? for example, /var, /usr/bin and /usr/portage on a raid of only SSD and the rest on a raid of mechanical?

----------

## asturm

The additional wear caused by the portage tree might not be worth the better speed just for updates.

I would at least put also /etc on an SSD, /boot might also subtract some fractions of a second from the same-titled process.

It all depends on the size of your SSD, for expensive small SLC drives our mentioned strategy would be fine, for cheaper, bigger MLC drives I would go for the include everything, outsource stupid storage locations approach. /usr/portage(/distfiles) and /usr/src come to mind immediately, also intelligently organize your /home directory so that you can 'mount -o bind' sparsely used locations to the HDD, but keep /home/<user> on the SSD itself to have much boosted startup times of your favourite DE moloch (e.g. KDE has a huge hidden directory there).

----------

## Cyker

Isn't there a framework that was semi-recently added to the kernel for doing this sort of thing?

----------

## aCOSwt

Well, I cannot tell how to achieve this in a filesystem independent manner.

What I can tell is that, if you are open to zfs, zfs allows exactly what you are looking for thanks to the L2ARC feature.

This speeded up my freeBSD (zfs native) system dramatically.

http://blogs.oracle.com/brendan/entry/test

So, if you are open to fuse or beta linux native zfs... do not hesitate.

I believe it should work but I did not actually test under my ext-only Gentoo-Linux.

----------

## drescherjm

There is flashcache.

https://github.com/facebook/flashcache

I have an ebuild for the git repository in my overlay.

https://github.com/drescherjm/jmdgentoooverlay/blob/master/sys-fs/flashcache/flashcache-9999.ebuild

----------

