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

Configurable minimum memory for all workloads #7280

Closed
mwarkentin opened this issue Sep 13, 2024 · 6 comments
Closed

Configurable minimum memory for all workloads #7280

mwarkentin opened this issue Sep 13, 2024 · 6 comments
Assignees
Labels
area/vertical-pod-autoscaler kind/feature Categorizes issue or PR as related to a new feature.

Comments

@mwarkentin
Copy link

Which component are you using?:

VerticalPodAutoscaler

Is your feature request designed to solve a problem? If so describe the problem this feature should solve.:

We recently enabled VPA on some workloads - one of the containers (pgbouncer) has extremely low memory usage (1-3Mi).

image

VPA set memory request and limit to ~3Mi as expected, however our containers started to crash, and were not resolved by VPAs OOM handling.

We saw errors like the following: Error: failed to start containerd task "pgbouncer": cannot start a stopped process: unknown

I am wondering if the containers running on GKE require a certain minimum amount of memory in order to start at all, based on some of these references to similar errors that I found:

Describe the solution you'd like.:

If that's the case, it would be nice if I could enforce a hard minimum (maybe 10Mi) across all of my VPAs, which container resources would not be set below, even if the container policy set a minimum of 1Mi

Describe any alternative solutions you've considered.:

Right now, my approach will be to require setting a container policy for every container, and trying to enforce that they always have a value of 10Mi or higher everywhere.

Additional context.:

@mwarkentin mwarkentin added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 13, 2024
@kaiiyvwu
Copy link

I think you can add a extra arg --pod-recommendation-min-memory-mb={Int} on vpa-recommender args

@adrianmoisey
Copy link
Member

/area vertical-pod-autoscaler

@adrianmoisey
Copy link
Member

That is correct, you can set a minimum:
https://github.com/kubernetes/autoscaler/blob/vertical-pod-autoscaler-1.2.1/vertical-pod-autoscaler/pkg/recommender/logic/recommender.go#L30

Interestingly, the default is 250MiB, which is strange that you got such a low value.

/assign

@mwarkentin
Copy link
Author

I'm using the GKE VPA, so I'm guessing this is something I'll need to take up with support there.

Thanks for the pointers, if you'd like this can be closed.

@adrianmoisey
Copy link
Member

@mwarkentin
Copy link
Author

Thanks, I think that confirms this is an issue with GKE VPA only!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vertical-pod-autoscaler kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants