Page 1 of 1

primo cache writing more data at once than the L2 cache size is

Posted: Sat Apr 29, 2023 8:41 am
by npelov
Hi,

I have 16GB L2 cache for my HDD. I was copying files and I forgot to turn off cache. I saw that L2 storage write is at about 1 GB when I turned off the cache. The total read was about 28GB. So I turn off the cache, but then the cache starts flushing. At the end 25 GB was written to L2. Why would you write 24 GB to a 16GB L2 cache partition? I think every now and again you should be checking if amount of cache that has to be flushed to L2 is bigger then the whole partition. Then discard the first data (first 8GB in my case) and flush the rest. It's a waste to wear down the SSD for no good reason. Also loading the system with copying data that will be erased later.

Please implement this! Thanks!

P.S. To replicate create a small cache partition - let's say 1 GB. Set the gather interval to a slow one (I used default). Then read (copy) a bit chunk of data - 10GB. Look at how much data will be written to the cache partition after the read has already finished.

Re: primo cache writing more data at once than the L2 cache size is

Posted: Tue May 02, 2023 9:47 am
by Nick7
PrimoCache will read everything it was read, and write (and re-write) data in L2 cache.
It's far from ideal... maybe one day it will be fixed.

Re: primo cache writing more data at once than the L2 cache size is

Posted: Wed May 03, 2023 7:00 am
by Support
We have noticed this problem before, but solving this problem is not as simple as imagined. We will further improve it later.

Re: primo cache writing more data at once than the L2 cache size is

Posted: Wed May 03, 2023 10:39 am
by Nick7
'Simple' solution: Verify amount of data to be fetched into L2 is not bigger than L2 size. If it is, discard oldest data to be read, and append new data to be read at end of queue.
Even verifying this (size of queue to be read) every few seconds is good enough.

Re: primo cache writing more data at once than the L2 cache size is

Posted: Fri May 05, 2023 10:40 am
by Support
It's not that simple... PrimoCache populates L2 data asynchronously. And when the cache space is full, it is also necessary to replace the old cache data with new data according to a certain cache replacement algorithm. These two factors complicate matters.