Forums

Home / Forums

You need to log in to create posts and topics. Login · Register

What is the different between the Cache Device and Journal Device?

When choosing a disk at the setup screen, it gives the 3 options.  OSD is where the data going save to.  The Journal is a read/write cache for the OSD.  What about the Cache device?  I can't find the info in the manual.

the journal contains:

wal : write ahead log, speeds up  small writes by using a 2 phase commit

db : stores metadata such as object location, putting on ssds speeds up read/writes

this provided by Ceph.

Cache is different, as data is stored on the fast device for a long time, we use dm-writecache which is provided by the kernel.

What are the recommendations for when to use caching and/or journaling with PetaSAN latest version?  I noticed when I set a disk as a journal it created 64GB partitions for as many OSD's as it could, but when I set a disk as a cache device it only linked to three OSD's and the rest didn't get created.  Does a caching device only work for 3 disks?

With hdds, you should use an SSD journal, it improves both reading and writing.

If your workload has a lot of small writes, write cache makes a big difference in this case.

The way they are setup is a bit different, journal is a Ceph device, it allocates a fixed amount / partition size each time you add an OSD until you have no more space. Write cache is something we added support in PetaSAN, you need to specify the number of partitions upfront when creating a cache device, we allow 1 to 8, although 2 to 4 is more ideal.