-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIFO Cache validity behavior and lack of auto expiration #4921
Comments
chaudum
added a commit
that referenced
this issue
Jan 14, 2022
As described in #4921 this PR adds a periodic task that prunes expired items from the FIFO cache to free up memory. Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
3 tasks
chaudum
added a commit
that referenced
this issue
Jan 17, 2022
As described in #4921 this PR adds a periodic task that prunes expired items from the FIFO cache to free up memory. Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
chaudum
added a commit
that referenced
this issue
Jan 18, 2022
As described in #4921 this PR adds a periodic task that prunes expired items from the FIFO cache to free up memory. Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
chaudum
added a commit
that referenced
this issue
Jan 24, 2022
As described in #4921 this PR adds a periodic task that prunes expired items from the FIFO cache to free up memory. Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
chaudum
added a commit
that referenced
this issue
Jan 29, 2022
As described in #4921 this PR adds a periodic task that prunes expired items from the FIFO cache to free up memory. Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
owen-d
pushed a commit
that referenced
this issue
Jan 31, 2022
* Remove validity from FIFO cache We can remove the validity setting of 1h in 2.4 for the chunks cache because it doesn't reduce memory usage and instead leads to valid chunks being ignore when querying the cache. Chunks are immutable so it doesn't make sense to not return them if they are present in the cache. Closes #4922 Signed-off-by: Christian Haudum <christian.haudum@gmail.com> * Add periodic task to prune old FIFO cache elements As described in #4921 this PR adds a periodic task that prunes expired items from the FIFO cache to free up memory. Signed-off-by: Christian Haudum <christian.haudum@gmail.com> * Apply suggestions from code review Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com> Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As part of the 2.4 release we enabled the in memory FIFO Cache by default and set a max size (1GB) and max validity (1h) in the default configs.
I realized observing some running Loki instances that the memory was higher than expected and not reduced over time.
The
querier_cache_memory_bytes
showed that the chunks cache was full at 1GB and never reduces.After digging, the
validity
config does not behave how I expected, it's only read when aGet
is called on the cache to determine if the value should be returned to the callerHowever:
GET
callI think we should probably do two things
validity
setting of 1h from the chunks cache as chunks are immutable and expiring them based on time is wasteful #4922validity
or a new configThe text was updated successfully, but these errors were encountered: