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

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

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

Post by Nick7 » Wed Feb 06, 2019 10:10 am

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
Posts: 2449
Joined: Sun Dec 21, 2008 2:42 am

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

Post by support » Sat Feb 09, 2019 4:54 pm

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.
Primo Ramdisk | PrimoCache
Romex Software Support

Nick7
Posts: 10
Joined: Sun Jun 25, 2017 7:50 am

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

Post by Nick7 » Sun Feb 10, 2019 9:32 pm

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
Posts: 2449
Joined: Sun Dec 21, 2008 2:42 am

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

Post by support » Mon Feb 11, 2019 10:34 am

Thank you again for your confirmation. We'll do the testing soon and post the result here.
Primo Ramdisk | PrimoCache
Romex Software Support

User avatar
support
Posts: 2449
Joined: Sun Dec 21, 2008 2:42 am

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

Post by support » Wed Feb 13, 2019 7:18 am

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!
Primo Ramdisk | PrimoCache
Romex Software Support

User avatar
Jaga
Posts: 406
Joined: Sat Jan 25, 2014 1:11 am

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

Post by Jaga » Fri Feb 15, 2019 8:36 pm

Great to hear - another bug bites the dust.

User avatar
Jaga
Posts: 406
Joined: Sat Jan 25, 2014 1:11 am

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

Post by Jaga » Sat Feb 16, 2019 4:38 am

Quick question: does this bug only apply to the L2, or does it affect the L1 as well?

Nick7
Posts: 10
Joined: Sun Jun 25, 2017 7:50 am

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

Post by Nick7 » Sat Feb 16, 2019 12:29 pm

From what I've tested, it only applies to L2 cache.

User avatar
Jaga
Posts: 406
Joined: Sat Jan 25, 2014 1:11 am

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

Post by Jaga » Sun Feb 17, 2019 8:11 am

Thanks Nick.

User avatar
support
Posts: 2449
Joined: Sun Dec 21, 2008 2:42 am

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

Post by support » Wed Feb 20, 2019 1:29 pm

Yes, only L2 is affected.
Primo Ramdisk | PrimoCache
Romex Software Support

Post Reply