-
Notifications
You must be signed in to change notification settings - Fork 4k
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
A new parameter for the management of the limits that the VPA assigns to the new Pod #7790
Comments
Hey @FabrizioCafolla, I'm not sure I understand your question correctly. In your VPA, you're using I also see you tried switching to
Did this not work as expected? If this doesn't do what you want, could you elaborate a bit on what you're expecting to happen? The configuration which you're proposing (a setting like |
@voelzmo The current logic is now clear to me (but I couldn't understand it very well from the documentation). Current state: VPA in Desired state: I want VPA in Example: As reported in the example #6996 (comment), I wanted the VPA to manage the I want the VPA to continue to manage For example, I would have set a Using the Again, I want the VPA to manage I hope I have expressed myself correctly, I know it is something very specific. Maybe I am missing something. |
Given that the VPA sets requests based on history, what should limits be based on? How should it be calculated? |
@adrianmoisey I am not saying that VPA needs to change the way it calculates limits. I am saying that I don't want the limits that are set (even if VPA thinks they are correct) to be greater than a certain threshold that I specify. Case 1
Case 2
Case 3
This is why I suggest a property that allows you to put a limit on the limit that the VPA will set, this is to have a precaution and be able to cover cases 2 and 3. Or if you already have a solution that I might be missing. |
Right, so I imagine that this is what would happen. At the moment the VPA maintains the input Pod's requests/limit ratio. Without this new feature:
With this new feature turned on, limiting memory limits to 5Gi:
Is that how you envision this to work? (As an aside, number 5 above is an edge case we need to think about too, since it may change the QoS class of a Pod: https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#guaranteed. I'm unsure if we would want to do that) |
Hey @FabrizioCafolla thanks for the quick response! case 3 is really something that VPA doesn't do. VPA cannot know the limits that you would want for your workload. Similar to what I mentioned above for case 2: If you know the upper boundary for your limit, then just set it in the workload directly. |
@adrianmoisey Yes, you get the point. This would be the behavior that I described in the question and that I think would be nice to have in VPA. @voelzmo I see your point. Imagine a production cluster with hundreds of applications deployed by different development teams, asking them to add the limits in the configuration would mean doing research on which limits are correct for each pod (plus the time to support updates in the code base would be longer). On the other hand, if I use VPA, it will tell me the correct limits based on the metrics. However, this is only valid if the condition I described in the problem is available since I do not want the limits to exceed a "maximum limit" (which would be wrong prior). I realize this is a borderline case, but as mentioned above, it would be nice to have this feature ✌️ Anyway, it doesn't make sense to me that with the max request of |
What you are describing is not possible. CPU and memory limits are properties which are not depending on the resource utilization. It describes the maximum amount of resources which your workload would ever be able to consume, no matter how much free capacity there is on a node. No machine can set those for you. For example:
Last but not least, you're mentioning that you want to introduce a property that is an upper bound for the limits. My take here is: if someone in your company can find a value for this upper boundary, you don't need an algorithm which increases the actual limits step-by-step towards this upper boundary. What would this be useful for? Limits are not used by the scheduler to determine the free capacity on a node (as I elaborated in #6996 (comment)), so I don't see a reason why you would want your limits to "start small". The person or program which would set this upper boundary can just set the actual limit on the workload, this is the same thing. Does this make sense? |
/close please re-open if you feel I didn't cover the situation correctly and we still need to change something in the API. |
@voelzmo: Closing this issue. In response to this:
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-sigs/prow repository. |
Which component are you using?:
/area vertical-pod-autoscaler
Is your feature request designed to solve a problem? If so describe the problem this feature should solve.:
I am having problems with the
resources.limit
described in issue #6996CPU > minAllowed && CPU < maxAllowed
andMemory > minAllowed && Memory < maxAllowed
CPU <= maxAllowed
andMemory <= maxAllowed
I also expected the
maxAllowed
option to set theresources.limit
, but it seems to only apply toresources.requests
. This causes the pod to potentially use too many resources (which I don't want). See more details described in the issueDescribe the solution you'd like.:
I want to be able to handle new limits on the Pod.
Because with the
controlledValues: RequestsAndLimits
option makes the VPA set limits beyond themaxAllowed
, while this is expected behavior, it is too risky and uncontrollable because the limits the VPA sets run the risk of causing the pod to use many more resources than expected by saturating the nodes.Describe any alternative solutions you've considered.:
Can we think of a new option for the
ContainerResourcePolicy
configuration, such as addingmaxLimitAllowed
? This would allow setting a ceiling limit on the pod's resources.Additional context.:
Originally posted by @FabrizioCafolla in #6996
The text was updated successfully, but these errors were encountered: