-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve ingester flush memory usage. (#3200)
* Add basic benchmark. Signed-off-by: Cyril Tovena <[email protected]> * Improves memory usage of checkpointer series iterator. Signed-off-by: Cyril Tovena <[email protected]> * make lint. Signed-off-by: Cyril Tovena <[email protected]> * Add benchmark for flush loop. ``` goos: darwin goarch: amd64 pkg: github.com/grafana/loki/pkg/ingester Benchmark_FlushLoop-16 16 70040359 ns/op 241901661 B/op 1112 allocs/op PASS ok github.com/grafana/loki/pkg/ingester 4.829s ``` Signed-off-by: Cyril Tovena <[email protected]> * Improve benchmark. Signed-off-by: Cyril Tovena <[email protected]> * Re-use buffer when flushing chunks. benchcmp ``` ❯ benchcmp before.txt after.txt benchmark old ns/op new ns/op delta Benchmark_FlushLoop-16 104723243 9233780 -91.18% benchmark old allocs new allocs delta Benchmark_FlushLoop-16 1115 568 -49.06% benchmark old bytes new bytes delta Benchmark_FlushLoop-16 241857243 989590 -99.59% ``` Signed-off-by: Cyril Tovena <[email protected]> * better size computation. Signed-off-by: Cyril Tovena <[email protected]> * Fixes test ordering flakyness. Signed-off-by: Cyril Tovena <[email protected]> * lint. Signed-off-by: Cyril Tovena <[email protected]>
- Loading branch information
1 parent
07ece2b
commit ea488f9
Showing
3 changed files
with
61 additions
and
9 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