Xen虚拟机的虚拟CPU松弛协同调度方法
A Relaxed Co-Scheduling Method of Virtual CPUs on Xen Virtual Machines
-
摘要: 目前,Xen虚拟机调度算法均采用独立调度虚拟CPU的方式,而没有考虑虚拟机各虚拟CPU之间的协同调度关系,这会使虚拟机各个虚拟CPU之间产生很大的时钟中断数量偏差等问题,从而导致系统不稳定.为了提高系统的稳定性,基于Credit算法提出了一种比RCS(relaxed co-scheduling)算法更松弛的协同调度算法MRCS(more relaxed co-scheduling).该算法采用非抢占式协同调整方法将各个虚拟CPU相对运行的时间间隔控制在同步时间检测的上限门限值T\-max之内,同时利用同步队列中虚拟CPU优化选择调度方法和Credit算法的虚拟CPU动态迁移方法,能够更加及时地协同处理虚拟CPU,并且保证了各个物理CPU的负载均衡,有效地减少客户操作系统与VMM的环境切换次数,降低了系统开销.实验结果证明该方法不但保证了系统的稳定性,而且使系统性能得到一定程度的提升.虚拟机调度算法不仅影响虚拟机的性能,更会影响虚拟机的稳定性,致力于虚拟机调度算法的研究是一项非常有意义的工作.Abstract: In the environment of Xen virtual machine based on the SMP system with two or more physical CPU cores, the current virtual machine scheduling algorithms make all virtual CPUs be scheduled independently and do not consider the co-scheduling relationship of guest OS virtual CPUs, which leads to too much deviation of timer interruptions among virtual CPUs and so on, which causes the decline of guest OS stability. According to the problem, a more relaxed co-scheduling algorithm of virtual CPUs on Xen virtual machines than the relaxed co-scheduling one is given. It adopts a non-preemptive co-scheduling method to restrain relative running time of virtual CPUs between 0 and the upper limit to co-scheduling time detection T\-max. And it makes virtual CPUs co-scheduling more quickly and physical CPUs load more balanced by the method of optimized selection of virtual CPU and the method of dynamic migration of virtual CPUs in Credit. Meanwhile it reduces the whole virtualization systems overhead further. The experimental results show that the method ensures the stability of the virtualization system, and it improves the performance of virtual machines to a certain extent. The scheduling algorithm of virtual machines has the direct effect on the performance and stability, and it is a significant job to go into scheduling algorithms of virtual machines.