forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 1
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
[FG:InPlacePodVerticalScaling] A proposal for CPU allocated strategy when Pod scale up and down #8
Closed
Chunxia202410
wants to merge
12
commits into
Nordix:esotsal/policy_static
from
Chunxia202410:CPUs_Update_Strategy
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cb0c2f9
to
c3cdfa2
Compare
c3cdfa2
to
dd29062
Compare
dd29062
to
407dde3
Compare
b9e6355
to
8c3741d
Compare
Thanks @Chunxia202410 for the proposal, can you please update PR using kubernetes#129719 as base ? Thanks |
Yes~ |
This PR is replaced by esotsal#3 |
Thanks ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind cleanup
This PR is based on the kubernetes#123319.
What this PR does / why we need it:
When Guaranteed QoS Class Pod scale up and down with Static CPU management policy alongside InPlacePodVerticalScaling, the allocated CPU should meet the kubernetes CPUs allocation rules.
For scaling up, keep the original CPUs, and only allocate the additional number of CPUs. when allocate additional CPUs, it is necessary to ensure that the combination of the original CPUs and the additional CPUs complies with the Kubernetes CPU allocation rules.
![image](https://private-user-images.githubusercontent.com/184625384/384795545-40dbd505-bb65-4df1-a6f8-21dcd4755ce0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3ODMwMDMsIm5iZiI6MTczOTc4MjcwMywicGF0aCI6Ii8xODQ2MjUzODQvMzg0Nzk1NTQ1LTQwZGJkNTA1LWJiNjUtNGRmMS1hNmY4LTIxZGNkNDc1NWNlMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxN1QwODU4MjNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kNDAxNDIyZDQ2MDU1ODU4ZDQzZjEzMjdmNTk1OWFkMzNmN2QwMDkyYzliMzYxZGU5NjlkZDdhZDVkZjk1ZTgxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.0-xOhbLuzCzQkILcag7tQLvQffyr42N5lB0MKf-U6eE)
For takeByTopologyNUMAPacked:
For example:
Assuming the CPU topology is as follows, and kubernetes CPUs allocation rules is Packed(takeByTopologyNUMAPacked):
Allocated CPUs of Pod0 is {2,3}, Allocated CPUs of Pod1 is {13}. Other CPUs are free.
-When scale up of Pod 1 from 1 CPU to 2 CPUs. ==> CPU {12} should to be allocated to Pod1, so CPUset of Pod1 is {12,13}
-When scale up of Pod 1 from 1 CPU to 4 CPUs. ==> CPU {12,14,15} should to be allocated to Pod1, so CPUset of Pod1 is {12,13,14,15}
-When scale up of Pod 1 from 1 CPU to 8 CPUs. ==> CPU {8-12,14,15} should to be allocated to Pod1, so CPUset of Pod1 is {8-15}
For scaling down, if there are mustKeepCPUsForResize, when allocate remained CPUs, it is necessary to ensure that the combination of the mustKeepCPUsForResize CPUs and the allocated remained CPUs complies with the Kubernetes CPU allocation rules.
Which issue(s) this PR fixes:
The step as follows for allocate additional CPUs when scale up with CPU allocated packet(takeByTopologyNUMAPacked) rule, and assume that the NUMA nodes are higher than Sockets in the memory hierarchy.
For takeByTopologyNUMADistributed:
The allocated should be a subset of the combo. and the number of allocated CPU is not more than distribute number.
Special notes for your reviewer:
UncoreCaches need to be considerd
Does this PR introduce a user-facing change?
NONE