This repository has been archived by the owner on Jul 19, 2023. It is now read-only.
Free profile objects when cutting a row group #746
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PR causes profile store to release profile objects when a new row group is flushed on disk. Currently, objects remain in memory and are not eligible for garbage collection.
Memory consumption of the ingester service has a rather interesting pattern:
Heap In-use (as reported by pprof):
In-use objects:
Where a half of the capacity is taken by
convertSamples
Notice that once a new head is created, memory consumption goes to zero and then grows to ~50% of the max within the next 15-20 minutes. Supposedly, the trend indicates how samples are accumulated. However, I find it interesting that there's another "half": main contributors here are the stacktraces in-memory slice and in-memory parquet readers (that is not supposed to occupy so much memory as it only reads locations, strings, mappings, functions). Nevertheless, this is a different issue we may want to look into