Skip to content
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.

Latest commit

 

History

History
37 lines (29 loc) · 2.52 KB

SchedulingPolicySwitching.md

File metadata and controls

37 lines (29 loc) · 2.52 KB

Scheduling Policy Switching

When scheduling the workload, Elektron can be made to switch between different scheduling policies in order to adapt to the variation in the workload and the changes in the state of the cluster.

Scheduling Policy Configuration File

A scheduling policy configuration (SPConfig) file needs to be provided that contains information regarding the scheduling policies that can be selected while switching and the distribution of tasks that they are appropriate to schedule (See schedPolConfig.json for reference).

{
    "bin-packing": {
        "taskDist": 10.0
    },
    "max-greedymins": {
        "taskDist": 6.667
    },
    "max-min": {
        "taskDist": 0.416
    },
    "first-fit": {
        "taskDist": 0.05
    }
}

Scheduling Policy Selector

The Scheduling Policy Selector is responsible for selecting the appropriate scheduling policy to schedule the next set of pending tasks.

It takes as input a Switching Criteria, the pending task queue and Mesos resource offers. The Scheduling Policy Selector is made up of the following components.

  • Resource Availability Tracker - Tracks the clusterwide availability of compute resources such as CPU and memory using Mesos resource offers.
  • Window Calculator - Determines the scheduling window based on the cluster resource availability and the set of pending tasks. This window constitutes the set of pending tasks that the next policy schedules.
  • Policy Selector - Based on the Switching Criteria, the policy selector selects the next appropriate scheduling policy. The default Switching Criteria is task distribution based. However, Elektron also supports round-robin based switching.
    • Task Distribution based switching - The tasks in the scheduling window are first classified (based on their estimated power consumption) into Low Power Consuming (Lpc) and High Power Consuming (Hpc). The distribution of tasks is then determined to be the ratio of the number of Lpc tasks and Hpc tasks. The Policy Selector then selects the scheduling policy that is most appropriate to schedule the determined distribution of tasks (using information in SPConfig file).
    • Round-Robin based switching - The Policy Selector selects the next scheduling policy based on a round-robin ordering. For this, the scheduling policies mentioned in SPConfig are stored in a non-increasing order of their corresponding task distribution.