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

[proposal] CPUSet injections to container runtime for fine-grained CPU orchestration #233

Closed
2 tasks done
Tracked by #96 ...
zwzhang0107 opened this issue Jun 8, 2022 · 4 comments
Closed
2 tasks done
Tracked by #96 ...
Assignees
Labels
area/koordlet kind/proposal Create a report to help us improve
Milestone

Comments

@zwzhang0107
Copy link
Contributor

zwzhang0107 commented Jun 8, 2022

What is your proposal:
Setting cgroup/cpuset parameters for containers by pod QoS.

Why is this needed:
fine-grained CPU orchestration is supported by koord-scheduler, koordlet should apply the scheduling result to cgroup paramters. See #96 for more details.

Is there a suggested solution, if so, please add it:
rules of cpuset:

  • LSE/LSR: follow the scheduling result field cpuset from the annotation scheduler.koordinator.sh/alloc-status of pod.
  • LS: follow the scheduling result field numaNode or numaSocketfrom the annotation scheduler.koordinator.sh/alloc-status of pod if specified. Or using all cpu share pool if not.
  • BE: set as be-cpu-share-pool
  • cgroup cpuset should be updated once the alloc-status or share-pool update.

cpuset injections should be implemented as a plugin of runtime hooks; here are two kinds of container injections.

  • create: parse cpuset from alloc-status or share-pool, should be injected by the interceptor of plugin.
  • update: alloc-status updated or share-pool info update, this will trigger the update of statesinformer, plugin will be executed as a callback. this always happens if LSR/LSE pod rebinds, other share-pool updates due to the pod created/destroyed.

using cri request to modify cpuset is better

for origin k8s pods(without koord-QoS):
Guaranteed(without static): treat as LS.
Guaranteed(with static): follow the rules from /var/lib/kubelet/cpu_manager_state if present. Or treat as LS if not present.
Burstable: treat as LS.
Besteffort: treat as BE.

@zwzhang0107 zwzhang0107 added the kind/proposal Create a report to help us improve label Jun 8, 2022
@zwzhang0107
Copy link
Contributor Author

/assign zwzhang0107

@zwzhang0107
Copy link
Contributor Author

/area koordlet

@jasonliu747
Copy link
Member

/close

@koordinator-bot
Copy link

@jasonliu747: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jasonliu747 jasonliu747 modified the milestones: someday, v0.7 Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/koordlet kind/proposal Create a report to help us improve
Projects
None yet
Development

No branches or pull requests

2 participants