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

[WIP] New resource #260

Closed
wants to merge 6 commits into from
Closed

[WIP] New resource #260

wants to merge 6 commits into from

Conversation

CMGS
Copy link
Contributor

@CMGS CMGS commented Nov 6, 2020

No description provided.

@CMGS CMGS changed the title New resource [WIP] New resource Nov 6, 2020
MemoryLimit int64

VolumeRequest VolumeBindings
VolumeLimit VolumeBindings
Copy link
Member

Choose a reason for hiding this comment

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

VolumePlan 是必需的, 就像上面的 CPU 对应 CPUQuota 一样.
这是因为 Resource 结构体同时也用来生成 engine type, 所以需要包含调度后的资源信息.
VolumeChanged 也是需要的, 这是用来告诉 engine 这次 realloc 是否有 volume 变化, 而“是否变化”这个信息只有 calcium 才能计算出来, 因为到 engine 的时候拿不到 old container meta 了

Copy link
Member

@jschwinger233 jschwinger233 Nov 6, 2020

Choose a reason for hiding this comment

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

VolumePlan 需要区分 request 和 limit, 而 CPUPlan 不需要, 这是因为 CPU limit 是通过 quota 传递给 engine, 而 volume limt 是通过改变 plan

@CMGS
Copy link
Contributor Author

CMGS commented Nov 7, 2020

只剩 realloc 实在改不动了……

所有的资源分为 2 个部分,

  1. ResourceOptions ---> 用于 create 和 realloc 中
  2. Resource1 ---> ResourceMeta ---> 用于 container,各种 message 等

其他修改有:

  1. 去掉了 Softlimit,原因是不管哪类资源 request > limit 的时候自然 limit 就是 request,只有硬限制
  2. 整合了资源回收和释放到 node
  3. 集中使用 GetNUMANode
  4. 修改了大量看得懂看不懂的命名
    ...

@CMGS CMGS requested review from tonicmuroq, anrs and nyanpassu November 7, 2020 16:58
@CMGS CMGS closed this Nov 9, 2020
@CMGS CMGS deleted the new_resource branch November 11, 2020 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants