Gather Interval and L1 to L2 cache copy

Suggestions around PrimoCache
Post Reply
Nick7
Level 5
Level 5
Posts: 46
Joined: Sun Jun 25, 2017 7:50 am

Gather Interval and L1 to L2 cache copy

Post by Nick7 »

If Gather Interval is set to '1' (aka, immediate) for L2, it still only works after HDD is IDLE for minimum amount of time.

The problem:
Example 1:

cache is set for read-only
L1 is set to 2GB
L2 is set to 60GB
If I start reading file which is 8GB in size, it will start filling L1 cache, and start overwriting data in L1 (since file is larger than L1) until read is complete. When read from HDD is complete, new read will happen to fill that same data into L2 cache.

We get 2x reads for same data from HDD.

Example 2:
cache is set for read-only
L1 is set to 16GB
L2 is set to 60GB
If I start reading file which is 8GB in size, it will start filling L1 cache. However L1 is in this case big enough, so no overwriting. When read from HDD finishes, L2 starts filling up. However, this time L2 reads data from L1 instead from HDD, since data is available in L1 cache.

Due to this, we get only 'one' read from HDD to fill up L2 cache, instead of 2 reads when data falls out of L1 cache.

Suggestion:
Give Gather Interval option which will immediately copy data from L1 into L2, even if this means data may be throttled for reading into L1 as for 'old' data not to fall out of L1 before it's written to L2 cache.
This way there is no extra reads from HDD to fill up L2 cache.
This will also help busy systems to fill up L2 cache more easily.
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: Gather Interval and L1 to L2 cache copy

Post by Support »

Thank you for the suggestion!
We probably have different opinion on this. One of goals of L2 populating is not affecting normal tasks. Doing immediate population might cause lags or slow on normal tasks which shall not be expected by most users. We also consider that there shall be almost no impact on reading from HDD to fill L2.
Nick7
Level 5
Level 5
Posts: 46
Joined: Sun Jun 25, 2017 7:50 am

Re: Gather Interval and L1 to L2 cache copy

Post by Nick7 »

This was one of my goals with this suggestion too: copying (populating) data from L1 to L2 should have minor/no impact on normal I/O, since L2 is much faster than HDD which is accelerated.
With option to copy directly from L1 to L2 you remove need for another read from HDD to fill up L2. On busy systems this can make quite significant difference - since if same data is read after some little time, it will need to be read from HDD again (if it's pushed out of L1 cache), since system was not idle enough for PrimoCache to start filling L2.
As an example Intel's SRT works in same way (though they do not have L1 cache, but only use directly SSD for acceleration).
I would really love if you'd consider such functionality :)
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: Gather Interval and L1 to L2 cache copy

Post by Support »

Thank you! We'll consider your suggestion.
Post Reply