About L1 and L2 write cache behavior with defer-write enabled Topic is solved

FAQ, getting help, user experience about PrimoCache
Post Reply
arrenwu
Level 3
Level 3
Posts: 14
Joined: Tue Dec 17, 2019 7:27 pm

About L1 and L2 write cache behavior with defer-write enabled

Post by arrenwu »

Setup
  • I have a large HDD storage space with a cache created by Primocache.
  • The current cache setup is 200GB L2 read-only cache and 4GB L1 write-only cache with defer-write enabled.
Problem State
Most of the time 4GB write cache is sufficient and there is no urgent write flush. However, in some rare occasions the file size to be written can be around 8~10 GB and thus I'm thinking about allocating 5~10GB write space in L2 cache from the current 200GB space. This could resolve the issue of urgent writing but I don't want L2 written too often either

Question
For writing data, will Primocache always use L1 write cache unless the deferred data amount exceeds L1 write-cache space?
Meantime, I'm also interested in how Primocache decides to place data in L1 or L2 when the same type (read or write) caches are allocated on both layers?
User avatar
Support
Support Team
Support Team
Posts: 3731
Joined: Sun Dec 21, 2008 2:42 am

Re: About L1 and L2 write cache behavior with defer-write enabled

Post by Support »

arrenwu wrote: Sun Jul 07, 2024 10:10 pm For writing data, will Primocache always use L1 write cache unless the deferred data amount exceeds L1 write-cache space?
Yes. Ps. Enable "L1 Cache to L2 Cache" if you use both L1 and L2 for defer-write.
arrenwu
Level 3
Level 3
Posts: 14
Joined: Tue Dec 17, 2019 7:27 pm

Re: About L1 and L2 write cache behavior with defer-write enabled

Post by arrenwu »

Support wrote: Mon Jul 08, 2024 3:09 pm
arrenwu wrote: Sun Jul 07, 2024 10:10 pm For writing data, will Primocache always use L1 write cache unless the deferred data amount exceeds L1 write-cache space?
Yes. Ps. Enable "L1 Cache to L2 Cache" if you use both L1 and L2 for defer-write.
I'm curious. What will happen if I have both L1 and L2 write-cache with defer-write but not enable "L1 Cache to L2 Cache"?
Shouldn't Primocache still use L2 write cache as defer-write space?
User avatar
Support
Support Team
Support Team
Posts: 3731
Joined: Sun Dec 21, 2008 2:42 am

Re: About L1 and L2 write cache behavior with defer-write enabled

Post by Support »

If the "Flush L1 Cache to L2 Cache" option is not enabled, when L1 is full it will trigger Urgent Writes even if the latency has not been reached.
arrenwu
Level 3
Level 3
Posts: 14
Joined: Tue Dec 17, 2019 7:27 pm

Re: About L1 and L2 write cache behavior with defer-write enabled

Post by arrenwu »

Support wrote: Wed Jul 10, 2024 8:43 am If the "Flush L1 Cache to L2 Cache" option is not enabled, when L1 is full it will trigger Urgent Writes even if the latency has not been reached.
Then, suppose we do not enable "Flush L1 Cache to L2 Cache" and only enable defer-write. What's the difference between
  • 2GB L1 write-cache and zero L2 write-cache
  • 2GB L1 write-cache and 10GB L2write-cache
?
User avatar
Support
Support Team
Support Team
Posts: 3731
Joined: Sun Dec 21, 2008 2:42 am

Re: About L1 and L2 write cache behavior with defer-write enabled

Post by Support »

If you have 10GB L2 write cache, when L1 is full it triggers urgent writes, but incoming write-data can still be cached into L2, making the write performance close to the L2 device.
arrenwu
Level 3
Level 3
Posts: 14
Joined: Tue Dec 17, 2019 7:27 pm

Re: About L1 and L2 write cache behavior with defer-write enabled

Post by arrenwu »

Thanks for the explanation.
Post Reply