Cache gets cleared after long time of inactivity

Found a bug? Report here
Post Reply
Neglacio
Level 4
Level 4
Posts: 32
Joined: Tue Jan 21, 2014 11:28 pm

Cache gets cleared after long time of inactivity

Post by Neglacio »

When I left the pc alone for some compiling last evening (on a non-cached disk), I noticed something when I came back this morning: A completely filled 6GB cache was almost cleared. Only 1GB was filled.
This meant that, when I opened up a game, I needed to repopulate the cache with the first load screens, even though I played it last evening (which filled my cache).

Image

As you can see, I've read and wrote enough to my disk to have my cache filled, which was last evening. But now I have 5GB free cache, and a much lower hit rate (I'm used to 25-35% when just browsing around, 50-60% with that particular game).
Is there a reason why this happens or can this be classified as a bug? ;)
User avatar
Support
Support Team
Support Team
Posts: 3627
Joined: Sun Dec 21, 2008 2:42 am

Re: Cache gets cleared after long time of inactivity

Post by Support »

This is possibly because there were lots of temporary write data on cache during the long time of inactivity. New coming write data causes PrimoCache to discards old cached data because of insufficient cache space. And because they were temporary data and were finally removed from the cache, cache space was almost empty. You can see that there were lots of "Trimmed Blocks".
If possible, you may try the setting with "Read-data only" cache strategy and without defer-write to see if this issue still exists.
Neglacio
Level 4
Level 4
Posts: 32
Joined: Tue Jan 21, 2014 11:28 pm

Re: Cache gets cleared after long time of inactivity

Post by Neglacio »

Well, even if it was temp data, I'd like to see it stay in the cache. But I'd guess this is not how Primocache works. It just calculates if it's a cache hit by the sector the data should've been stored on, am I right? So if the sector gets erased, so does the corresponding block in the cache.

I'll do a test again this night.
User avatar
Support
Support Team
Support Team
Posts: 3627
Joined: Sun Dec 21, 2008 2:42 am

Re: Cache gets cleared after long time of inactivity

Post by Support »

By design, when data in the source disk is deleted by system or applications, PrimoCache will also remove this data from the cache to avoid wasting cache space.
Post Reply