Skip to contentSkip to conversation

SSD cache with regular partition, like BSD swapcache

DISCUSSION Mark Hills 3 participants 3 messages Aug 15, 2013 – Aug 16, 2013 1 message not in the archive bcache (block layer cache)

lore
Share & tools
lore

Mark Hills

author
#0 lore raw

For some time I've been hoping to use SSD caching, but cannot reasonably accomodate the superblock and new partition format.

Hence, looking for a non-writeback SSD cache which can be transparently added and removed from the system.

Of course it's at the expense of losing the cache content each time the cache is attached -- but for many useful cases and workloads this is absolutely ok, eg. workstations (using suspend-RAM) or full-time servers.

Doesn't look like it's possible from the docs; has there been any work on this -- a different 'glue' or front end?

IIRC the first public announcement of bcache did something similar -- hooked into the system by re-routing the I/O requests to a specific disk.

Tho I did not test it, it looks like DragonFly BSD has what I'm looking for, as part of its "swapcache" feature -- looks very easy to set up:

http://www.dragonflybsd.org/docs/howtos/swapcache/

Thanks

Signature · 1 line
Mark
#1 lore raw
Quoted 2 lines

Hence, looking for a non-writeback SSD cache which can be transparently added and removed from the system.

Removing / Adding a caching device within Bcache can be done on a live system, so long as a backing device is created before hand. This was explained here:
http://comments.gmane.org/gmane.linux.kernel.bcache.devel/1886

Quoted 2 lines

Doesn't look like it's possible from the docs; has there been any work on this -- a different 'glue' or front end?

Is this what you are looking for? https://github.com/g2p/blocks

This should keep any data on the backing device without the need to format.

Hope that helps,
-Adam

--
Adam Brenner
Computer Science, Undergraduate Student
Donald Bren School of Information and Computer Sciences

Research Computing Support
Office of Information Technology
http://www.oit.uci.edu/rcs/

University of California, Irvine
www.ics.uci.edu/~aebrenne/
[email protected]

Quoted 29 lines · Mark Hills

For some time I've been hoping to use SSD caching, but cannot reasonably accomodate the superblock and new partition format.

Hence, looking for a non-writeback SSD cache which can be transparently added and removed from the system.

Of course it's at the expense of losing the cache content each time the cache is attached -- but for many useful cases and workloads this is absolutely ok, eg. workstations (using suspend-RAM) or full-time servers.

Doesn't look like it's possible from the docs; has there been any work on this -- a different 'glue' or front end?

IIRC the first public announcement of bcache did something similar -- hooked into the system by re-routing the I/O requests to a specific disk.

Tho I did not test it, it looks like DragonFly BSD has what I'm looking for, as part of its "swapcache" feature -- looks very easy to set up:

http://www.dragonflybsd.org/docs/howtos/swapcache/

Thanks

--
Mark
--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
In reply to a message not in the archive
Quoted 7 lines · Adam Brenner
Quoted 2 lines

Hence, looking for a non-writeback SSD cache which can be transparently added and removed from the system.

Removing / Adding a caching device within Bcache can be done on a live system, so long as a backing device is created before hand. This was explained here:
http://comments.gmane.org/gmane.linux.kernel.bcache.devel/1886

Sorry, maybe I should have been more clear. I meant adding without modifying the _backing_ device.

Quoted 6 lines
Quoted 2 lines

Doesn't look like it's possible from the docs; has there been any work on this -- a different 'glue' or front end?

Is this what you are looking for? https://github.com/g2p/blocks

This should keep any data on the backing device without the need to format.

Not really, keeping the data on the partition is only part of the solution -- and this requires free space before the partiion, or LVM.

As I said, I don't wish to modify the backing device at all (even in-place for risk to data) or use a new partition format (also prevents mounting the filesystem on other systems, or boot disks)

And it's just not necessary anyway if using a non-persistent read cache.

The nature of swapcache's integration makes it easier and less disruptive to configure -- especially for people who don't already use an initrd.

It would make it easier to experiement with the caching in different scenarios.

Thanks

Signature · 1 line
Mark