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

High CPU utilisation (5 cores) and spammy logs #2721

Closed
3 tasks done
estahn opened this issue Nov 14, 2019 · 8 comments · Fixed by #2809 or #2816
Closed
3 tasks done

High CPU utilisation (5 cores) and spammy logs #2721

estahn opened this issue Nov 14, 2019 · 8 comments · Fixed by #2809 or #2816
Labels
bug Something isn't working
Milestone

Comments

@estahn
Copy link
Contributor

estahn commented Nov 14, 2019

Checklist:

  • I've searched in the docs and FAQ for my answer: http://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

High CPU utilisation (5 cores) and spamming logs:

W1114 12:35:34.096340       1 listers.go:77] can not retrieve list of objects using index : Index with name namespace does not exist

To Reproduce

N/A

Expected behavior

Less resource usage and not so many log entries about the same thing.

Screenshots

image

image

Version

argocd: v1.3.0-rc1+8a43840
  BuildDate: 2019-10-16T21:46:40Z
  GitCommit: 8a43840f0baef50946d3eadc1d52d6a2abc162d5
  GitTreeState: clean
  GoVersion: go1.12.6
  Compiler: gc
  Platform: darwin/amd64
argocd-server: v1.3.0-rc1+8a43840
  BuildDate: 2019-10-16T21:46:08Z
  GitCommit: 8a43840f0baef50946d3eadc1d52d6a2abc162d5
  GitTreeState: clean
  GoVersion: go1.12.6
  Compiler: gc
  Platform: linux/amd64
  Ksonnet Version: v0.13.1
  Kustomize Version: v3.1.0
  Helm Version: v2.12.1
  Kubectl Version: v1.14.0

Logs

N/A

@estahn estahn added the bug Something isn't working label Nov 14, 2019
@alexec
Copy link
Contributor

alexec commented Nov 18, 2019

Is this a fresh install, upgrade or other please?

@estahn
Copy link
Contributor Author

estahn commented Nov 18, 2019

This has been running for a while. @alexec

@alexec
Copy link
Contributor

alexec commented Nov 20, 2019

OK. Can I ask what you're baselining against please?

@alexec
Copy link
Contributor

alexec commented Nov 27, 2019

Fixed by #2770 and #2761

@alexmt
Copy link
Collaborator

alexmt commented Dec 4, 2019

hello @estahn , does your argocd has a lot of git repos configured ?

@alexmt
Copy link
Collaborator

alexmt commented Dec 4, 2019

We've faced the same issue in our production cluster. The reason for high CPU usage appears to be in a not efficient implementation of setting parsing.

The ListRepositories method have n^2 complexity: it parses the whole content of repositories field from argocd-cm config map. So if argo cd instance has 100 repos when single execution of ListRepositories have to parse 30000 lines of yaml (100 repos * 3 lines per repo * 100 times) which uses a lot of CPU.

Working on PR which fixes it ASAP.

@alexmt
Copy link
Collaborator

alexmt commented Dec 4, 2019

Also got a response to my question from @estahn: around 80 repos are configured. That is definitely enough to cause high CPU usage.

@alexmt alexmt added this to the v1.3 milestone Dec 4, 2019
alexmt pushed a commit to alexmt/argo-cd that referenced this issue Dec 4, 2019
alexec added a commit to alexec/argo-cd that referenced this issue Dec 4, 2019
alexec pushed a commit that referenced this issue Dec 4, 2019
alexmt pushed a commit that referenced this issue Dec 4, 2019
@alexmt alexmt reopened this Dec 5, 2019
@alexmt
Copy link
Collaborator

alexmt commented Dec 5, 2019

Deployed 1.3.2 + changes in #2810 internally. Fix improved performance but there I'm still seeing higher CPU usage comparing to 1.2 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants