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

Augmented libweighted tree that can only minimal fairshare value changes #69

Open
dongahn opened this issue Nov 7, 2020 · 3 comments
Open
Labels
idea An idea for a new feature or change

Comments

@dongahn
Copy link
Member

dongahn commented Nov 7, 2020

To further our ideas for minimum fairshare value update optimization: flux-framework/flux-core#3311 (comment)

@dongahn
Copy link
Member Author

dongahn commented Nov 7, 2020

A could of things from our slack:

@SteVwonder:

@dahn and @milroy: I went down a rabbit hole after the coffee time. Looks like there is a way to find the minimum number of swaps required to sort an array. https://stackoverflow.com/questions/2987605/minimum-number-of-swaps-needed-to-change-array-1-to-array-2
It involves calculating/leveraging the permutation cycle: https://mathworld.wolfram.com/PermutationCycle.html
I haven't fully grok'd it, but its something to maybe come back to later on down the road.

Cool thing is that the calculation is O(n*logn)

@dongahn
Copy link
Member Author

dongahn commented Nov 7, 2020

Interesting. We should probably think through... whether this will allow us to keep the intitial faireshare values as much as possible.

@dongahn
Copy link
Member Author

dongahn commented Nov 7, 2020

When I thought about this a bit after the coffee hour, one potential solution could be perhaps to use "longest increasing sequence". https://en.wikipedia.org/wiki/Longest_increasing_subsequence.
You sort the users based on the new shares/usages. But then, you identify the longest increasing sequence based on the previous fairshare values from the newly sorted vector and then reuse these old fairshare values.
For only those who are not in the LIS set are assigned to new fshare values in a way still to hold proper ordering with these reused fairshare values.
The LIS algorithm could be expensive and the complexity would also be high so I'm not sure if this is worthy it.

@cmoussa1 cmoussa1 added the idea An idea for a new feature or change label Aug 25, 2021
@cmoussa1 cmoussa1 changed the title [Idea] Augmented libweighted tree that can only minimal fairshare value changes Augmented libweighted tree that can only minimal fairshare value changes Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea An idea for a new feature or change
Projects
None yet
Development

No branches or pull requests

2 participants