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

elastic quota 弹性抢占疑问[question] #2125

Open
zj619 opened this issue Jul 4, 2024 · 1 comment
Open

elastic quota 弹性抢占疑问[question] #2125

zj619 opened this issue Jul 4, 2024 · 1 comment
Labels
area/koord-scheduler kind/question Support request or question relating to Koordinator

Comments

@zj619
Copy link

zj619 commented Jul 4, 2024

What happened:
kubectl create ns namespace1
kubectl create ns namespace2
相关配置
image
创建队列
image
队列配置文件如下
root.yml
apiVersion: scheduling.sigs.k8s.io/v1alpha1
kind: ElasticQuota
metadata:
name: root
labels:
quota.scheduling.koordinator.sh/is-parent: "true"
quota.scheduling.koordinator.sh/allow-lent-resource: "true"
spec:
max:
cpu: 2
memory: 2Gi
min:
cpu: 2
memory: 2Gi

queue-a.yml
apiVersion: scheduling.sigs.k8s.io/v1alpha1
kind: ElasticQuota
metadata:
name: a
namespace: namespace1
labels:
quota.scheduling.koordinator.sh/parent: "root"
quota.scheduling.koordinator.sh/is-parent: "false"
quota.scheduling.koordinator.sh/allow-lent-resource: "true"
annotations:
quota.scheduling.koordinator.sh/shared-weight: '{"cpu":"1","memory":"1Gi"}'
spec:
max:
cpu: 2
memory: 2Gi
min:
cpu: 1
memory: 1Gi

queue-b.yaml
apiVersion: scheduling.sigs.k8s.io/v1alpha1
kind: ElasticQuota
metadata:
name: b
namespace: namespace2
labels:
quota.scheduling.koordinator.sh/parent: "root"
quota.scheduling.koordinator.sh/is-parent: "false"
quota.scheduling.koordinator.sh/allow-lent-resource: "true"
annotations:
quota.scheduling.koordinator.sh/shared-weight: '{"cpu":"1","memory":"1Gi"}'
spec:
max:
cpu: 2
memory: 2Gi
min:
cpu: 1
memory: 1Gi

先运行pod-a.yaml,qos等级为BE
apiVersion: v1
kind: Pod
metadata:
name: pod-a
namespace: namespace1
labels:
quota.scheduling.koordinator.sh/name: "a"
koordinator.sh/qosClass: BE #qos
spec:
schedulerName: koord-scheduler
priorityClassName: koord-batch
containers:

  • command:
    • sleep
    • 365d
      image: kde1:8025/warehouse/nginx
      imagePullPolicy: IfNotPresent
      name: curlimage
      resources:
      limits:
      cpu: 1
      memory: 1Gi
      requests:
      cpu: 1
      memory: 1Gi
      terminationMessagePath: /dev/termination-log
      terminationMessagePolicy: File
      restartPolicy: Always

再次运行pod-d.yaml,qos等级为LSE
apiVersion: v1
kind: Pod
metadata:
name: pod-d
namespace: namespace2
labels:
quota.scheduling.koordinator.sh/name: "b"
koordinator.sh/qosClass: "LSE"
spec:
schedulerName: koord-scheduler
priorityClassName: koord-prod
containers:

  • command:
    • sleep
    • 365d
      image: kde1:8025/warehouse/nginx
      imagePullPolicy: IfNotPresent
      name: curlimage
      resources:
      limits:
      cpu: 1
      memory: 1Gi
      requests:
      cpu: 1
      memory: 1Gi
      terminationMessagePath: /dev/termination-log
      terminationMessagePolicy: File
      restartPolicy: Always

结果如下,pod-a和pod-d都running
image

再运行一个qos等级为LSE的pod-e,不能抢占pod-a的资源
image

pod-e.yaml
apiVersion: v1
kind: Pod
metadata:
name: pod-e
namespace: namespace2
labels:
quota.scheduling.koordinator.sh/name: "b"
koordinator.sh/qosClass: "LSE"
spec:
schedulerName: koord-scheduler
priorityClassName: koord-prod
containers:

  • command:
    • sleep
    • 365d
      image: kde1:8025/warehouse/nginx
      imagePullPolicy: IfNotPresent
      name: curlimage
      resources:
      limits:
      cpu: 1
      memory: 1Gi
      requests:
      cpu: 1
      memory: 1Gi
      terminationMessagePath: /dev/termination-log
      terminationMessagePolicy: File
      restartPolicy: Always

为什么pod-e不会抢占pod-a的资源
~

What you expected to happen:

Environment:

  • Koordinator version: - v1.5.0
  • Kubernetes version (use kubectl version): v1.22.5
  • docker/containerd version: containerd 1.5.0
  • OS (e.g: cat /etc/os-release): Ubuntu 20.04.4 LTS
  • Kernel (e.g. uname -a): Linux 5.10.112-11.al8.x86_64 ✨ Add NodeMetric API #1 SMP Tue May 24 16:05:50 CST 2022 x86_64 x86_64 x86_64 GNU/Linux

Anything else we need to know:

@zj619 zj619 added the kind/question Support request or question relating to Koordinator label Jul 4, 2024
@saintube
Copy link
Member

saintube commented Jul 4, 2024

PTAL @shaloulcy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/koord-scheduler kind/question Support request or question relating to Koordinator
Projects
None yet
Development

No branches or pull requests

2 participants