---
title: "ArgoCD ApplicationSet: Tinh chỉnh tham số hiệu năng và giới hạn tài nguyên Production"
description: "Tối ưu hiệu năng ArgoCD ApplicationSet Controller trong production: tinh chỉnh concurrency, Git polling interval, caching Redis và resource limits."
canonical: "https://thuecloud.vn/argocd-applicationset-tinh-chinh-tham-so-hieu-nang-va-gioi-han-tai-nguyen-production"
markdown_url: "https://thuecloud.vn/argocd-applicationset-tinh-chinh-tham-so-hieu-nang-va-gioi-han-tai-nguyen-production.md"
locale: "vi"
kind: "article"
published_at: "2026-11-22T16:18:39.973Z"
updated_at: "2026-11-22T16:18:36.558Z"
site: "ThueCloud.Vn"
estimated_tokens: 1805
---
# ArgoCD ApplicationSet: Tinh chỉnh tham số hiệu năng và giới hạn tài nguyên Production

> Tối ưu hiệu năng ArgoCD ApplicationSet Controller trong production: tinh chỉnh concurrency, Git polling interval, caching Redis và resource limits.

- Canonical HTML: https://thuecloud.vn/argocd-applicationset-tinh-chinh-tham-so-hieu-nang-va-gioi-han-tai-nguyen-production
- Markdown URL: https://thuecloud.vn/argocd-applicationset-tinh-chinh-tham-so-hieu-nang-va-gioi-han-tai-nguyen-production.md
- Organization: ThueCloud.Vn
- Support Email: support@thuecloud.vn
- Hotline: 03333 499 48
- Published: 2026-11-22
- Updated: 2026-11-22

## Mục lục

- Tinh chỉnh tham số Controller và Repo Server
- Bảng cấu hình tối ưu theo quy mô cụm Kubernetes
- Kiểm soát tốc độ triển khai bằng Progressive Syncs
- Câu hỏi thường gặp (FAQ)
  - Tại sao ArgoCD Repo Server hay bị OOMKill khi chạy Helm hoặc Kustomize?
  - Nên dùng Webhook hay giảm thời gian polling xuống 30 giây?
  - Tính năng Progressive Syncs (RollingSync) có mặc định được bật không?

Khi số lượng ứng dụng do **ArgoCD ApplicationSet** quản lý tăng từ vài chục lên hàng trăm `Application` trên cụm Kubernetes chạy [Cloud VPS Việt Nam](https://thuecloud.vn/vps-viet-nam), controller mặc định dễ rơi vào tình trạng nghẽn hàng đợi reconcile, ngốn RAM hoặc chạm giới hạn API Rate Limit của GitHub/GitLab. Bài viết này hướng dẫn các tham số tinh chỉnh quan trọng giúp ArgoCD vận hành mượt mà ở quy mô production.

> **Tóm tắt nhanh (TL;DR):**
> - Tăng `--max-concurrent-reconciliations` cho ApplicationSet Controller nếu quản lý trên 100 `Application`, đồng thời cấp đủ RAM (`512Mi`–`1Gi`) cho Repo Server.
> - Chuyển từ polling Git mỗi 3 phút sang **Webhook** kết hợp tăng `timeout.reconciliation` lên `300s`–`600s` để giảm tải CPU và tránh Git API rate limit.
> - Thiết lập `progressiveSyncs` (RollingSync) để không triển khai đồng loạt lên tất cả cluster production cùng một lúc.
> - *Cập nhật: 11/2026*

## 1. Tinh chỉnh tham số Controller và Repo Server

Trong file manifest hoặc Helm values của ArgoCD, hãy điều chỉnh các cờ khởi chạy cho `applicationset-controller` và `repo-server`:

```yaml
applicationSet:
  extraArgs:
    - --max-concurrent-reconciliations=10
    - --policy=sync
  resources:
    requests:
      cpu: 100m
      memory: 256Mi
    limits:
      cpu: 500m
      memory: 512Mi
repoServer:
  replicas: 2
  extraArgs:
    - --parallelismlimit=10
  resources:
    requests:
      cpu: 250m
      memory: 512Mi
    limits:
      cpu: 1000m
      memory: 1536Mi
```

## 2. Bảng cấu hình tối ưu theo quy mô cụm Kubernetes

| Quy mô (`Application`) | `repoServer` RAM Limit | `application-controller` Shards | Git Sync Strategy | RollingSync |
| :--- | :--- | :--- | :--- | :--- |
| Nhỏ (< 50 apps) | `512Mi` | `1` replica | Polling `180s` | Tùy chọn |
| Trung bình (50–200 apps) | `1Gi` – `1.5Gi` | `1` – `2` replicas | Webhook + Polling `300s` | Khuyến nghị |
| Lớn (> 200 apps) | `2Gi`+ (2+ replicas) | Sharding (`--sharding-method`) | Webhook bắt buộc | Bắt buộc |

Nếu bạn đang tối ưu thêm các dịch vụ web và xử lý ảnh trong cụm, có thể xem thêm [Thumbor Image CDN: Cài đặt chi tiết từ đầu](https://thuecloud.vn/thumbor-image-cdn-cai-dat-chi-tiet-tu-dau-va-kiem-tra-hoat-dong-thuc-te), [Thumbor Image CDN: Phân tích lỗi thường gặp](https://thuecloud.vn/thumbor-image-cdn-phan-tich-loi-thuong-gap-va-quy-trinh-xu-ly-su-co-nhanh) và [CloudPanel PHP Multi-Version: Tinh chỉnh tham số hiệu năng](https://thuecloud.vn/cloudpanel-php-multi-version-tinh-chinh-tham-so-hieu-nang-va-gioi-han-tai-nguyen-production).

## 3. Kiểm soát tốc độ triển khai bằng Progressive Syncs

Để tránh một commit lỗi đánh sập toàn bộ môi trường production cùng lúc, hãy kích hoạt chiến lược `RollingSync` theo từng bước (staging trước, production sau):

```yaml
spec:
  strategy:
    type: RollingSync
    rollingSync:
      steps:
        - matchExpressions:
            - key: env
              operator: In
              values: [staging]
        - matchExpressions:
            - key: env
              operator: In
              values: [production]
```

> **Nền tảng Kubernetes hiệu năng cao tại ThueCloud.Vn:**
> **ThueCloud.Vn** cung cấp cụm **KVM Enterprise NVMe** tại `vn-hn` với **SLA 99,9%**, **VAT 0%** và **hoàn tiền 07 ngày**. Gói **VPS VN 2** (`78.000đ/tháng` năm / `90.000đ/tháng`) hoặc **VPS VN 3** (`139.000đ/tháng` năm / `170.000đ/tháng`) đáp ứng dư dả tài nguyên cho ArgoCD HA và Redis cache. Xem chi tiết tại [Bảng giá VPS](https://thuecloud.vn/pricing) và [Giải pháp hạ tầng](https://thuecloud.vn/giai-phap).

## Câu hỏi thường gặp (FAQ)

### Tại sao ArgoCD Repo Server hay bị OOMKill khi chạy Helm hoặc Kustomize?
Vì quá trình render template Helm/Kustomize cho nhiều `Application` diễn ra đồng thời trên `repo-server`. Bạn nên đặt `memory.limits` tối thiểu `1Gi` và giới hạn `--parallelismlimit`.

### Nên dùng Webhook hay giảm thời gian polling xuống 30 giây?
Luôn ưu tiên Webhook từ GitHub/GitLab/Gitea. Giảm polling xuống 30 giây sẽ khiến ArgoCD liên tục gọi Git API, rất nhanh chạm giới hạn rate limit.

### Tính năng Progressive Syncs (RollingSync) có mặc định được bật không?
Chưa, với một số phiên bản bạn cần thêm cờ `--enable-progressive-syncs` vào `argocd-applicationset-controller` để kích hoạt.

## References / Sources

- https://argo-cd.readthedocs.io/en/stable/operator-manual/high_availability/
- https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Controlling-Resource-Modification/
- https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/

---

## Navigation & Machine-Readable Endpoints

- [Site Summary (llms.txt)](https://thuecloud.vn/llms.txt)
- [Full Technical Reference (llms-full.txt)](https://thuecloud.vn/llms-full.txt)
- [Pricing Catalog (Markdown)](https://thuecloud.vn/pricing.md)
- [Blog & Technical Guides (Markdown)](https://thuecloud.vn/blog.md)
- [XML Sitemap](https://thuecloud.vn/sitemap.xml)
