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

Found a bug? Report here
Nick7
Level 5
Level 5
Posts: 46
Joined: Sun Jun 25, 2017 7:50 am

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

Post 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.
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

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

Post 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.
Nick7
Level 5
Level 5
Posts: 46
Joined: Sun Jun 25, 2017 7:50 am

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

Post 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.
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

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

Post by Support »

Thank you again for your confirmation. We'll do the testing soon and post the result here.
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

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

Post 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!
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

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

Post by Jaga »

Great to hear - another bug bites the dust.
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

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

Post by Jaga »

Quick question: does this bug only apply to the L2, or does it affect the L1 as well?
Nick7
Level 5
Level 5
Posts: 46
Joined: Sun Jun 25, 2017 7:50 am

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

Post by Nick7 »

From what I've tested, it only applies to L2 cache.
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

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

Post by Jaga »

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

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

Post by Support »

Yes, only L2 is affected.
Post Reply