Open lovesharepc opened 1 year ago
From what I can tell from the code, the only options for Chunk Cache are In Memory (Embedded), Memcache, and Redis. https://github.com/grafana/loki/tree/main/pkg/storage/chunk/cache
The in-memory cache is enabled by default now and there is info on adjusting the size here: https://grafana.com/docs/loki/latest/setup/upgrade/#in-memory-fifo-caches-enabled-by-default
I just found a good article from Grafana Blog regarding using filesystem cache for chunks. You can setup memcached to use filesystem (extstore). Quote from the article:
extstore is quite simple, conceptually: Items that cannot fit into the LRU (in RAM) are simply transitioned to disk. In essence, extstore keeps all of its keys in RAM, and the values are split between RAM and disk.
I haven't tested it yet, but it looks promising.
I am use S3 as chunk storage does loki can do this feature? question 1. querier cache chunk to local filesystem ?
I see storage_config - tsdb_shipper have cache_location option but this look like index only
in this document https://grafana.com/docs/loki/latest/storage/ I see last example have filesystem config does this mean use filesystem sort-term chunk storage and ttl is 24H?
here is my full config
question 2. short-term data in ingester and long-term data to S3, how to define period is short-term? does this right ? change ingester - max_chunk_age and increse querier - query_ingesters_within to control sort-term data query from filesystem