Improve traversal in scheduler

Bug #1554105 reported by Dima Shulyak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Solar
Fix Released
Medium
Dima Shulyak

Bug Description

Current implementation of traversal for tasks scheduling doesn't take into account amount of childs for each scheduled task.
Computing that information before build will allow to determine more efficient order of execution.

Example:
First path - [A] (only one task)
Second path - [B, C].

Task A and B should be executed on same node, and thus they are conflicting because of one-per node task limit, but executing B first
will allow to run A and C in paralell. Thus we need to make decision that B should be executed before A.

after building a graph, apply next algorithm to calculate weights of each node:
1. topologically sort reversed graph
2. for each successors update current_weight += 1 + current_weight
3. reverse one more time and return/save
4. before applying chain of rules - sort added tasks based on current_weight

In the end we will get recursive (includes weights of child) computation of weights for each task in graph

Dima Shulyak (dshulyak)
Changed in solar:
importance: Undecided → Medium
milestone: none → 0.3.0
assignee: nobody → Dima Shulyak (dshulyak)
assignee: Dima Shulyak (dshulyak) → Fuel Solar (fuel-solar-team)
status: New → Confirmed
description: updated
description: updated
Dima Shulyak (dshulyak)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to solar (master)

Fix proposed to branch: master
Review: https://review.openstack.org/295348

Changed in solar:
assignee: Fuel Solar (fuel-solar-team) → Dima Shulyak (dshulyak)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to solar (master)

Reviewed: https://review.openstack.org/295348
Committed: https://git.openstack.org/cgit/openstack/solar/commit/?id=e2cfa869d808c9c52d8b75bf63e05078f16feeeb
Submitter: Jenkins
Branch: master

commit e2cfa869d808c9c52d8b75bf63e05078f16feeeb
Author: Dmitry Shulyak <email address hidden>
Date: Mon Mar 21 17:08:31 2016 +0200

    Implement traversal based on number of childs

    By using childs weights for scheduling we can unlock
    concurrent and decrease total time of execution.

    As an example consider next variant:
    Tasks A and B can't run concurrently because of node-limit.
    Tasks A and C have logical dependency, and thus not concurrent.
    Tasks B and C will be executed on different nodes, and doesnt
    have any logical dependency.
    As A and B doesnt have parents we may schedule any of this task
    and logically execution will be correct, but in case if we will choose
    B total time of execution will be - B + A + C, BUT
    if we will select A - total time of execution may be reduced,
    and will take in total - A + max(B, C).

    Change-Id: I52a6c20e8c3d729ed20da822f45cbad90e51f2df
    Closes-Bug: 1554105

Changed in solar:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.