Page 1 of 2

L2 cache and data not filled in again once it's out

Posted: Wed Feb 06, 2019 10:10 am
by Nick7
I tested a bit to try and see what algorithm is used for L2 cache.
Mainly it seems like LRU.

However, I did notice a bug (feature?) - once data falls out of L2 cache, it cannot get cached again (even if using or not using L1 with L2).
With using only L1 I did not notice same problem though.

I flushed windows cache between each copy/test so no Windows OS caching is messing the results (RamMap by Sysinternals helps here ;)).

For simplified test, set L1 to 0, L2 to 1GB.
Copy file with size let's say 900MB.
It gets into L2.
Copy again, it's read from L2.
Copy now some new file, let's say size 4GB.
Part of it is in L2, although whole 4GB was (re)written in L2 (another issue I opened some time ago).

Now copy initial file. It's not in L2 anymore (expected), but after reading it, it's not copied into L2 again (no write to L2).
Even several consecutive reads will not make it go into L2 again, which is not expected behavior.
Tried this with large file, and with directory full of tiny files.

Maybe there's something else going on, but it would be nice to know how L2 works, and if this indeed is a bug.

Re: L2 cache and data not filled in again once it's out

Posted: Sat Feb 09, 2019 4:54 pm
by Support
I'm sorry for the late reply because we are now on Lunar New Year Holiday.
And thank you very much for the bug report with very detailed steps. We'll follow these steps and check the results when the holiday ends.
Before that, I wonder if you really flushed Windows cache. You may check if the PrimoCache statistics "Total Read" value increases when you do the last copy (initial files). If Windows cache is cleared, you shall see "Total Read" value increases while copying.

Re: L2 cache and data not filled in again once it's out

Posted: Sun Feb 10, 2019 9:32 pm
by Nick7
Hi, yes - I'm positive windows cache was flushed, as 'Total Read' was increasing, and in Windows Task manager,'Standby' memory was zeroed too.
Also, I was always checking disk activity, both on SSD and HDD through Task Manager (if it were read from Windows cache, there would be no disk activity).
If you fail to reproduce this issue (you should be able to reproduce it), I can record and show the issue.

Re: L2 cache and data not filled in again once it's out

Posted: Mon Feb 11, 2019 10:34 am
by Support
Thank you again for your confirmation. We'll do the testing soon and post the result here.

Re: L2 cache and data not filled in again once it's out

Posted: Wed Feb 13, 2019 7:18 am
by Support
Nick7, we reproduced and confirm this problem/bug. This bug is caused by a design issue. We'll try to fix it.
Thank you very much!

Re: L2 cache and data not filled in again once it's out

Posted: Fri Feb 15, 2019 8:36 pm
by Jaga
Great to hear - another bug bites the dust.

Re: L2 cache and data not filled in again once it's out

Posted: Sat Feb 16, 2019 4:38 am
by Jaga
Quick question: does this bug only apply to the L2, or does it affect the L1 as well?

Re: L2 cache and data not filled in again once it's out

Posted: Sat Feb 16, 2019 12:29 pm
by Nick7
From what I've tested, it only applies to L2 cache.

Re: L2 cache and data not filled in again once it's out

Posted: Sun Feb 17, 2019 8:11 am
by Jaga
Thanks Nick.

Re: L2 cache and data not filled in again once it's out

Posted: Wed Feb 20, 2019 1:29 pm
by Support
Yes, only L2 is affected.