Presentation is loading. Please wait.

Presentation is loading. Please wait.

IIS Progress Report 2016/01/18.

Similar presentations


Presentation on theme: "IIS Progress Report 2016/01/18."— Presentation transcript:

1 IIS Progress Report 2016/01/18

2 Goal Propose an energy-efficient scheduler that minimize the power consumption while providing sufficient computing resources in order to meet the expected throughput of each virtual core. Amount of workloads in a time period.

3 Model - Cores Assume n virtual cores, m physical cores.
For every time period Virtual core i has expected throughput/ workload wi, wi ∈ W. Physical core j with frequency fj, fj ∈ F F: a set of available frequencies on the core.

4 Model – Power Consumption
The power consumption P of core j is a function of fj and its load Lj. Lj = (the amount of workload on j) / fj. With given fj, P is linear to Lj. We write P as the following: m(fj): the gradient. cj: idle power

5 Objective Generate fj and a set of ai,j that where Constraints:

6 Re-write Objective Function
Dynamic power + static/idle power

7 Multiple Multi-objective Fractional Knapsack Problem
Each virtual core is a knapsack. Volume = 1, a weight requirement ω. Each physical core is a object Value = 1/m(f), Size = 1, and weight = f. Maximize the overall value, such that each knapsack contains at least ω weight.

8 Solution Two steps: Determine the frequency f of each core.
Decide the ai,j.

9 Determine the Frequency
m(fn)/fn : the dynamic power consumption per cycle. In real world CPUs, m(fn)/fn is a increasing function of fn. “Choose the frequencies evenly among every cores is more energy-efficient.”

10 Selecting Frequencies
“Choose the frequencies evenly among every cores is more energy-efficient.” However, simply choose doesn’t works. Some wi may be larger than f.

11 Our Method Decide the fj, j = 0 ~ m-1
First sort wi in descending order, and set f0 ~ fm-1 as w0 ~ wm-1. While ∑ wi > ∑ fj , increase the smallest fj by one level until the condition is violated.

12 Assigning Cores Start from the largest wi, assign it to the core with largest frequency fj with spare resource sj. sj : spare resource on core j If wi > sj, assign (wi - sj) to core j+1, which is the core with second largest frequency fj+1 with spare resource. An approximation algorithm.

13 ε -approximation Our method: Optimal:
fn: the n-th available frequency selection. f1 fx f1 fx

14 Core Assigning Result A set of ai,j: Core1 Core2 Core3 Core4 … vCPU1
0.9 vCPU2 0.1 0.7 vCPU3 0.3 0.4 vCPU4 0.5 vCPU5

15 Scheduling vCPUs Theoretically we can apply Open-Shop Scheduling Problem (OSSP) with preemption to generate a scheduling plan. However, scheduling plans generated this way may not be practical in real world. Do not consider interrupts, I/O delay … etc.

16 Energy Credit We transform ai,j into energy-credit of each virtual core i on physical core j. Executing a vCPU on a physical core consumes credits. Credits are re-filled every period of time. Schedule vCPUs according to their energy-credit.

17 Objective Each vCPU has a credit vector.
Each entry is the amount of remaining credits to a physical core. Minimize the remaining credits of all vCPU before the credit refilling.

18 Selecting vCPU for Execution
Each time a physical core becomes available, pick a vCPU with remaining credit for execution. Global run-queue v.s. per-core run-queue. Per-core run-queue Each core has a run-queue. A vCPU can only exist in one of the run-queue simultaneously. FIFO

19 Algorithm #1 For each core, keeps executing a vCPU until If 1.: Else:
1. An interrupt occurs 2. wait for I/O 3. the vCPU has no credit remains If 1.: Resume the vCPU after handling the interrupt. Else: Select the next vCPU with credit from the run-queue. If no available vCPU in run-queue: If 2: Idle else: Migrate a vCPU that has remaining credits of this core back.

20 Algorithm #2 For each core, keeps executing a vCPU until Else: If 1.:
1. An interrupt occurs 2. wait for I/O 3. the consecutive execution time of the vCPU exceeds t ms. If 1.: Resume the vCPU after handling the interrupt. Elif 2: Select the next vCPU with credit from the run-queue. If no available vCPU in run-queue: idle Else: Compute the expected waitng time.

21 Expected Waiting Time For each non-zero entry i of the credit vector of the vCPU: Compute the expected waiting time of the vCPU on core i. Simple way: n * t n: # of vCPUs with remaining credits in the run-queue. Migrate the vCPU to the core with least expected waiting time.

22 Observation Core1 Core2 Core3 Core4 vCPU1 0.9 vCPU2 0.1 0.7 vCPU3 0.3 0.4 vCPU4 0.5 vCPU5 Since a vCPU can have credits on at most two cores using our assigning method, the overhead of finding which core to migrate is small.

23 Simulation Generate workloads with I/O and interrupts.
The frequency and length follows some distributions. Compare the utilization, remaining credits and power consumption with other scheduling algorithms.

24 Some Comparing Algorithms
Credit-based OSSP with preemption Most Remaining Credit First

25 Discussion


Download ppt "IIS Progress Report 2016/01/18."

Similar presentations


Ads by Google