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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly release the ticker in Loki client. #3566

Merged
merged 1 commit into from
Mar 31, 2021

Conversation

cyriltovena
Copy link
Contributor

I think this was only impacting the docker driver who would start/stop for each new followed containers.
My assumption is that this would slowly build up and eat CPU over time.

Fixes #3319

I arrived to this conclusion since strace was showing a crazy amount of futex syscall and nothing else seems to be the cause.

馃檹

big thanks to @glebsam @till
Signed-off-by: Cyril Tovena cyril.tovena@gmail.com

I think this was only impacting the docker driver who would start/stop for each new followed containers.
My assumption is that this would slowly build up and eat CPU over time.

Fixes grafana#3319

I arrived to this conclusion since strace was showing a crazy amount of futex syscall and nothing else seems to be the cause.

:pray:

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
@codecov-io
Copy link

Codecov Report

Merging #3566 (c6b9091) into master (eff4ff1) will decrease coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3566      +/-   ##
==========================================
- Coverage   63.18%   63.10%   -0.09%     
==========================================
  Files         206      206              
  Lines       17737    17738       +1     
==========================================
- Hits        11208    11194      -14     
- Misses       5531     5544      +13     
- Partials      998     1000       +2     
Impacted Files Coverage 螖
pkg/promtail/client/client.go 82.79% <100.00%> (+0.09%) 猬嗭笍
pkg/promtail/targets/file/tailer.go 73.21% <0.00%> (-5.36%) 猬囷笍
pkg/promtail/targets/file/filetarget.go 64.13% <0.00%> (-2.76%) 猬囷笍
pkg/querier/queryrange/downstreamer.go 95.29% <0.00%> (-2.36%) 猬囷笍
pkg/ingester/checkpoint.go 72.83% <0.00%> (-1.14%) 猬囷笍

Copy link
Collaborator

@slim-bean slim-bean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cyriltovena cyriltovena merged commit ecca5d3 into grafana:master Mar 31, 2021
slim-bean pushed a commit that referenced this pull request Apr 6, 2021
I think this was only impacting the docker driver who would start/stop for each new followed containers.
My assumption is that this would slowly build up and eat CPU over time.

Fixes #3319

I arrived to this conclusion since strace was showing a crazy amount of futex syscall and nothing else seems to be the cause.

:pray:

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
(cherry picked from commit ecca5d3)
@slim-bean slim-bean mentioned this pull request Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loki docker driver: sporadic high CPU usage
4 participants