Write cache L2 Topic is solved

FAQ, getting help, user experience about PrimoCache
wave
Level 3
Level 3
Posts: 19
Joined: Sat Oct 23, 2021 7:07 pm

Write cache L2

Post by wave »

hello, I have set the L2 cache as 80% read and 20% write but I have not quite understood how the write cache works. When is it transferred to the HDD? and how? L1 cache is disabled.
I know that the read cache is a copy of the HDD's most used files and it can be deleted at any time without any problems. while with the write cache enabled how can you delete it safely?
Thanks.
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: Write cache L2

Post by Jaga »

The write cache in Primocache is simply a "deferred write area" that you define. Any writes that land on it also get sent to the drive it is caching. If you end up deleting a file that was in the write cache, it gets deleted off the cached drive as well. Flushing the read/write caches doesn't have any risk, since any writes that may be deferred (delayed) are instantly written to the cached drive before the cache is emptied.

Depending on your use scenario, you may or may not need to separate out read/write space on the L2. Basically any writes that are in the L2 stay there and are accessible as cached readable data just like the 80% read data you setup. Any new writes can push them out of the write cache, but there's nothing lost in that case - it's just Primocache working efficiently to keep data available on the fastest media at all times.

If you want any suggestions on how you might better setup your Cache Task, you can let us know what hardware you are working with, and what kind of programs/data and daily use they are seeing.
wave
Level 3
Level 3
Posts: 19
Joined: Sat Oct 23, 2021 7:07 pm

Re: Write cache L2

Post by wave »

thanks for the reply, it's clear now.
The pc is an hp pavillon with amd fx-670K cpu, R7 240 gpu, 12GB ram and 1tb HDD. The ssd for the cache is 128gb, I set the block size to 4Kb. The main use is for internet browsing, opening and creating documents and using virtual machines with virtualbox.
Also I noticed that the boot time varies a lot, sometimes it is fast sometimes it is slow and that the percentage of cached files never reaches 100% but 95-96%. it's normal?
How do you advise me to set it up?
Thank you
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: Write cache L2

Post by Jaga »

95+ % hit rate is quite good, I'd leave it alone and just let it run if it's doing that well. There are certain files that are always going to be read (at boot time) from the originating drive instead of the cache drive, so really it's just a matter of Primocache grabbing as many boot files as it can and trying to keep them in the cache, you won't be able to improve much on it otherwise. And don't enable either Windows or BIOS fast boot - they can both mess up the way Primocache works.
wave
Level 3
Level 3
Posts: 19
Joined: Sat Oct 23, 2021 7:07 pm

Re: Write cache L2

Post by wave »

I had already done some tests for windows fast boot:
fast boot disabled + cache enabled - 50s to 60s
fast boot enabled + cache disabled - 35s
fast boot enabled + cache enabled - 25s to 35s
so I left it on...
as for the percentage of the read / write cache, how do you recommend to set it?
Last edited by wave on Mon Oct 25, 2021 8:25 am, edited 2 times in total.
wave
Level 3
Level 3
Posts: 19
Joined: Sat Oct 23, 2021 7:07 pm

Re: Write cache L2

Post by wave »

I have another question.
if I do not enable the defer write option, after how long will the write cache be downloaded to the hdd?
always considering that I do not use the L1 cache, if I enable the defer write option in case of power failure/bsod the data in the cache is transferred to the hdd at reboot or is it lost?
I also didn't understand what the "average" option in "advanced defer write options" does.
Thank you.
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: Write cache L2

Post by Jaga »

You can leave fast boot enabled, but sooner or later it has a good chance of corrupting the cache which forces it to clear. It is always recommended with Primocache to disable any/all Fast Boot options in Windows/BIOS.

Defer write has it's advantages mostly when using the L1, since no drive access at all is needed in that scenario. I personally haven't enabled deferred writes when using just a L2, but you can see if it has any effect by running CrystalDiskMark with/without it.

If you happen to experience BSODs or other OS crashes/instability, then defer writes is not recommended at all. If however your machine is extremely stable, you can try turning them on with a small delay (5 to 10s). Normally it's only a good practice to enable them if you have a UPS on the computer to keep power supplied, or if it is a laptop where the battery doesn't rely on AC power.
wave
Level 3
Level 3
Posts: 19
Joined: Sat Oct 23, 2021 7:07 pm

Re: Write cache L2

Post by wave »

Jaga wrote: Sun Oct 24, 2021 8:43 pm You can leave fast boot enabled, but sooner or later it has a good chance of corrupting the cache which forces it to clear. It is always recommended with Primocache to disable any/all Fast Boot options in Windows/BIOS.
where exactly is it recommended? because fast boot is enabled by default in windows but in the primocache documentation it does not say to disable it. I doubt it's that harmful.
Jaga wrote: Sun Oct 24, 2021 8:43 pm If you happen to experience BSODs or other OS crashes/instability, then defer writes is not recommended at all. If however your machine is extremely stable, you can try turning them on with a small delay (5 to 10s). Normally it's only a good practice to enable them if you have a UPS on the computer to keep power supplied, or if it is a laptop where the battery doesn't rely on AC power.
yes i know it's not good but you didn't answer my question. thanks anyway.
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: Write cache L2

Post by Support »

wave wrote: Sun Oct 24, 2021 4:31 pm if I do not enable the defer write option, after how long will the write cache be downloaded to the hdd?
Without defer-write enabled, write-data will be immediately written to the HDD. Write performance will also not be improved.
wave wrote: Sun Oct 24, 2021 4:31 pm I also didn't understand what the "average" option in "advanced defer write options" does.
Average mode is usually for scenarios in which there are heavy writes incoming.
wave wrote: Sun Oct 24, 2021 9:21 pm where exactly is it recommended? because fast boot is enabled by default in windows but in the primocache documentation it does not say to disable it. I doubt it's that harmful.
If you see L2 cache content sometimes gets reset/cleared after shutdown, you may try turning off the fast-startup.
wave
Level 3
Level 3
Posts: 19
Joined: Sat Oct 23, 2021 7:07 pm

Re: Write cache L2

Post by wave »

Support wrote: Mon Oct 25, 2021 1:57 pm Without defer-write enabled, write-data will be immediately written to the HDD. Write performance will also not be improved.
so it does not pass through the L2 cache but it is directly written to the hdd?
Support wrote: Mon Oct 25, 2021 1:57 pm Average mode is usually for scenarios in which there are heavy writes incoming.
Could you be more specific about what it does? I would like to set the most reliable option for my system. Thank you!
Support wrote: Mon Oct 25, 2021 1:57 pm If you see L2 cache content sometimes gets reset/cleared after shutdown, you may try turning off the fast-startup.
perfect, thanks.
Post Reply