The Hybrid Scheduling Framework for Virtual Machine Systems.

16
The Hybrid Scheduling Framework for Virtual Machine Systems

Transcript of The Hybrid Scheduling Framework for Virtual Machine Systems.

Page 1: The Hybrid Scheduling Framework for Virtual Machine Systems.

The Hybrid Scheduling Framework for Virtual Machine

Systems

Page 2: The Hybrid Scheduling Framework for Virtual Machine Systems.

Authors

• 翁楚良,男,博士,副教授。 • 2001 年进入上海交通大学计算机系学习,从事并

行与分布计算、集群计算与网格计算等研究工作。2004 年博士毕业留校工作。

• 研究兴趣涉及虚拟化技术、并行与分布计算、网格计算与集群计算、高性能计算、系统安全等。同时负责网格计算中心的 IBM P690 、 IBM e1350 集群、 Intel Itanium2 服务器等高性能计算机的系统管理和相关开发工作。

Page 3: The Hybrid Scheduling Framework for Virtual Machine Systems.

This team’s work

• Automatic Performance Tuning for the Virtualized Cluster System ---- ICDCS2009

Page 4: The Hybrid Scheduling Framework for Virtual Machine Systems.

The Problem

• The scheduling strategy in Xen (Asynchronous CPU scheduling strategy) may deteriorate the performance when the virtual machine is used to execute the concurrent applications such as parallel programs or multithreaded programs.

Page 5: The Hybrid Scheduling Framework for Virtual Machine Systems.

Why?

• All virtual CPUs in a SMP virtual machine are usually not online all the time, and possibly not online at the same time( 多线程程序需要相关所有 CPU 当前 online 才能继续运行 ), so the scheduling methods may deteriorate the performance.

Page 6: The Hybrid Scheduling Framework for Virtual Machine Systems.

Why?

pCPU pCPU

vCPU

VM

Guest App.

vCPU vCPU

Guest App.

VM

?PhysicalHardware

Page 7: The Hybrid Scheduling Framework for Virtual Machine Systems.

Why?

• In the worst case, all the VMs are suspended even in the condition of enough physical CPUs.

Just imagine 4 VMs have 2 vCPUs each on a 4-core platform.

Page 8: The Hybrid Scheduling Framework for Virtual Machine Systems.

Solution

• Recognize two types of virtual machines in the system:

– the high-throughput type -- default– the concurrent type -- when the majority of

its workload is concurrent applications

Page 9: The Hybrid Scheduling Framework for Virtual Machine Systems.

Solution

• When it is a concurrent VM, its virtual CPUs are mapped into physical CPUs synchronously ---- VM granularity schedule (Coscheduling)

• Otherwise its virtual CPUs are mapped asynchronously. ---- vCPU granularity schedule

Page 10: The Hybrid Scheduling Framework for Virtual Machine Systems.

Hybrid Schedule Framework

Page 11: The Hybrid Scheduling Framework for Virtual Machine Systems.

Design Key Notes

• To maximize the performance in the virtual machine system, the following design issues should be considered for the scheduler in the VMM.

– Fairness

– Workload Balancing

– Wasted CPU Time

– Adaptiveness

Page 12: The Hybrid Scheduling Framework for Virtual Machine Systems.

Xen Scheduler

• Three scheduling algorithms in Xen:– Borrowed Virtual Time (BVT)– Simple Earliest Deadline First (SEDF)– Credit Scheduling

Page 13: The Hybrid Scheduling Framework for Virtual Machine Systems.

Borrowed Virtual Time (BVT)

• Fair-share scheduling algorithm• Schedule the runnable VM with the small

est virtual time firstly• The client can effectively borrow virtual ti

me from its future CPU allocation.• Low latency support ---- for realtime and i

nteractive applications• Shortage : lack of the non work -conservi

ng (NWC) mode

Page 14: The Hybrid Scheduling Framework for Virtual Machine Systems.

Simple Earliest Deadline First (SEDF)

• The real time property is used to ensure time guarantees

• a VM will receive at least the slice specified by the VM in each period of the length specified by the VM.

• Can indicate whether the VM is eligible to receive extra CPU time (work-conserving mode).

Page 15: The Hybrid Scheduling Framework for Virtual Machine Systems.

Simple Earliest Deadline First (SEDF)

• Shortage:

• Lack of global workload balancing on multiprocessors

• The CPU fairness depends on the value of the period.

Page 16: The Hybrid Scheduling Framework for Virtual Machine Systems.

Credit Scheduling

• One of proportional share (PS) strategies

• Automatic workload balancing

• This algorithm can efficiently achieve a global workload balancing on a SMP system when the majority of the workload is not the high concurrent application.

• Default scheduling algorithm in Xen