Coder Social home page Coder Social logo

Comments (15)

aveshagarwal avatar aveshagarwal commented on July 19, 2024 2

@mossuchida descheduler follows what kube-scheduler does. As kube-scheduler works based on pods requests, descheduler also works based on pods requests. IMO, making descheduler work on real time utilization (like kubectl top) without kube-scheduler working on real time usage might lead to mismatch how pods are evicted by descheduler and then how replacement pods are scheduled by kube-scheduler.

But as soon as kube-scheduler starts supporting real time usage, descheduler would start that too.

from descheduler.

InAnimaTe avatar InAnimaTe commented on July 19, 2024 1

Thanks for clearing that up. Really, that's the best you can do. I kind of just assumed otherwise since I really have a usecase for something that can help when we have so many services which don't have resources defined.

Honestly, it might really be worth describing this fact out in the README so its abundantly clear.

from descheduler.

AndresPineros avatar AndresPineros commented on July 19, 2024

I don't understand why is the descheduler using the "requests". For me the idea of the descheduler was to balance the cluster when the requests where not properly assigned, for example, a service wasn't expected to consume 5Gi of RAM and a limit wasn't set for it. Balancing using the requests is already done by the Kubernetes scheduler, right?

Without real-time the descheduler only tries to fill empty nodes, it doesn't try to save loaded nodes that are about to die due to resources.

from descheduler.

aveshagarwal avatar aveshagarwal commented on July 19, 2024

I don't understand why is the descheduler using the "requests". For me the idea of the descheduler was to balance the cluster when the requests where not properly assigned, for example, a service wasn't expected to consume 5Gi of RAM and a limit wasn't set for it.

Descheduler only evicts pods but kube-scheduler does the actual scheduling of replacement pods. So if Descheduler acted based on anything other than requests, it would lead to mismatch between Descheduler and kube-scheduler as kube-scheduler would still schedule based on requests.

Balancing using the requests is already done by the Kubernetes scheduler, right?

kube-scheduler tries to balance only at the admission time for incoming pods, it does not rebalance already admitted pods.

Without real-time the descheduler only tries to fill empty nodes, it doesn't try to save loaded nodes that are about to die due to resources.

No, descheduler does both as far as cluster has capacity. It tries to move pods from loaded nodes to less loaded nodes.

from descheduler.

 avatar commented on July 19, 2024

I don't understand why is the descheduler using the "requests". For me the idea of the descheduler was to balance the cluster when the requests where not properly assigned, for example, a service wasn't expected to consume 5Gi of RAM and a limit wasn't set for it.

Descheduler only evicts pods but kube-scheduler does the actual scheduling of replacement pods. So if Descheduler acted based on anything other than requests, it would lead to mismatch between Descheduler and kube-scheduler as kube-scheduler would still schedule based on requests.

Balancing using the requests is already done by the Kubernetes scheduler, right?

kube-scheduler tries to balance only at the admission time for incoming pods, it does not rebalance already admitted pods.

Without real-time the descheduler only tries to fill empty nodes, it doesn't try to save loaded nodes that are about to die due to resources.

No, descheduler does both as far as cluster has capacity. It tries to move pods from loaded nodes to less loaded nodes.

@aveshagarwal - I am reading the Rescheduler-Design-Implementation (https://docs.google.com/document/d/1KXw02Q0cOF1MUrdpPNiug0yGZlixvPg2SwBycrT5DkE/edit) and saw it should support also the HighNodeUtilization option.

Per your above answer i understand that the descheduler should avict pods from nodes that reached high thresholds.

This is what i am trying to achieve but cannot seem to get that to work :(

Any idea how does a policy that balances HighNodeUtilization nodes should be defined ?

Thank you

Roiy

from descheduler.

AndresPineros avatar AndresPineros commented on July 19, 2024

@tmwtp Hey, I think I found what we were looking for:
https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/
https://docs.okd.io/latest/admin_guide/out_of_resource_handling.html

Some arguments in the Kubelet actually allow to evict pods from nodes under pressure. Mixing this with the descheduler (they way it works right now, not with real time resources) seems like a great combo.

Pay attention to the best practices and caveats:
https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/#best-practices
https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/#known-issues

This one from Kops but has relevant information for any K8s cluster:
https://github.com/kubernetes/kops/blob/master/docs/node_resource_handling.md

At this point, the descheduler WILL NOT realize if pods are using more memory that their requests, and are about to kill the Node. But it doesn't matter because it is a Kubernetes native feature.

from descheduler.

fejta-bot avatar fejta-bot commented on July 19, 2024

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

from descheduler.

InAnimaTe avatar InAnimaTe commented on July 19, 2024

Can someone clear this up for me then? So Descheduler literally does nothing for real node metrics, only acting on container resource.requests? So if I don't have any resources defined for my deployments, Descheduler won't help me in any way?

A little disheartening to be honest.

from descheduler.

aveshagarwal avatar aveshagarwal commented on July 19, 2024

Can someone clear this up for me then? So Descheduler literally does nothing for real node metrics, only acting on container resource.requests? So if I don't have any resources defined for my deployments, Descheduler won't help me in any way?

Kubernetes's core/default scheduler does scheduling based on resource.requests, and Descheduler follows it.

from descheduler.

fejta-bot avatar fejta-bot commented on July 19, 2024

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

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 rotten

from descheduler.

sidharthsurana avatar sidharthsurana commented on July 19, 2024

/remove-lifecycle rotten

Is there any near term plans to add this support?

from descheduler.

fejta-bot avatar fejta-bot commented on July 19, 2024

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

from descheduler.

fejta-bot avatar fejta-bot commented on July 19, 2024

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

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 rotten

from descheduler.

fejta-bot avatar fejta-bot commented on July 19, 2024

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

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

from descheduler.

k8s-ci-robot avatar k8s-ci-robot commented on July 19, 2024

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/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.

from descheduler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.