A way to improve performance a little more with L1 & L2
Posted: Thu Jul 09, 2020 7:36 am
There is still one area where there is a slight bottleneck and that you could improve PrimoCache.
If Write data in L1 cache is evicted when L1 cache is full and you have to read that data again, then it has to be read from hard drive. This is counterintuitive since that data might have only been recently written and could very likely need to be read again soon.
I previously asked about flushing L1 to L2 at the same time as flushing to hard drive and you say it would affect performance.
What about if you added all Write Data in L1 cache to L2 cache at the same time as doing an L2Storage write (just like when you update L2 with read data). I don't see that this would cause any performance issues and it would only add a few seconds to L2Storage Write update time.
This way now even Write data that was evicted from cache is still cached in L2 if needed to be read again.
Since that data was "handled" by PrimoCache, it should find a way to make its way to L2 and L2Storage Write time would be a good time to do it without performance impact. Just an additional second or two. This will definitely help in times when you copied a large amount of data to a drive but it got flushed from L1.
If Write data in L1 cache is evicted when L1 cache is full and you have to read that data again, then it has to be read from hard drive. This is counterintuitive since that data might have only been recently written and could very likely need to be read again soon.
I previously asked about flushing L1 to L2 at the same time as flushing to hard drive and you say it would affect performance.
What about if you added all Write Data in L1 cache to L2 cache at the same time as doing an L2Storage write (just like when you update L2 with read data). I don't see that this would cause any performance issues and it would only add a few seconds to L2Storage Write update time.
This way now even Write data that was evicted from cache is still cached in L2 if needed to be read again.
Since that data was "handled" by PrimoCache, it should find a way to make its way to L2 and L2Storage Write time would be a good time to do it without performance impact. Just an additional second or two. This will definitely help in times when you copied a large amount of data to a drive but it got flushed from L1.