yangwwei edited a comment on issue #89: Core allocation/reservation logic renovation URL: https://github.com/apache/incubator-yunikorn-core/pull/89#issuecomment-585361646 ### 1. reserve node condition The other thing is, when we score nodes while attempting to reserve resources, we need to make sure the candidate node satisfies the following condition - the node fits the predicates (second thought: this might be tricky because predicate also checks the available resource, which gets conflict with "reservation"... but we want rest of predicates can be executed...) - the node has not been reserved - the node is scheduable right now the score is calculated based on resource only, that will lead the issue that reserve resources on a node that might not have a certain label to satisfy a node-selector, or against a affinity/anti-affinity constraint. which is an invalid reservation. ### 2 score in `scheduling_application.go`, `tryNodes` ``` score := ask.AllocatedResource.FitInScore(node.getAvailableResource()) ``` I think my previous comment in #81 still applies: Currently, the score only is calculated based on resourceInShort/totalAsk, but I think it makes more sense to use formula resourceInShort/nodeTotalResource. Because when a node has more total resources available, it usually means the node has more chance to release more resources than smaller nodes. For example, let's say we have an ask {memory: 50}, node A has available {availableMemory: 10, totalMemory: 100}; node B has {availableMemory: 10, totalMemory: 200}. Using current scorer, both nodes get score=1; but use proposed formula, scoreA=0.4, scoreB=0.2. which means B is a better fit.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
