Performance Considerations
Learn how to improve performance with your Argo CD deployments
Argo CD manages continuous deployments in Kubernetes environments. As deployments scale, you might encounter performance challenges, particularly with the Application Controller and Repository Server components. Understanding these common issues helps you maintain optimal performance.
Scaling issues can arise from high resource consumption, slow application refresh rates, and challenges with monorepos. Many issues have been resolved in newer versions of Argo CD, so Harness recommends keeping your Argo CD version up to date.
The nature of these issues depends on your environment and use case, so there is no single general solution. Monitor the Argo CD components and your environment, and review the following common issues and solutions.
Application Controller performance issues
Review the following causes and solutions for common Application Controller performance issues.
High CPU and Memory Usage:
Cause: Managing a Kubernetes cluster with a large number of objects can lead to increased resource consumption. For instance, in environments with numerous applications, the Application Controller may experience elevated CPU usage, leading to performance degradation.
Solution: Scaling up the Application Controller by increasing the number of replicas can help distribute the workload and improve performance. Go to Argo CD high availability to review scaling guidance. You can also dedicate each application pod to one cluster, known as sharding. Go to Argo CD scaling operations to review common scaling problems.
Cause: Applications with self-heal enabled can cause high CPU usage when the application continually differs from its desired state.
Solution:
Use exponential backoff for the application sync. Edit the
argocd-cmd-params-cmConfigMap:kubectl edit configmap argocd-cmd-params-cm -n argocddata: controller.self.heal.timeout.seconds: "2" # Initial delay between self-heal attempts (in seconds) controller.self.heal.backoff.factor: "3" # Multiplier for exponential backoff controller.self.heal.backoff.cap.seconds: "300" # Maximum delay cap (in seconds)Go to Argo CD diff customization to ignore diffs on certain fields.
Slow Application Sync Time:
Cause: A large number of applications or resources can slow down the application sync process, leading to delays in reflecting changes.
Solution:
Adjusting the
--status-processorsand--operation-processorssettings allows for more concurrent processing, improving refresh rates. Go to Argo CD: Application Controller to review tuning guidance for large-scale deployments.Enabling the
----kubectl-parallelism-limitflag can also speed up the application sync process by allowing more concurrent operations.Increase the
timeout.reconciliationvalue to allow more time for reconciliation when you have a large number of applications.Change
ARGOCD_K8S_CLIENT_QPSandARGOCD_K8S_CLIENT_BURSTto increase the Kubernetes API client QPS and burst QPS (the default values are 50 and 100, respectively). When you change these values, monitor the Kubernetes API server to confirm it can handle the increased load.Apply the following configuration to the
argocd-application-controllerStatefulSet to set these values:apiVersion: apps/v1 kind: StatefulSet metadata: name: argocd-application-controller spec: template: spec: containers: - name: application-controller env: # Setting for changing the client qps - name: ARGOCD_K8S_CLIENT_QPS value: "50" # Setting for changing the burst qps - name: ARGOCD_K8S_CLIENT_BURST value: "100"
Repository Server performance issues
Review the following causes and solutions for common Repository Server performance issues.
Out-of-Memory (OOM) Errors:
Cause: The Repository Server is responsible for cloning repositories and generating manifests. High concurrency during these operations can lead to excessive memory consumption, causing OOM errors.
Solution: Configuring the
--parallelismlimitflag controls the number of concurrent manifest generations, preventing resource overuse. Go to Argo CD high availability to review scaling guidance.
Monorepo Challenges:
Cause:
Solution: Enabling concurrent processing by creating a
.argocd-allow-concurrencyfile in the application directory allows for parallel manifest generation, mitigating delays. Go to Argo CD high availability to review scaling guidance.
HPA and monitoring
By default, Harness enables Horizontal Pod Autoscaling (HPA) for the argocd-repo-server and gitops-agent components.
Last updated
Was this helpful?