gnovm store: SetCachePackage
stores packages on memory. Possible OOM errors.
#812
Labels
Milestone
SetCachePackage
stores packages on memory. Possible OOM errors.
#812
Description
After trying to reduce the memory usage moving from maps to an LRU cache here (#780), I realized that packages set on
cacheObjects
are not expected to be evicted, causing problems if we use an LRU cache.Possible Solution
We can store these packages on persistent storage using a special key like
/tmp/[UUID]/oid:[OID]
where [UUID] is a unique ID created per storage session (every time you initialise a store or purge it)When purging cache calling
ClearObjectCache
we generate a new UUID and we remove all keys under the previous UUID/tmp/[UUID]
On every server restart, we remove all keys under
/tmp
WDYT?
The text was updated successfully, but these errors were encountered: