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

upgrade cadvisor to reduce cpu usage #846

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

xrmzju
Copy link
Contributor

@xrmzju xrmzju commented Aug 8, 2023

What type of PR is this?

bugfix

What this PR does / why we need it:

upgrade cadvisor to v0.41.0 to reduce cpu usage

Which issue(s) this PR fixes:

Fixes #845

Special notes for your reviewer:

@xrmzju
Copy link
Contributor Author

xrmzju commented Aug 8, 2023

WeCom20230808-110755@2x

@xrmzju xrmzju changed the title upgrade cadvisor upgrade cadvisor to reduce cpu usage Aug 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2023

🎉 Successfully Build Images.
Now Support ARM Platforms.
Comment Post Time: 2023-08-08 18:00
Git Version: 7498706

Docker Registry

Overview: https://hub.docker.com/u/gocrane

Image Pull Command
crane-agent:pr-846-7498706 docker pull gocrane/crane-agent:pr-846-7498706
dashboard:pr-846-7498706 docker pull gocrane/dashboard:pr-846-7498706
metric-adapter:pr-846-7498706 docker pull gocrane/metric-adapter:pr-846-7498706
craned:pr-846-7498706 docker pull gocrane/craned:pr-846-7498706

Quick Deploy - Helm

helm repo add crane https://finops-helm.pkg.coding.net/gocrane/gocrane
helm install crane -n crane-system --create-namespace \
                   --set craned.image.repository=gocrane/craned \
                   --set craned.image.tag=pr-846-7498706 \
                   --set metricAdapter.image.repository=gocrane/metric-adapter \
                   --set metricAdapter.image.tag=pr-846-7498706 \
                   --set craneAgent.image.repository=gocrane/crane-agent \
                   --set craneAgent.image.tag=pr-846-7498706 \
                   --set cranedDashboard.image.repository=gocrane/dashboard \
                   --set cranedDashboard.image.tag=pr-846-7498706 crane/crane

Coding Registry

Overview: https://finops.coding.net/public-artifacts/gocrane/crane/packages

Image Pull Command
crane-agent:pr-846-7498706 docker pull finops-docker.pkg.coding.net/gocrane/crane/crane-agent:pr-846-7498706
dashboard:pr-846-7498706 docker pull finops-docker.pkg.coding.net/gocrane/crane/dashboard:pr-846-7498706
metric-adapter:pr-846-7498706 docker pull finops-docker.pkg.coding.net/gocrane/crane/metric-adapter:pr-846-7498706
craned:pr-846-7498706 docker pull finops-docker.pkg.coding.net/gocrane/crane/craned:pr-846-7498706

Quick Deploy - Helm

helm repo add crane https://finops-helm.pkg.coding.net/gocrane/gocrane
helm install crane -n crane-system --create-namespace \
                   --set craned.image.repository=finops-docker.pkg.coding.net/gocrane/crane/craned \
                   --set craned.image.tag=pr-846-7498706 \
                   --set metricAdapter.image.repository=finops-docker.pkg.coding.net/gocrane/crane/metric-adapter \
                   --set metricAdapter.image.tag=pr-846-7498706 \
                   --set craneAgent.image.repository=finops-docker.pkg.coding.net/gocrane/crane/crane-agent \
                   --set craneAgent.image.tag=pr-846-7498706 \
                   --set cranedDashboard.image.repository=finops-docker.pkg.coding.net/gocrane/crane/dashboard \
                   --set cranedDashboard.image.tag=pr-846-7498706 crane/crane

Ghcr Registry

Overview: https://github.com/orgs/gocrane/packages?repo_name=crane

Image Pull Command
crane-agent:pr-846-7498706 docker pull ghcr.io/gocrane/crane/crane-agent:pr-846-7498706
dashboard:pr-846-7498706 docker pull ghcr.io/gocrane/crane/dashboard:pr-846-7498706
metric-adapter:pr-846-7498706 docker pull ghcr.io/gocrane/crane/metric-adapter:pr-846-7498706
craned:pr-846-7498706 docker pull ghcr.io/gocrane/crane/craned:pr-846-7498706

Quick Deploy - Helm

helm repo add crane https://finops-helm.pkg.coding.net/gocrane/gocrane
helm install crane -n crane-system --create-namespace \
                   --set craned.image.repository=ghcr.io/gocrane/crane/craned \
                   --set craned.image.tag=pr-846-7498706 \
                   --set metricAdapter.image.repository=ghcr.io/gocrane/crane/metric-adapter \
                   --set metricAdapter.image.tag=pr-846-7498706 \
                   --set craneAgent.image.repository=ghcr.io/gocrane/crane/crane-agent \
                   --set craneAgent.image.tag=pr-846-7498706 \
                   --set cranedDashboard.image.repository=ghcr.io/gocrane/crane/dashboard \
                   --set cranedDashboard.image.tag=pr-846-7498706 crane/crane

@borgerli
Copy link
Collaborator

borgerli commented Aug 9, 2023

My Test Results

Scenario

on 16c/32G node, create 200 pods of nginx deployment and a svc for nginx pods. Use ab -n 999999999 -c 500 http://<nginx-svc-ip>/ to do stress.
##Without this PR
Before stress, crane agent avg. cpu usage: 398m
After, 857m

With this PR

Before stress, 237m
After, 380m

@borgerli borgerli merged commit c3adee2 into gocrane:main Aug 9, 2023
12 checks passed
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.

upgrade cadvisor to reduce crane-agent cpu usage
2 participants