Comments (3)
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.
from flux-accounting.
A could of things from our slack:
@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)
from flux-accounting.
Interesting. We should probably think through... whether this will allow us to keep the intitial faireshare values as much as possible.
from flux-accounting.
Related Issues (20)
- bindings: change behavior of bindings to raise error to caller HOT 1
- repo: add systemd unit file to repository HOT 4
- can't change uid for users in flux accounting db HOT 3
- no '-t', '--tree' option in view-bank in flux-accounting 0.22 HOT 1
- flux-accounting service: need a way to configure permissions for `flux account` commands HOT 8
- test suite: replace "flux mini" usage HOT 1
- user access to queues persists after being removed in DB HOT 2
- users still prevented from submitting to queue after it has been removed HOT 4
- avoid jobs getting stuck in PRIORITY state HOT 1
- systemd: use `BindTo=flux.service` instead of `Requires=flux.service` HOT 2
- `view-user`: formatting of command output needs improvement HOT 1
- reject jobs from users with no bank HOT 4
- limits: add max-nodes limit support HOT 13
- flux-accounting: job usage reporting by project HOT 2
- flux-accounting: give users access to bank info, priority calculation, etc. HOT 5
- usage: collate user/project usage for reporting
- job usage: archive long term job records in the accounting db HOT 4
- job-archive-interface: clean up which data is fetched for job-usage calculation HOT 1
- flux-accounting job-archive: implement purge of old jobs
- flux-accounting: job archival tracking
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flux-accounting.