Another way to unload cache is to change around some settings: for example, you could set “knn.memory.circuit_breaker.limit” to null and then return it to its previous value. This will evict all entries in the cache and allow you to index.
Assume that there are 10 graphs each occupying 6 GiB of memory and the circuit breaker limit is 59 GiB. Assuming all 10 graphs are searched, only 9 graphs will be able to fit in the cache at one time, making the maximum cache size 54 GiB.
Thank you for that explaination, just to understand this correctly: 75% of 59GB = 44,25GB
Therefore the untripping would happen as soon as there are not more than 7 Graphs in the memory (42GB)
The 59GB limit in your example is the memory limit of one node or the cluster?
As of my initial problem, the issue then must have been that in this 15 min cache expiry more than 9 graphs have been requested and therefore it was never able to unload more?
I guess you’re not planing to have a feaure like: evict_complete_graphcache_if_cuircuit_breaker_stays_active_for=20min
?
One more question regarding:
set “knn.memory.circuit_breaker.limit” to null and then return it to its previous value
Will setting the limit to null have dangerous effects? Even tough I will try to set the original value directly afterwards?
The 59GB limit in your example is the memory limit of one node or the cluster?
Yes correct.
As of my initial problem, the issue then must have been that in this 15 min cache expiry more than 9 graphs have been requested and therefore it was never able to unload more?
Right, for an individual query, all graphs for the field you are interested in will be loaded into the cache.
I guess you’re not planing to have a feaure like: evict_complete_graphcache_if_cuircuit_breaker_stays_active_for=20min
?
I do not think we have a plan for this at the moment. Once, cache clear API is implemented, this could functionality could be implemented on the client side.
Will setting the limit to null have dangerous effects? Even tough I will try to set the original value directly afterwards?
Setting the limit to null will just return the value to its default (which will trigger a cache rebuild where all entries are evicted). This is not dangerous.