Dynamic CPU scheduling for load balancing in virtualized environments

In the modern era of computing, the cloud computing platform became popular with its on-demand resource scalability feature. Virtualization is the key technology to achieve resource scalability in the cloud environment. Virtual machine monitors (VMMs) like Xen and KVM are the enabling tools for virtualizing the resources in the cloud environment. The major role of VMMs is to map virtual CPUs of virtual machines to physical CPUs, popularly known as CPU scheduling. In this study, we analyzed the CPU scheduler of Xen VMM, called Credit CPU scheduler, with respect to CPU utilization. In order to maximize the physical CPU utilization in Xen VMM, the existing Credit CPU scheduling scheme distributes the physical CPU time among all the virtual CPUs available in virtual machines based on the current weight of the virtual machine. However, this scheduling approach wastes a considerable amount of CPU time in context switching due to random allocation of virtual CPUs to the real CPU cores. In addition to that, the Credit CPU scheduler in Xen is least concerned about load balancing at both virtual and physical CPUs level. Considering all these above issues, in this paper, a dynamic CPU scheduling algorithm is presented that will distribute both single and multithreaded load fairly among virtual and real CPUs, and also handle the issues related to context switching. The proposed CPU scheduling approach is implemented in Xen VMM using the virsh interface. The experimental results indicate that the proposed CPU scheduling approach distributes the available real CPU time evenly among virtual CPUs, which leads to balanced load in the Xen environment.