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

add elastic scheduler design doc #1887

Merged
merged 1 commit into from Dec 14, 2021

Conversation

qiankunli
Copy link
Contributor

design doc for #1884

@volcano-sh-bot volcano-sh-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 6, 2021
@k82cn k82cn mentioned this pull request Dec 7, 2021
2 tasks
@qiankunli
Copy link
Contributor Author

qiankunli commented Dec 7, 2021

关于优先级这块有一个小细节,机器学习训练job下的pod通常分为master(仅有一个,也可以视为index=0 worker)和worker两种角色,引入弹性机制之后,希望能:优先创建master,删除elastic pod时优先删除worker。

大的思路有两种

  1. master/worker 区分label。 需要operator 和 volcano 约定一个label
  2. master/worker 设置不同的Priority。

关于Priority 有一个比较麻烦的地方,设置pod.Priority 必须通过PriorityClass 来进行,这个对上游的operator 就不太友好了:这个PriorityClass是用户来创建 还是operator 来创建?前者不方便,后者operator太麻烦。为此,有以下几种方法干预task.Priority

  1. kubeflow operator 为每个pod 加一个label training.kubeflow.org/replica-index,这个值用来计算优先级。不过这个label对volcano 不太通用
  2. kubeflow 任务的命名规则是 job-name-worker-${index} ,可以比较task优先级时使用name作为依据。目前volcano 在判断task优先级依次根据:pod.priority pod.creationTimestamp 和 pod.uid,可以将uid 改为pod.name
  3. operator 和 volcano 可以约定一个新的label ,比如 volcano.sh/task-priority 用来传递task 优先级
    @william-wang @Thor-wl

@k82cn
Copy link
Member

k82cn commented Dec 8, 2021

LGTM overall :)

@Thor-wl
Copy link
Member

Thor-wl commented Dec 8, 2021

/lgtm overall.
Thanks for your contribution. This feature is meaningful.Please format the doc and fix some syntax error

@Thor-wl
Copy link
Member

Thor-wl commented Dec 8, 2021

  1. master/worker 区分label。 需要operator 和 volcano 约定一个label

Perhaps we can submit this design to kubeflow community.

@Thor-wl
Copy link
Member

Thor-wl commented Dec 8, 2021

All these design are based on operator users. How about users makeing use of vcjob directly?

@qiaqiatic
Copy link

关于优先级这块有一个小细节,机器学习训练job下的pod通常分为master(仅有一个,也可以视为index=0 worker)和worker两种角色,引入弹性机制之后,希望能:优先创建master,删除elastic pod时优先删除worker。

大的思路有两种

  1. master/worker 区分label。 需要operator 和 volcano 约定一个label
  2. master/worker 设置不同的Priority。

关于Priority 有一个比较麻烦的地方,设置pod.Priority 必须通过PriorityClass 来进行,这个对上游的operator 就不太友好了:这个PriorityClass是用户来创建 还是operator 来创建?前者不方便,后者operator太麻烦。为此,有以下几种方法干预task.Priority

  1. kubeflow operator 为每个pod 加一个label training.kubeflow.org/replica-index,这个值用来计算优先级。不过这个label对volcano 不太通用
  2. kubeflow 任务的命名规则是 job-name-worker-${index} ,可以比较task优先级时使用name作为依据。目前volcano 在判断task优先级依次根据:pod.priority pod.creationTimestamp 和 pod.uid,可以将uid 改为pod.name
  3. operator 和 volcano 可以约定一个新的label ,比如 volcano.sh/task-priority 用来传递task 优先级
    @william-wang @Thor-wl

Hi @qiankunli ,

Thanks for this great work. I think this is a great contribution that might benefit Volcano users globally. We will really appreciate if we can try communicating in english.

Copy link
Member

@shinytang6 shinytang6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest lgtm )

![](images/elastic-scheduler-job1-3.png)

2. Allocate action(already implemented)
- Create minAvailable pods(all job) first and then create elastic pods if there are free resources.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description here is slightly inaccurate. All pods will be created initially, but minAvailable pods will be scheduled first and then schedule elastic pods if there are free resources.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is more accurate, I have changed the doc

Signed-off-by: bert.li <qiankun.li@qq.com>

update design doc of elastic-scheduler

Signed-off-by: Chenxi Jiang <chenxi.jiang.seu@gmail.com>

fix some words

Signed-off-by: bert.li <qiankun.li@qq.com>

fix word

Signed-off-by: bert.li <qiankun.li@qq.com>
@k82cn
Copy link
Member

k82cn commented Dec 14, 2021

/approve

@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: k82cn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 14, 2021
@Thor-wl
Copy link
Member

Thor-wl commented Dec 14, 2021

/lgtm

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 14, 2021
@volcano-sh-bot volcano-sh-bot merged commit 8da23a2 into volcano-sh:master Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. retest-not-required-docs-only size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants