节点文献

VCPU组调度技术的研究与实现

The Research and Implementation of Scheduling VCPU Groups

【作者】 常建忠

【导师】 刘晓建;

【作者基本信息】 国防科学技术大学 , 软件工程, 2010, 硕士

【摘要】 近年来,随着在越来越多的领域中得到广泛应用,虚拟化技术得到了迅速发展。与此同时,由于不同应用场景对虚拟化技术有着不同的功能、性能要求,又给虚拟化技术带来许多新的问题。当前,虚拟机调度器在调度和CPU资源分配中主要考虑到各个虚拟机间的独立性,而忽略了虚拟机间的一些联系。这种情况下,调度器降低了有协同需求的虚拟机间并行工作的可能性,从而影响了需要多个任务协同工作的大型应用的服务质量;在商业服务器虚拟化中,客户期望最大限度利用自己已付费购买的计算资源,但在传统的虚拟机调度模式中,客户的虚拟机负载不均时,负载较重虚拟机也不能获得该客户其它空闲虚拟机的资源,即:客户付费范围内有些虚拟机资源是闲置的而有些又是负载过重的。针对上述虚拟机协同问题,本文提出了一种虚拟化平台上的协同调度策略。文章首先分析了虚拟机间的协同关系,根据应用对多虚拟机并行运行的严格性要求不同,将协同请求划分为强协同和弱协同两个等级,然后在此基础上讨论了协同调度中VCPU(Virtual CPU)分配问题和VCPU同步问题。为防止协同VPCU运行在同一物理节点上,本文提出了VCPU分配机制;在VCPU同步上,为了降低协同对系统性能影响,文章综合分析了VCPU抢占条件和时机,同时借鉴了co-scheduling调度算法,提出了基于协同请求级别和VCPU运行优先级的抢占机制;最后结合Xen credit调度算法提出了co-credit协同调度策略。针对客户虚拟机资源控制问题,为避免出现客户付费范围内资源浪费情况,本文提出了以虚拟机组为单位的计算资源管理方式,同组的虚拟机间可动态共享CPU资源。首先结合多虚拟机资源管理的特点分析了资源分配策略,选取合适的CPU资源分配机制;为了有效管理空闲虚拟机资源,提出了虚拟机状态检测机制,根据虚拟机调度器和虚拟机组不同需求,设计了不同的检测标准;最后根据组内虚拟机状态和VCPU数量等信息,实现了组内空闲CPU资源重新分配。基于以上分析研究,本文结合开源项目Xen设计开发实现了虚拟机组调度器,并对其性能进行了测试。通过实验表明,协同调度明显提高了虚拟机间协同工作能力,且没有对调度的公平性造成明显影响;虚拟机组资源管理方式使组内繁忙虚拟机能得到组内空闲资源,实现组内资源的有效利用。本课题得到了863项目“可扩展高性能虚拟机关键技术研究”的资助。

【Abstract】 Virtualization technology has been developing rapidly in recent years, and is used in more and more areas. Different applications have different requirements of virtualization functions and performance, which brings new problems in virtualization development.Currently, about CPU resources allocation and scheduling, the Virtual Machine(VM) scheduler mainly cares about independence among VMs, ignoring cooperations among VMs. In this case, the VM scheduler reduces the parallelizability of VMs, which affects the QOS of large-scale applications that need multiple VMs to work cooperatively. In commercial server virtualization environment, customers expect to maximize the utilization of computing resources that they have paid for. However, in the traditional VM scheduling, heavy load VMs can not get resources of the other idle VMs, when the customer’s VMs load imbalance. As a result, some of VMs’resources paid by customer are idle while the others are overloaded.To improve the ability of VM cooperation, a co-scheduling strategy is proposed for the virtualization environment. First, the VM cooperation is analysed. Cooperations are classified into strong cooperation and weak cooperation according to different requirements of synchronization. Based on the above analysis, VCPUs(Virtual CPU) distribution and synchronization are discussed. In order to prevent cooperative VCPUs from running on the same physical core, a VCPU distribution mechanism is proposed. About VCPU synchronization, for minimizing the impact of cooperation on system performance, conditions and timing of VCPU preemption are analysed comprehensively, then a preemption mechanism is proposed based on traditional parallel system co-scheduling. Finally, co-credit co-scheduling is developed based on Xen credit scheduling.To manage the curomers’virtual machine resources more efficiently, virtual machine group is treated as the resource allocation unit, so that the same group VMs can share CPU resources dynamicly, and avoid wastage of resources paid by customer. First, Resources allocation strategy is discussed according to multiple VMs resources management features and an appropriate CPU resource allocation mechanism is chosen. To effectively manage the resources of idle VMs, VM state detection mechanism is proposed and different test rules are designed according to the different needs of VM scheduler and VM group. The group idle CPU resources are re-allocated according to the state of VM within the group and the number of VCPUs, which achieves efficient use of group idle resources .Based on the above analysis, a VM co-scheduler is designed and implemented in the open source Xen project. Finally, experiments show that VM co-scheduler improves the ability of VMs to cooperate and has few effects on the fairness. The loaded VMs within a group can get CPU resources of the idle ones, so that resources within a group are fully utilized. This thesis is supported by 863 project“Scalable high-performance virtual machine key technology research”.

【关键词】 虚拟化技术协同调度虚拟机Xen
【Key words】 Virtualization TechnologyCo-schedulingVirtual MachineXen
节点文献中: