Loki Version : 2.5.0
Situation:
Memory increase shardly after deleting chunk files
- Found many chunk files lay in my disk
- delete chunks which was expired
- I run the shell file
folder_path=“/home/loki/chunks”
date_before=“2023-11-01 00:00:00”
pattern=“Zm*”
file_list=$(find “$folder_path” -name “$pattern” -not -newermt “$date_before”)
for file in $file_list; do
rm -rf $file
done
- chunks file were deleted, and I could query loki fiirstly
- cuple minutes later, kubectl drop down for out of CPU resource
- At about 14:26:00, I run the shell and chunks files were deleted successfully. And there was a peak about my CPU resource.
- At about 14:30:00, I test loki, and make some request for Loki, Loki could query firstly.
- At about 14:45:00, Loki was down for out of 100% CPU.
I want to know that what made Loki request so much resource about CPU, was the index in Loki cache?