100% write back L2 StorageWrite at 0 percent Topic is solved

FAQ, getting help, user experience about PrimoCache
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: 100% write back L2 StorageWrite at 0 percent

Post by Jaga »

Support wrote: Fri May 07, 2021 2:36 am
Jaga wrote: Thu May 06, 2021 7:33 pm As you have it now, writes land on your L2 and get written out to the target drive, but then they are immediately *cleared* from the L2.
Not right. Data are still in the cache after flush. If later Windows need to read these data, PrimoCache still can provide them from the cache. Only when there are no empty (no data cached) cache blocks, cached blocks may be chosen to store new write-data by certain cache replacement alogrithm.
Hmm, truly? I had always assumed (incorrectly it seems) that making a cache task write only meant that any data was flushed after writes were performed. I guess we learn something new every day, thanks. :thumbup:
Axel Mertes
Level 9
Level 9
Posts: 180
Joined: Thu Feb 03, 2011 3:22 pm

Re: 100% write back L2 StorageWrite at 0 percent

Post by Axel Mertes »

I don't think anything else than a L1 combined read/write RAM cache makes any sense for Chia mining.

Given the way that this mining works, it will write really really large chunks of data and the best thing you can do is use a SSD to make that process fast plus use a long deferred block write policy (300s or infinite, if possible) to keep data as long as anyhow possible in L1 RAM cache. That will lead to combining writes to the same blocks and reduce wear on the SSD as much as possible.

Consider:
At K=32 a single Chia plot will create about 1.4 Terabytes of writes to your temp SSD to finally create a ~101 Gigabyte plot file. By deferring SSD writes using L1 RAM caching you can reduce the amount of writes to like 88% as I have tested, which gives you a slightly longer life time on your SSD. This was for sequential plotting, parallel plotting / interleaved plotting may create different results.

Anyhow, this is an insane workload for the SSDs and creates a massive wear on the cells. Many NVME SSDs have an expected livetime around 300 to 600 Terabyte written until they are expected to fail and get out of warranty anyway. A few are rated around 3600 TBW, some enterprise models even higher.

Given that consumers may use their e.g. 2 TB NVME SSD for this and it might have only 300 TBW, the SSD is potentially dead after ~200 plots (equals 20 TByte in resulting plotfiles and 280 TBytes of temp data written). Have that in mind....
Axel Mertes
Level 9
Level 9
Posts: 180
Joined: Thu Feb 03, 2011 3:22 pm

Re: 100% write back L2 StorageWrite at 0 percent

Post by Axel Mertes »

You won't really benefit from caching itself. The cache hit rate when Chia plotting is less than 1% after some more testing here.
However, deferred writes add up significantly and that directly influences the write cycles of the SSD and so its life span.

I see up to 30% deferred writes.
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: 100% write back L2 StorageWrite at 0 percent

Post by Support »

In addition to reduce the write amount, Primo Ramdisk or PrimoCache (Defer-Write), with large RAM, can help to improve the speed of parallel plotting.
Post Reply