Modify Eviction Strategy to take Priority into account #946
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, I introduced a number of possible methods for introducing priority: #846.
We came to agreement on using the strategy:
Only evict pods where usage > requests. Then sort by Function(priority, usage - requests)
This solution provides users with a clear path to avoiding evictions. It prevents abuse by high-priority pods by not allowing them to disrupt other pods that are below, or near their requests. Using a function provides a more nuanced approach to allowing pods to consume "unused" (not requested) memory on the node. Power users, or cluster administrators can determine how unused memory is allocated to pods by choosing priority levels for pods that are closer for more equal sharing of extra memory, or further apart to give better availability to higher priority pods. For pods that have equal priority, the function is equivalent to usage - requests, so that clusters that do not have priority enabled maintain behavior that is similar (though not exactly the same) as today's behavior.
This PR changes the eviction documentation to include this change in the eviction strategy, and removes outdated information on inode eviction.
@kubernetes/sig-node-proposals
@derekwaynecarr @vishh @dchen1107 @sjenning
@davidopp @bsalamat