Safe L2 only defer-write cache? Topic is solved

Suggestions around PrimoCache
Post Reply
lsylsy2
Level 1
Level 1
Posts: 2
Joined: Thu Oct 27, 2022 2:16 pm

Safe L2 only defer-write cache?

Post by lsylsy2 »

I've had some search in the form but maybe I'm too stupid to find the thread so I'm submitting a new topic.
I'm looking into PrimoCache for my upgraded NAS (Windows + PrimoCache + DrivePool + snapraid). I installed a evaluate version and read the document, and it says:
Since cache index data is stored in memory, the risk of data loss is the same whether using L1 cache or L2 cache. Write-data on the L2 cache cannot be recovered to disk after a failure and restart.
That's a big NO for NAS usage.
However, during the years SSD performance has increased and price has dropped dramatically, and in 2022 even NVMe raid 1 cache is quite affordable for data hoarders (e.g. some small optane sticks). Is it possible to implement a L2-only defer-write cache? there could be wearing on the SSD, however I think it's worth it to increase performance greatly for HDD drives.
User avatar
Support
Support Team
Support Team
Posts: 3393
Joined: Sun Dec 21, 2008 2:42 am

Re: Safe L2 only defer-write cache?

Post by Support »

lsylsy2 wrote: Thu Oct 27, 2022 2:27 pm Is it possible to implement a L2-only defer-write cache? there could be wearing on the SSD, however I think it's worth it to increase performance greatly for HDD drives.
Indexing will be updated very frequently, so it's not just an SSD wear issue, it also affects performance a lot.
lsylsy2
Level 1
Level 1
Posts: 2
Joined: Thu Oct 27, 2022 2:16 pm

Re: Safe L2 only defer-write cache?

Post by lsylsy2 »

Support wrote: Fri Oct 28, 2022 8:51 am
lsylsy2 wrote: Thu Oct 27, 2022 2:27 pm Is it possible to implement a L2-only defer-write cache? there could be wearing on the SSD, however I think it's worth it to increase performance greatly for HDD drives.
Indexing will be updated very frequently, so it's not just an SSD wear issue, it also affects performance a lot.
Maybe I'm asking question wrongly. I'm not meaning a "save data in L2 only and not L1" cache, but "everything has a copy inside L2, and not depending on L1 in a disaster scenario" cache, the purpose is to recover after a power loss / system crash / etc.
some journaling should do the work and in worst case writing to SSD will be doubled, still acceptable?
the metadata / index written to L2 will not be used normally, so only adding some write, not affecting performance too much, and in a disaster recovery, PrimoCache will scan L2 and recover / rebuild the in memory cache?
User avatar
Support
Support Team
Support Team
Posts: 3393
Joined: Sun Dec 21, 2008 2:42 am

Re: Safe L2 only defer-write cache?

Post by Support »

PrimoCache is a block-level caching program which it only caches disk sectors and doesn't have any file information. Journaling is used in file systems and PrimoCache is very difficult to adopt such mechanism.

PS. Here "indexing" refers to PrimoCache internal indexing database for caching, not file system indexing.
PS2. We do try to make L2 safe to defer-write. This will definitely extend the usage of defer-write. :)
Post Reply