Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use stream model to reduce memory usage #81

Merged
merged 8 commits into from
Dec 31, 2021
Merged

Conversation

RayHuangCN
Copy link
Member

we use VictoriaMetrics lib to enable stream model in any scraping process.
It reduce a log of memory useage of Coordinator and Sidecar.

In my benchmark case (50 targets, 1000w series), the memory usage of Coordinator < 100MB, and Sidecar with 240w max series only use about 50MB memory.

@codecov
Copy link

codecov bot commented Dec 31, 2021

Codecov Report

Merging #81 (0623a55) into master (def3fe4) will increase coverage by 0.41%.
The diff coverage is 88.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #81      +/-   ##
==========================================
+ Coverage   82.81%   83.23%   +0.41%     
==========================================
  Files          30       32       +2     
  Lines        1525     1569      +44     
==========================================
+ Hits         1263     1306      +43     
- Misses        160      161       +1     
  Partials      102      102              
Impacted Files Coverage Δ
pkg/coordinator/coordinator.go 75.92% <ø> (ø)
pkg/coordinator/rebalance.go 78.00% <0.00%> (-0.54%) ⬇️
pkg/scrape/jobinfo.go 75.00% <75.00%> (ø)
pkg/scrape/reader.go 75.00% <75.00%> (ø)
pkg/sidecar/proxy.go 87.71% <83.33%> (+5.90%) ⬆️
pkg/scrape/scraper.go 93.22% <93.22%> (ø)
pkg/discovery/discovery.go 89.10% <100.00%> (+0.81%) ⬆️
pkg/explore/explore.go 87.50% <100.00%> (+0.59%) ⬆️
pkg/prom/config.go 82.35% <100.00%> (ø)
pkg/shard/kubernetes/shardmanager.go 66.66% <100.00%> (+3.25%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 06a0b91...0623a55. Read the comment docs.

@RayHuangCN RayHuangCN merged commit be63067 into master Dec 31, 2021
@RayHuangCN RayHuangCN deleted the release/v0.1.5 branch December 31, 2021 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant