|
|
Log in / Subscribe / Register

Bcache: Caching beyond just RAM

Bcache: Caching beyond just RAM

Posted Jul 9, 2010 1:21 UTC (Fri) by koverstreet (✭ supporter ✭, #4296)
In reply to: Bcache: Caching beyond just RAM by akumria
Parent article: Bcache: Caching beyond just RAM

You could stuff everything into a filesystem, sure, but what would be the point? Caching really is doing something else, it wouldn't really be able to share any filesystem code, and it'd be tied to that one filesystem.

The main thing is the allocation strategy you want for caching is _completely_ different than for filesystems. Fragmentation isn't a real problem in the cache, since we can free fixed sized chunks regardless of what's in them. This means we're free to write data to the cache however we want to get the best performance. A filesystem has to retain data for an arbitrary amount of time, and thus needs to pay a lot of attention to making sure free space doesn't fragment too much.

Putting an external journal on an SSD gets you a bit of what bcache is after, but it'll only help with writes, and not to the extent bcache can. How would you effectively use an 80 gb journal? With bcache, you'll be able to fill up your caches with almost all dirty writes, and then write them out to your RAID6 with no restrictions on ordering - potentially turning a huge portion of random writes into mostly sequential ones, and even more will get overwritten in the cache before the raid ever sees them.


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds