Page 1 of 1

A question about option Free cache on written

Posted: Thu Dec 02, 2021 3:16 pm
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.

Re: A question about option Free cache on written

Posted: Fri Dec 03, 2021 2:43 am
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.

Re: A question about option Free cache on written

Posted: Fri Dec 03, 2021 12:40 pm
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?

Re: A question about option Free cache on written

Posted: Fri Dec 03, 2021 4:15 pm
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?

Re: A question about option Free cache on written

Posted: Mon Dec 06, 2021 9:43 am
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.

Re: A question about option Free cache on written

Posted: Mon Dec 06, 2021 9:51 am
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".

Re: A question about option Free cache on written

Posted: Mon Dec 06, 2021 6:15 pm
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?

Re: A question about option Free cache on written

Posted: Tue Dec 07, 2021 5:09 am
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.