Multi-core architecture provides more on-chip parallelism and powerful computational capability. It helps virtualization achieve scalable performance. KVM (kernel based virtual machine) is different from other virtualization solutions which can make use of the Linux kernel components such as Completely Fair Scheduler (CFS). However, CFS treats the KVM threads as normal tasks without considering about their unique features such as thread allocation mechanism and lock inside guest virtual machine, which may harm the KVM virtualization performance. In this paper, we analyze a phenomenon that some guest multi-threaded applications have very low performance when scheduled by CFS. As a solution to this problem, we introduce two kinds of optimizations in CFS: (1) Configuration Optimizations (2) Lock Optimizations. Our contributions are: (1) implement 5 original and 2 newest proposed optimizations in the newest Linux kernel. (2) Classify and compare them, a brief analysis is also given. They are all very simple and general to other virtual machine monitors such as Xen and schedulers as O(1). The performance of our CFS optimizations to KVM threads is measured by running some well-known benchmarks in two guest virtual machines on an 8-core server which models the real world applications. The results indicate our scheduling optimizations can improve the overall system performance. This paper can provide useful advices to KVM developers and virtualization data center administrators.
[1]
John K. Ousterhout.
Scheduling Techniques for Concurrebt Systems.
,
1982,
ICDCS 1982.
[2]
Daniel Pierre Bovet,et al.
Understanding the Linux Kernel
,
2000
.
[3]
Thomas Friebel,et al.
How to Deal with Lock Holder Preemption
,
2008
.
[4]
Ian K. T. Tan,et al.
Towards achieving fairness in the Linux scheduler
,
2008,
OPSR.
[5]
C.S. Wong,et al.
Fairness and interactive performance of O(1) and CFS Linux kernel schedulers
,
2008,
2008 International Symposium on Information Technology.
[6]
Wolfgang Mauerer,et al.
Professional Linux Kernel Architecture
,
2008
.
[7]
John K. Ousterhout,et al.
Scheduling Techniques for Concurrent Systems
,
1982,
ICDCS.
[8]
Joshua LeVasseur,et al.
Towards Scalable Multiprocessor Virtual Machines
,
2004,
Virtual Machine Research and Technology Symposium.