Primocache doesn't work on the file just written.

FAQ, getting help, user experience about PrimoCache
Post Reply
arrenwu
Level 2
Level 2
Posts: 9
Joined: Tue Dec 17, 2019 7:27 pm

Primocache doesn't work on the file just written.

Post by arrenwu »

OS: Windows 10 Pro 22H2
PrimoCache Version: 4.3.0

Setting
I set up a cache task for a Windows storage space (Mirror) with
  • 1GB L1 write-only cache and
  • 200GB L2 read-only cache.

Problem
If I have a file just newly-written to that storage space, I can see L1-cache is written.
However, when I read that file, PrimoCache GUI shows no read request to the storage space.
The issue here is: the file is not written into L2 cache after it's read.

I think the root-cause is that at the moment the file was written, it's already in the memory cache of windows.
Reading the file immediately after it's written touches only the memory cache and thus no request to the storage space is sent.
This theory can be consolidated by the fact that if I use RMMMap to clear standy memory, which includes the file cache, and then read the file, I can see the value of "Cached Read" in PrimoCache GUI increase and slight later the "L2Storage Write" also increases by the same amount of data.

I feel annoyed that the latest read on a file doesn't guarantee it's cached in L2Storage.
I also see in the doc of PrimoCache suggests keep Write-caching on the disk turned on. I wonder if we have some approach to deal with this issue?
User avatar
Support
Support Team
Support Team
Posts: 3627
Joined: Sun Dec 21, 2008 2:42 am

Re: Primocache doesn't work on the file just written.

Post by Support »

arrenwu wrote: Sun Dec 24, 2023 9:17 am I think the root-cause is that at the moment the file was written, it's already in the memory cache of windows.
Reading the file immediately after it's written touches only the memory cache and thus no request to the storage space is sent.
Yes, this is correct.

This is indeed a problem for which there is currently no good solution. However, since the L2 cache is persistent across reboots, if files are read later after Windows cache is replaced or after reboots, they can eventually be cached.
ittsignal
Level 1
Level 1
Posts: 1
Joined: Tue Jan 23, 2024 7:50 am

Re: Primocache doesn't work on the file just written.

Post by ittsignal »

Review the settings and configuration options in PrimoCache to ensure that you have set up the cache task correctly.
Ushavilash
Level 2
Level 2
Posts: 7
Joined: Tue Feb 27, 2024 9:37 am

Re: Primocache doesn't work on the file just written.

Post by Ushavilash »

Hye, While enabling write caching on the disk and clearing standby memory could potentially help, the root cause could be more complex.
Endelin
Level 1
Level 1
Posts: 3
Joined: Mon Mar 11, 2024 2:33 pm

Re: Primocache doesn't work on the file just written.

Post by Endelin »

Tweaking PrimoCache settings might help, and keeping Write-caching on the disk turned on could be worth a shot.
Post Reply