본문 바로가기
문서 목차
ORKESTRIXAI 플랫폼

gang_scheduling

정보 — 요건 all or nothing 갱 스케줄링 솔루션(Kueue, Volcano 등)을 최소 하나 설치·동작시켜, 분산 AI 워크로드의 전부 또는 전무 스케줄링을 보장함을 증명한다.

QUANTUM C&S

정보 — 요건

all-or-nothing 갱 스케줄링 솔루션(Kueue, Volcano 등)을 최소 하나 설치 · 동작시켜, 분산 AI 워크로드의 전부-또는-전무 스케줄링을 보장함을 증명한다.

카테고리: 스케줄링 · 오케스트레이션 · 수준: MUST · 상태: Implemented

적용 솔루션

Kueue v0.18.2를 QKS에 설치해 all-or-nothing 스케줄링을 시연했습니다. 잡은 suspend 상태로 큐잉되고, ClusterQueue 쿼터가 충족될 때만 워크로드 전체가 한꺼번에 admit됩니다. 자원 부족 시 부분 배치 없이(파드 0개) 대기함으로써 all-or-nothing을 보장합니다.

증명 (명령어 + 출력)

1. 갱 스케줄러(Kueue) 설치 · 동작

$ kubectl get pods -n kueue-system -o wide
NAME                                       READY   STATUS    RESTARTS   AGE   IP               NODE    NOMINATED NODE   READINESS GATES
kueue-controller-manager-757659658-tr6d7   1/1     Running   0          54s   10.244.144.253   qcs02   <none>           <none>

$ kubectl get crd | grep kueue.x-k8s.io
admissionchecks.kueue.x-k8s.io                                2026-07-02T02:23:09Z
clusterqueues.kueue.x-k8s.io                                  2026-07-02T02:23:09Z
localqueues.kueue.x-k8s.io                                    2026-07-02T02:23:09Z
resourceflavors.kueue.x-k8s.io                                2026-07-02T02:23:10Z
workloads.kueue.x-k8s.io                                      2026-07-02T02:23:10Z
…(총 11개 중 일부)

# captured: 2026-07-02T02:24:04Z

2. 큐 구성 + 여유보다 큰 갱 잡 제출

ClusterQueue 쿼터를 CPU 4로 제한하고, 총 CPU 16(8 파드 × 2 CPU)을 요구하는 suspend 잡을 제출했습니다.

apiVersion: batch/v1
kind: Job
metadata:
  name: gang-job
  namespace: gang-demo
  labels:
    kueue.x-k8s.io/queue-name: conformance-lq
spec:
  parallelism: 8
  completions: 8
  suspend: true          # Kueue가 admit할 때까지 suspend (all-or-nothing 핵심)
  template:
    spec:
      restartPolicy: Never
      containers:
      - name: worker
        image: registry.k8s.io/e2e-test-images/agnhost:2.53
        args: ["pause"]
        resources:
          requests: { cpu: "2", memory: "512Mi" }

3. 자원 부족 시 부분 배치 차단 (all-or-nothing 대기)

Workload는 admit되지 않고, 파드는 하나도 생성되지 않습니다.

$ kubectl -n gang-demo get workloads -o wide
NAME                 QUEUE            RESERVED IN   ADMITTED   FINISHED   AGE
job-gang-job-216d1   conformance-lq                                       8s

$ kubectl -n gang-demo get pods -o wide
No resources found in gang-demo namespace.

# captured: 2026-07-02T02:24:14Z

4. 자원 확보 후 일괄 admit — 8개 파드 동시 생성

ClusterQueue 쿼터를 16 CPU로 확대하자 워크로드 전체가 한꺼번에 admit되어 8개 파드가 동시에 생성됩니다.

$ kubectl -n gang-demo get workloads -o wide
NAME                 QUEUE            RESERVED IN      ADMITTED   FINISHED   AGE
job-gang-job-216d1   conformance-lq   conformance-cq   True                  19s

$ kubectl -n gang-demo get pods -o wide
NAME             READY   STATUS              RESTARTS   AGE   IP       NODE    NOMINATED NODE   READINESS GATES
gang-job-5pqh5   0/1     ContainerCreating   0          9s    <none>   qcs05   <none>           <none>
gang-job-7f6nn   0/1     ContainerCreating   0          9s    <none>   qcs05   <none>           <none>
gang-job-cgzzq   0/1     ContainerCreating   0          9s    <none>   qcs03   <none>           <none>
gang-job-h4wx6   0/1     ContainerCreating   0          9s    <none>   qcs02   <none>           <none>
gang-job-sqdlt   0/1     ContainerCreating   0          9s    <none>   qcs02   <none>           <none>
gang-job-vj7xk   0/1     ContainerCreating   0          9s    <none>   qcs02   <none>           <none>
gang-job-xjnhg   0/1     ContainerCreating   0          9s    <none>   qcs04   <none>           <none>
gang-job-zd4bc   0/1     ContainerCreating   0          9s    <none>   qcs03   <none>           <none>

# captured: 2026-07-02T02:24:24Z

→ 자원 부족 시 파드 0개(부분 배치 차단), 자원 확보 시 8개 동시 생성 = all-or-nothing 스케줄링 증명. 시연 후 데모 리소스는 정리했습니다.

관련 링크