-
Notifications
You must be signed in to change notification settings - Fork 812
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce ingester memory by using TSDB's index (#3951)
* Add BenchmarkIngesterV2Push So we can check the efficiency of changes to `v2Push()`. Broadly copied from `BenchmarkIngesterPush()`. Signed-off-by: Bryan Boreham <bjboreham@gmail.com> * Use TSDB's index of series, remove RefCache prometheus/prometheus#8600 adds a method to `TSDB.Appender` which allows us to save building a parallel cache, reducing ingester heap by about 20%. We depend on values from GetRef() remaining valid while v2Push() uses them. Currently the only way a ref can be invalidated is by a head compaction, which cannot happen while v2Push() holds the append lock. Signed-off-by: Bryan Boreham <bjboreham@gmail.com> * New version of GetRef() that returns labels Now we only need to make a copy if GetRef() returns zero Note Prometheus update brings in JSON marshalling of model.Duration prometheus/common#280 Signed-off-by: Bryan Boreham <bjboreham@gmail.com> * Add comment on use of copiedLabels Signed-off-by: Bryan Boreham <bjboreham@gmail.com> * Update to Prometheus main branch Pinned gRPC and other dependencies changed by the update in Prometheus to avoid taking so much change on this PR. Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
- Loading branch information
Showing
14 changed files
with
197 additions
and
973 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.