0

I've bought a brand new 250GB Samsung 850 EVO for my laptop using Ubuntu that I want to use as primary storage device, together with the old, but still pretty functioning, 250GB 7500 RPM HDD that I put in the former DVD bay with an adapter caddy.

Right now the HDD has only one big ext4 partition containing the OS, the applications and data files. What I want to do is to use the HDD just for the data, but I don't want to miss out on the opportunity to get the speed gains of the SSD by doing so.

What I'm searching for is a solution which combines one small, say 50GB or even less, partition on the SSD and merges it with the partition on the HDD so that the least modified of the most accessed files are automatically moved onto the SSD.

I've looked at caches like EnancheIO and Bcache, but they don't seem what I want, because (correct me if I'm wrong):

  • The space occupied by the cache partition is subtracted from the amount of space available.
  • The cache speeds up access to the most accessed files regardless of whether they're also the least often modified, which defies the point of not wanting to wear out the SSD.

Is the above correct, or could a cache (which one of those two?) help me reach my goal? If the above is correct, do you know of any other viable solution?

Would a union filesystem, like OverlayFS, be helpful here? Say you monitored the HDD for the most accessed files (keeping track of their atime on a daily basis) and say you identified the least modified ones among them (keeping track of their mtime), in theory you could move those files onto the SSD, freeing space on the HDD, while the union filesystem could make all that transparent to the user. Would this work?

11
  • Your priorities are bizarre. I doubt there's a solution aimed at them. Nobody else worries about wearing out modern SSDs with caching. Nobody else wants to prohibit copying data between the SSD and the HDD. Dec 9, 2015 at 11:21
  • 1
    This comment is rather unhelpful. These are my requirements, I dunno why you think it should be of any importance that you deem them "bizarre"? What are you trying to tell me? However, even Bcache has a writearound mode that serves to reduce the wear on the SSD (citing Bcache's documentation), so the premise that "nobody worries about wearing out modern SSDs" is false.
    – Fabio A.
    Dec 9, 2015 at 11:25
  • That you're unlikely to find a pre-made solution to a problem that only you have. That when you find that the common solutions that work for everyone else don't meet your requirements, you should look more closely at whether your requirements are sensible. Dec 9, 2015 at 11:26
  • For example, why do you care about wear of the SSD? Do you know the write volume of typical caches? Do you know the write endurance of your SSD? Did you determine that it really was an issue and that there's a rational basis for this requirement? If not, then shouldn't the fact that nobody else worries about this and that common implementations work this way suggest that maybe you should? Dec 9, 2015 at 11:29
  • Bcache has a "writearound" mode that serves "to reduce the wear on the SSD" (citing Bcache's documentation), so the premise that "nobody worries about wearing out modern SSDs" is false. I am not specifically looking for pre-made solutions, I'm looking for a solution.
    – Fabio A.
    Dec 9, 2015 at 11:30

1 Answer 1

0

Use a SSD on linux to speed up the access to the data files on the HDD without wasting space and wearing it out?

Without wasting space is ambiguous. If you want to cache things you will need somewhere to cache it. That uses space.

As to wearing out SSD's; this was an issue with old, really old SSD. Unless you plan to use the SSD heavily for a decade or more there is no need to worry about it.

Having said all that, lets move to a solution: ZFS. It is a filesystem (and more) which can cache information on a SSD. See the "ZFS cache: ARC (L1), L2ARC, ZIL" part.

Useful links:

2
  • A cache would waste space, indeed, but just moving the files from one storage media to the other would not, which is what I was looking for. I guess wearing is not an issue with nowadays SSD's, but if I could avoid writing to the SSD and still get speed gains without wasting space, why not? Thanks for the pointers to ZFS, do you know in which way it would be better than, say, Bcache+EXT4?
    – Fabio A.
    Dec 9, 2015 at 11:39
  • My last significant Linux experience was when ext2 was modern. So I'll leave that part up to others to answer. Personally would just install everything on the SSD and only mount the HDD somewhere under /usr/local/ as a big data disk. If the SSD turns out to be too small you could always move folders and symlink them.
    – Hennes
    Dec 9, 2015 at 12:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .