Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPrometheus generated too many same files when do compaction #5137
Comments
This comment has been minimized.
This comment has been minimized.
|
During compaction, Prometheus can take up to 2x the current disk space being used, because at first compaction creates the new blocks then deletes the old ones. Is your disk usage still high even after compaction has ended? |
This comment has been minimized.
This comment has been minimized.
In order to ensure that other service programs on this machine are not affected, I first cleared the receipt. Later I will try to reproduce on a large-capacity machine. |
This comment has been minimized.
This comment has been minimized.
|
@codesome Hi, I have encountered this problem again. the TSDB directory like this:
|
This comment has been minimized.
This comment has been minimized.
|
It is difficult to figure out the problem by looking at just the directory name and its time. I don't think meta files can be same, that would mean overlapping blocks, which should be flagged by Prometheus. Can you give some more info?
|
This comment has been minimized.
This comment has been minimized.
I have deleted these files.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Thanks for reporting! I'm closing it as this is a duplicate of #5135. The tsdb fix is prometheus/tsdb#512 (still under discussion). |
simonpasquier
closed this
Feb 1, 2019
This comment has been minimized.
This comment has been minimized.
Good job! |
eahydra commentedJan 25, 2019
•
edited
Proposal
Use case. Why is this important?
Prometheus generated too many same files when do compaction.
Bug Report
What did you do?
I have got alert that disk space cost 90%, and found that the prometheus tsdb used too many space.
There are many same files but different parent directory name, and the meta.json have the same text.
What did you expect to see?
Don't generate so many same files
What did you see instead? Under which circumstances?
Too many same files when compaction.
Environment
System information:
the internal version but based on CentOS 7
Prometheus version:
prometheus, version 2.5.0 (branch: release/20181129-11-33, revision: 67dc912)
build user: admin@rs7h13559.et2sqa
build date: 20181129-03:34:17
go version: go1.11
Prometheus configuration file:
Lost the logs