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

More efficient offers handling #5

Open
mlowicki opened this issue Sep 3, 2018 · 1 comment
Open

More efficient offers handling #5

mlowicki opened this issue Sep 3, 2018 · 1 comment

Comments

@mlowicki
Copy link
Owner

mlowicki commented Sep 3, 2018

With offers (order matters):

  • O1{mem: 100}
  • O2{mem: 1}

and jobs:

  • J1{mem: 1}
  • J2{mem: 100}

only 1st offer will be accepted (J1 will use it) but if O1 would be used for J2 and O2 for J1 then both can be accepted and two jobs would be running instead of only one.

@pradykaushik
Copy link

This translates to a fragmentation problem. It can potentially be solved by scoring each offer using the dot product between task requirements and offer resources (taking inspiration from Robert Grandl et. al. Multi-resource packing for cluster schedulers and Netflix's Fenzo Scheduler). The goal would be to choose the offer that would have the least residue of resource (across multiple dimensions).

This can be translated to picking the offer with the least dot product with the Job.

For the given example (assuming two offers with the same available CPU),
O1 {mem: 100, cpu: 1}
O2 {mem: 1, cpu: 1}
J1 {mem: 1, cpu: 1}
J2 {mem: 100, cpu: 1}

For Job J1
J1 . O1 = {1 * 100} + {1 * 1} = 101
J1 . O2 = {1 * 1} + {1 * 1} = 2

Offer selection for J1 - O2 would be selected as it best aligns with J1.
Remaining resources in offers is as shown below,
O1 {mem: 100, cpu: 1}
O2 {mem: 0, cpu: 0}

For Job J2
O2 does not satisfy the memory requirements and hence there is only one offer remaining i.e O1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants