vGrouper: Optimizing the Performance of Parallel Jobs in Xen by Increasing Synchronous Execution of Virtual Machines

. Xen is one of the most popular virtualization platforms nowadays, which has been broadly used by the industry. Credit scheduler, the default scheduler of Xen, was initially designed for serial jobs, which achieves good performance overall for serial jobs. Unfortunately, the parallel jobs are likely to co-exist with serial jobs in the same host in practice, the resource contention between virtual machines results in severe performance degradation of the parallel jobs. In this paper, we propose vGrouper, a progressive solution to enhance the performance of the parallel jobs. The vGrouper focuses on synchronizing the execution time of the parallel nodes in order to achieve the best performance of the parallel job. Moreover, the vGrouper guarantees that the parallel job nodes are able to run concurrently on pCPUs for the entire time slice, which maximizes the eﬃciency of communication between parallel nodes. A prototype of vGrouper is implemented, the experimental results demonstrate that the performance of the parallel job and resource utilization in Xen have been signiﬁcantly improved.


Introduction
The Xen virtualization platform has been embraced by industry nowadays due to its impressive scalability and outstanding performance.However, the credit scheduler, which is the default scheduling strategy of Xen, has been identified to be less capable of scheduling parallel jobs.A parallel job usually relies on communication between nodes, which is a completely different working fashion from the serial job.Due to the lack of knowledge of the parallel job, the credit scheduler treats the nodes of each parallel job node as a normal serial job, where the particularity of the parallel job is completely disregarded.The shortcoming of credit scheduler has been discussed in several studies [3][4][2] [5].
In this paper, we propose vGrouper, a progressive solution to further enhance the performance of the parallel job to a new level.The vGrouper focuses on synchronizing the execution time of the parallel nodes in order to improve the performance of the parallel job.Moreover, the vGrouper guarantees that the parallel job nodes are able to run concurrently on pCPUs for the entire time slice, which maximizes the efficiency of communication between parallel nodes.
2 Background and Related Work

Credit Scheduler
The credit scheduler, which is a proportionally sharing scheduling strategy based on fair allocation of resource, was initially designed for scheduling serial jobs.Each VM will be given credits to consume during execution, which indicates that how many physical resources a VM can have.There two parameters weight and cap can be used for customizing the bias of resource allocation according to user's need, where the weight indicates the relative proportion of execution time and cap stands for the maximum amount time of execution time of a VM.In credit scheduler, two priorities are used to indicate the status of a VM.U N DER priority is given to those VMs which are remaining credits, while a VM running out of credits is given OV ER priority.Each vCPU of the VM is allowed to executed for a certain time, and the VMs with U N DER priority will be scheduled one by one.

Related Work
Several optimizations have been made to improve the performance of the parallel job in Xen.Chen and et al. found that overcommitted vCPUs brings performance degradations to concurrent jobs in [1], they mitigate the negative impact by adjusting the time length of execution of VMs according to the type of the workload.Shao and et al. also reveal the problem of overcommitted vCPUs in their research and indicate there is potential penalty on the performance of the parallel job in Xen [3], they choose to expose the workload types of VMs to Xen hypervisor to alleviate the decrease of the performance of the parallel job.

Problem Analysis
In the virtualized environment, a pCPU is proportionally shared among several vCPUs, and each vCPU in the local job queue is scheduled for a certain length of time periodically.We first make some assumptions on the environment of the virtual system based on the policies of credit scheduler and common experience of configuration.Firstly, the size of each parallel job is smaller than the number of pCPUs.Secondly, VMs of serial workloads are assumed to be in busy status.Thirdly, the VMs of the parallel job are Uniprocessor systems and only committed to execute the parallel jobs.Forthly, the total number of the VMs in system is much bigger than the number of the pCPUs of the host.
Let p be the number of pCPUs, s be the size of a parallel job and j be the total number of VMs.As the credit scheduler targets for global workload balanced, the VMs will be evenly and randomly allocated to the pCPUs.Therefore, we know the probability of the parallel nodes being allocated to different pCPUs is: Moreover, the nodes of the parallel job should be placed at the same positions of their run queues so that they can be scheduled simultaneously.We know the size of each run queue is: Thus, the probability of all parallel nodes being placed at the head of the run queues is: Therefore, the probability of a parallel job being simultaneously placed on the head of run queues by the credit scheduler is: We introduce execution efficiency E s to indicate the percentage of the parallel sub-tasks being simultaneous executed in a time slice.Additionally, as dom0 processes the I/O request in Xen, it is compulsory to schedule dom0 along with the parallel nodes.Thus, overall evaluation on the efficiency of scheduling a parallel job in Xens: As can be seen, the probability of a parallel job being properly scheduled by credit scheduler is extremely low.Therefore, a co-scheduler is required to assist the credit scheduler to make the appropriate decision on scheduling the parallel job.The problem can be illustrated by Fig 1.The co-scheduling solution solve the problem using three steps.Firstly, it identifies the parallel job in Xen, which requires the VMs of parallel job to be labeled by the users so that co-scheduler is able to identify parallel workload.Secondly, the co-scheduler relocates the VMs of the parallel jobs to avoid overcommitted pCPUs.All VMs of the parallel jobs will be examined in this step, if multiple VMs of a parallel lie on the same job queue of pCPU, the vGrouper is expected to redistribute then to different job queues by migrating.Notably, this step is only taken one time when a parallel job is created.Thirdly, for each parallel job, we choose a flag VM which indicates the parallel job is encountered.When the flag VM is about to be scheduled online, the vGrouper schedule all related VMs of the same parallel job together with the flag VM as a group by boosting the parallel nodes.The boost mechanism of credit scheduler allows current running vCPUs to be preempted by others to accelerate the responding time, which can be used by vGrouper to simultaneously scheduled the VMs of a parallel job together.

Conclusion
In this paper, we investigate the reasons for performance degradation of the parallel job in Xen and analyze the importance of simultaneous scheduling to the execution of the parallel job in Xen.we present vGrouper to assist the credit scheduler in handling the parallel application by increasing the length of synchronous execution of a parallel job.The experiments show that vGrouper effectively optimizes the performance of the parallel job in Xen and increases the utilization of the system.