1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
flashcache-wt is a simple, non-persistent write-through and write-around
flashcache.
It is a separate code base from flashcache. Note that flashcache itself, which
is more configurable, now has options for writeback, writethrough and writearound
caching.
Notes :
-----
1) flashcache-wt is non persistent, which means that on a cache remove
(or a reboot), you will lose the cache entirely. Since the cache is
write-through/write-around, this will not result in any data loss.
2) Built on 2.6.18, .20, .27-.32 successfully. Tested on .18, .20, .27
and .32 successfully.
Building flashcache-wt :
----------------------
opsdev209.snc1.facebook.com> make KERNEL_TREE=<Base of kernel tree>
Creating a flashcache-wt volume :
-------------------------------
flashcache_wt_create : Create a new flashcache-wt volume.
flashcache_wt_create [-r] [-s cache size] [-b block size] cachedevname ssd_devname disk_devname
Very similar to flashcache_create.
Note : The default is to create the cache write-through. Use the -r option to create the
cache write-around.
Removing a flashcache-wt volume :
----------------------------
Use dmsetup remove to remove a flashcache-wt volume.
Example:
dmsetup remove cachedev
Cache Stats :
===========
Use 'dmsetup status' for cache statistics.
'dmsetup table' also dumps a number of cache related statistics.
Examples :
dmsetup status cachedev
dmsetup table cachedev
Cache Blocksize Selection
-------------------------
4KB cache blocks are suitable for the vast majority of the cases.
Also see the flashcache-sa-guide for more discussion on this.
|