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

Allow setting 'minimum headroom' for autoscaling #148

Closed
yuvipanda opened this issue Jun 29, 2017 · 19 comments
Closed

Allow setting 'minimum headroom' for autoscaling #148

yuvipanda opened this issue Jun 29, 2017 · 19 comments
Labels
area/cluster-autoscaler kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@yuvipanda
Copy link

I want to be able to say 'if the cluster is more than X% full, scale up until it is not'. This is important in super dynamic clusters that are very spiky - we run a Kubernetes cluster for a University, and a large spike of pods start up when classes start. If we waited for them to fail Scheduling before adding more nodes, this provides them with a suboptimal experience (since it might take several minutes for a new node to spin up).

One problem would be defining what 'full' is, in a way that doesn't duplicate what's in the scheduler.

@davidopp
Copy link
Member

We also got this request from a GKE customer recently. So there are at least two people who want it. :)

@yuvipanda
Copy link
Author

I also want this on GKE :D

@mwielgus
Copy link
Contributor

We are working on this #77.

@yuvipanda
Copy link
Author

yuvipanda commented Jun 30, 2017 via email

@davidopp
Copy link
Member

A nice complement to this feature would be a way to pre-pull images to the headroom nodes so that a pending pod pays neither the node creation overhead (headroom feature) nor the image pull overhead (pre-pull feature) and can start running right away. We'd need to figure out a way the cluster admin or user specify which images should be pre-pulled where.

@jonastl
Copy link

jonastl commented Aug 7, 2017

This. Together with making the scaling a parallel operation would solve our problem.
Waiting for 50-100 new machines to boot and install the backplane software takes forever, since scaling up is a serial operation (takes 160 seconds per node exactly on GKE)

@MaciekPytel
Copy link
Contributor

@jonastl Which version of CA are you using? Scaling up shouldn't be serial - CA estimates how many nodes are required and adds them in a single request. And it only waits for request to come back, not for nodes to actually start.

@MaciekPytel
Copy link
Contributor

Sorry, just realised you mentioned GKE - in this case I mean what cluster version are you using (as CA is bundled with cluster version on GKE).

@jonastl
Copy link

jonastl commented Aug 8, 2017

@MaciekPytel Version 1.6.7

@MaciekPytel
Copy link
Contributor

@jonastl In that case it definitely shouldn't be serial. That being said your comment #77 (review) suggest you're using a very unusual setup, so perhaps there is a bug somewhere that only manifests for your setup.

It may be worth creating a new issue for that with some information about your setup (cluster version, cluster size, number of pods and description of how they're scheduled). Alternatively we can have a chat on kubernetes slack and see if there is something we can figure out quickly.

@jonastl
Copy link

jonastl commented Aug 25, 2017

@MaciekPytel, it turned out that when we enabled resource constraints (CPU and memory) to a degree that filled a node group member, then scaling speed was much improved, so my remark above about serial scaling can be scratched with this new insight.

The solution was non-obvious to us, but now that we've found out about the scalers behavior with the expected (undocumented) knobs turned, we're happy with the scaling speed.

@davidopp
Copy link
Member

Is there an ETA on this?

@mwielgus
Copy link
Contributor

Next K8S release (1.9). In 1.8 we were busy improving the performance of the current functionality and this feature makes all the computations much more complex.

@yuvipanda
Copy link
Author

Is someone working on this for 1.9?

@yuvipanda
Copy link
Author

After some thinking, I've come up with a scheme (for GKE) involving two nodepools that'll satisfy our use cases, and have written it up at berkeley-dsep-infra/data8xhub#7. If anyone with more knowledge of the autoscaler can take a look at that and lmk how terrible the idea is, I would highly appreciate it.

@choldgraf
Copy link

Any movement on this? It would be quite useful for ensuring we don't hit ceiling effects before new nodes are requested!

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 23, 2018
@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. and removed enhancement labels Jun 5, 2018
@yuvipanda
Copy link
Author

Any idea how we can help get this moving? :)

@aleksandra-malinowska
Copy link
Contributor

This can be achieved using pod priority and preemption, see (How can I configure overprovisioning with Cluster Autoscaler?)[https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#how-can-i-configure-overprovisioning-with-cluster-autoscaler]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cluster-autoscaler kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

9 participants