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

FAQ, getting help, user experience about PrimoCache
rcamarda390
Level 4
Level 4
Posts: 25
Joined: Sun Dec 08, 2019 8:06 pm

100% write back L2 StorageWrite at 0 percent

Post by rcamarda390 »

In SS, you can see 20GB Total Write L2, but L2Storage Write is 0.
Does this mean that L2 is not being used for writes?
I dont understand the difference.
Setup is 100% write.
PC L2 Write.PNG
PC L2 Write.PNG (18.03 KiB) Viewed 3179 times
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 »

You have a *lot* of "urgent writes" for some reason. I rarely have any by comparison. What kind of duty is the drive handling? FTP/web downloads? Movie encoding? Something else?

Also, you have both a L1 and a L2 configured, are you certain you setup each to force write only? You are getting cached reads, from what your stats say.
rcamarda390
Level 4
Level 4
Posts: 25
Joined: Sun Dec 08, 2019 8:06 pm

Re: 100% write back L2 StorageWrite at 0 percent

Post by rcamarda390 »

Chia crypto mining.
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 »

Can't comment on Chia, I think Romex Support is still evaluating it themselves for suitability with Primocache.

Since the L2 still has a large amount of free cache, and the L1 has reached it's limit (you always see 32.00MB when it is full), I suspect Chia is overloading the L1 write queue. It's hard to say without knowing your exact L1 & L2 cache configuration. If I had to guess, I'd say your L1 and L2 both cache the same target volume, and when the L1 write is overwhelmed writes are then forced directly to the target volume (an 'urgent' write) instead of the L2.

You would probably have better performance results (still assuming your L1 & L2 cache the same volume) if you removed the L1 completely and just went with the L2, setting it for writes only (or read/write). In my opinion, L2's perform better when they are set to read/write, and it helps significantly with the lifespan of the SSD.

Perhaps Support can chime in with more information on what Chia might be doing in your scenario. I literally have no experience with it, and just have statistics to base assumptions on. Wish I could help more.
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 »

"L2Storage Write" is for reading cache, indicating how many data cached to L2 cache because of read. Since you set 100% write, so 0 is correct.
As Jaga said, you had Urgent writes which downgrade the performance a lot. These urgent writes were caused because L1 cache is full. You need to enable "Flush L1 Cache to L2 Cache" in the advanced defer-write setting. This option is available since v4.0.
rcamarda390
Level 4
Level 4
Posts: 25
Joined: Sun Dec 08, 2019 8:06 pm

Re: 100% write back L2 StorageWrite at 0 percent

Post by rcamarda390 »

Support wrote: Thu May 06, 2021 8:18 am "L2Storage Write" is for reading cache, indicating how many data cached to L2 cache because of read. ...
You need to enable "Flush L1 Cache to L2 Cache"
Thanks for the setting, I will check that and monitor.
FWIW: I am confused that something called 'Write' is for reading cache.
For me 'L2Storage Write' would mean...o/s 'writes that hit the L2 storage'
I am Chia farming, which chews up SSD's: My objective is to thrash a 'disposable' SSD to help 'protect' other ssds and cache HDD writes.
Currently a plot will create about 300 files, and use 240 GiB of temporary storage, and a final pass to create a single 101 GiB file, which is copied to HDD.
I'd like to capture as much of the activity in the L1/L2 THEN write it out.
(I'd REALLY like to test out a 2TB windows box w/ ramdisk size 1TB+ to see how much my 6 hour plotting would take)
rcamarda390
Level 4
Level 4
Posts: 25
Joined: Sun Dec 08, 2019 8:06 pm

Re: 100% write back L2 StorageWrite at 0 percent

Post by rcamarda390 »

Follow Up:
If L2Storage Write is for reading the cache, would that mean L2Storage Read is for writing to l2??
My guess would be an o/s read request was serviced from L2 storage.
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 »

Just based on personal experience and a brief understanding of what Chia does, I think 100% shared Read/Write caching space may serve you better as Chia will be able to take full advantage of the data while it still resides in the L2.

The idea is that a write "lands" on the L2 volume first, and then any reads for that data come from the L2 instead of the target drive. 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. All reads for that data afterwards come directly from the target drive instead of the L2, which significantly slows down the caching performance.

Try setting up both the L1 and L2 caches for 100% shared Read/Write, and then toggle on the "Flush L1 Cache to L2 Cache" setting Support mentioned. I haven't worked with that feature since 4.0 came out, and forgot it was even available. :)

Also, before beginning a new Chia "work unit" (I'm just guessing at the terminology and how it processes data), you may want to fully clear the cache. That ensures that ALL new work being done will hit the Cache during the file creation portion, and have as much of it stay in there as possible for the best cache performance during processing.

Primocache also has built-in write coalescing, and trimming on-the-fly. For a lot of small and repetitive reads/writes, I think Chia should be fairly happy with the cache once it's configured properly. Primo works at the block level after all.
rcamarda390
Level 4
Level 4
Posts: 25
Joined: Sun Dec 08, 2019 8:06 pm

Re: 100% write back L2 StorageWrite at 0 percent

Post by rcamarda390 »

Jaga,
I've set L1 and L2 to 50/50 AND i left flush l1 cache to l2 cache ON.
what you are saying makes sense.
Thank You
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 »

rcamarda390 wrote: Thu May 06, 2021 12:38 pm If L2Storage Write is for reading the cache, would that mean L2Storage Read is for writing to l2??
"L2Storage Read" is also for reading cache. It means that how many data were read from the L2 cache.
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.
Post Reply