A question about option Free cache on written

FAQ, getting help, user experience about PrimoCache
Post Reply
RobF99
Level 8
Level 8
Posts: 130
Joined: Fri Sep 19, 2014 5:14 am

A question about option Free cache on written

Post by RobF99 »

I notice that if I have the option to "free cache on written selected", after data is written, whether cache is full or not, the free cache value increases. Are the blocks still cached (as standby blocks) but just not accounted for in the number? The change in the number has confused me whether the blocks are still in the cache.

Thanks.
User avatar
Support
Support Team
Support Team
Posts: 3622
Joined: Sun Dec 21, 2008 2:42 am

Re: A question about option Free cache on written

Post by Support »

These blocks are still cached but marked as standby blocks. Fresh new (empty) blocks are first to be chosen for caching new data, then these blocks you mentioned. If a standby block is read by Windows/application, it will be removed from the standby queue.
RobF99
Level 8
Level 8
Posts: 130
Joined: Fri Sep 19, 2014 5:14 am

Re: A question about option Free cache on written

Post by RobF99 »

Ok, thanks. 2 more questions. 1. Is there an overall benefit to this setting? 2. Why would the free cache value increase after the blocks are written? Is it just that the equation for free cache excludes the standby blocks?
RobF99
Level 8
Level 8
Posts: 130
Joined: Fri Sep 19, 2014 5:14 am

Re: A question about option Free cache on written

Post by RobF99 »

I think I noticed one benefit, when writing a large file - 8 Gb, if it starts flushing during the copy, it rewrites to those freed blocks as they free and evicts a lot less of already cached data. I wrote an 8 Gb file to a full L1 cache and I found that the free cache after copy complete was 2.5 Gb. Normally with that setting on, it would have showed 8 Gb free if it didn't flush until the copy was complete. Did I observe correctly?
User avatar
Support
Support Team
Support Team
Posts: 3622
Joined: Sun Dec 21, 2008 2:42 am

Re: A question about option Free cache on written

Post by Support »

This option was introduced in old versions which couldn't separate read and write cache space. Since PrimoCache is able to support individual read and write cache space, this option becomes less useful and just remains as a legacy option.
User avatar
Support
Support Team
Support Team
Posts: 3622
Joined: Sun Dec 21, 2008 2:42 am

Re: A question about option Free cache on written

Post by Support »

RobF99 wrote: Fri Dec 03, 2021 12:40 pm 2. Why would the free cache value increase after the blocks are written? Is it just that the equation for free cache excludes the standby blocks?
Actually we can call all cached blocks as standby blocks, except those owns deferred write-data (not written yet). However, when the option "free cache on written" is enabled, blocks whose deferred data have been written are considered as "free" blocks, following "empty" blocks. That's why you see free cache increases after blocks are written".
RobF99
Level 8
Level 8
Posts: 130
Joined: Fri Sep 19, 2014 5:14 am

Re: A question about option Free cache on written

Post by RobF99 »

Actually we can call all cached blocks as standby blocks, except those owns deferred write-data (not written yet). However, when the option "free cache on written" is enabled, blocks whose deferred data have been written are considered as "free" blocks, following "empty" blocks. That's why you see free cache increases after blocks are written".
Ok but even though they show as free blocks following empty blocks they are still cached?

Also, I assume then that any addition to cache uses empty blocks before these standby blocks?
User avatar
Support
Support Team
Support Team
Posts: 3622
Joined: Sun Dec 21, 2008 2:42 am

Re: A question about option Free cache on written

Post by Support »

RobF99 wrote: Mon Dec 06, 2021 6:15 pm Ok but even though they show as free blocks following empty blocks they are still cached?
Yes, still cached.
RobF99 wrote: Mon Dec 06, 2021 6:15 pm Also, I assume then that any addition to cache uses empty blocks before these standby blocks?
Yes.
Post Reply