Pause L1 cache to temporarily free up Ram.

Suggestions around PrimoCache
Post Reply
SlyNine
Level 2
Level 2
Posts: 5
Joined: Tue Dec 24, 2019 5:06 am

Pause L1 cache to temporarily free up Ram.

Post by SlyNine »

The other day I was doing a smoke simulation in Blender. But I really need all my ram to do it, which, afaik, meant I had to edit and reset my entire cache.

I wish I could pause it in a way that would completely free it up until I was done using it.

Also, I was wondering about the caching policy. Is there a way to make it more stubborn so it won't rewrite the cache on the first read once the cache is full? My understanding that if the cache is full it and it reads something new it will replace something in the cache?
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: Pause L1 cache to temporarily free up Ram.

Post by Support »

If you use L1 cache only, I think another way is to delete all volumes from a cache task, keeping the cache task empty. When a cache task has no volumes assigned, it will free up L1 cache. If you have multiple volumes, yuou may use PrimoCache CLI to create a batch file to quickly remove all volumes from a cache task and later join them again.
We will also add such command in the GUI as you suggested. Thanks.

Regarding the caching policy, yes, it will replace old cached data when cache is full. For reading cache an improved LRU cache algorithm is used in PrimoCache.
SlyNine
Level 2
Level 2
Posts: 5
Joined: Tue Dec 24, 2019 5:06 am

Re: Pause L1 cache to temporarily free up Ram.

Post by SlyNine »

Thanks for the response. I'm not sure if that's quite what I was looking for, or I may have failed to understand. It's not the L1 cache I want to free up, rather the system memory it's using temporarily. But I would like to resume the cache later so it fills back up with the same cache as before. Like it does on windows startup.

I was also wondering if there are any docs on how it decides when and what cache to replace? Just out of curiosity.

Thank you again.
janusz521
Level 5
Level 5
Posts: 51
Joined: Wed Aug 26, 2020 6:11 pm

Re: Pause L1 cache to temporarily free up Ram.

Post by janusz521 »

I think freeing temporary memory would be a useful feature. On systems with prefetch enabled the cache memory map could be just written into the prefetch file like during the shutdown and loaded back later like on startup. Going even further, there could be several switchable prefetch files with cache content specific for an app like a game.

I think the cache state currently can be preserved using Edit Configuration - Lock Cache Content. It just must be handled manually.
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: Pause L1 cache to temporarily free up Ram.

Post by Support »

SlyNine wrote: Wed Oct 14, 2020 2:49 pm It's not the L1 cache I want to free up, rather the system memory it's using temporarily. But I would like to resume the cache later so it fills back up with the same cache as before. Like it does on windows startup.
Sorry, I misunderstood before. Now I get it. We will consider your request. Thanks.
SlyNine wrote: Wed Oct 14, 2020 2:49 pm I was also wondering if there are any docs on how it decides when and what cache to replace?
We use an improved/customized LRU cache replacement algorithm for reading cache. Sorry, no details is available.
Post Reply