TY - GEN
T1 - Mitigating excessive vCPU spinning in VM-Agnostic KVM
AU - Ishiguro, Kenta
AU - Yasuno, Naoki
AU - Aublin, Pierre Louis
AU - Kono, Kenji
N1 - Funding Information:
We thank the anonymous reviewers for their helpful comments. This work was supported in part by Japan Science and Technology Agency (JST CREST JPMJCR19F3).
Publisher Copyright:
© 2021 ACM.
PY - 2021/4/16
Y1 - 2021/4/16
N2 - In virtualized environments, oversubscribing virtual CPUs (vCPUs) on physical CPUs (pCPUs) is common to utilize CPU resources efficiently. Unfortunately, excessive vCPU spinning, which occurs when a vCPU is waiting in a spin loop for an event from a descheduled vCPU, causes serious performance degradation. Usually, the VM-Agnostic hypervisor tries to prevent excessive vCPU spinning by rescheduling vCPUs when an excessive spin is detected by hardware support for virtualization. This paper investigates the effectiveness of KVM vCPU scheduler and shows it fails to avoid excessive vCPU spinning in many opportunities. Our in-depth analysis reveals simple modifications to KVM (41 LOC) improve the mitigation of excessive vCPU spinning. We have identified three problems: 1) scheduler mismatch, 2) lost opportunity, and 3) overboost. The first problem comes from the mismatch between the KVM vCPU scheduler and the Linux scheduler. The second and third problems come from an inefficient algorithm for choosing the next candidate vCPU to be scheduled. Our simple modifications gracefully resolves the problems and the performance improves by up to 80 %. Our results imply the VM-Agnostic hypervisor can resolve excessive vCPU spinning more gracefully than previously believed.
AB - In virtualized environments, oversubscribing virtual CPUs (vCPUs) on physical CPUs (pCPUs) is common to utilize CPU resources efficiently. Unfortunately, excessive vCPU spinning, which occurs when a vCPU is waiting in a spin loop for an event from a descheduled vCPU, causes serious performance degradation. Usually, the VM-Agnostic hypervisor tries to prevent excessive vCPU spinning by rescheduling vCPUs when an excessive spin is detected by hardware support for virtualization. This paper investigates the effectiveness of KVM vCPU scheduler and shows it fails to avoid excessive vCPU spinning in many opportunities. Our in-depth analysis reveals simple modifications to KVM (41 LOC) improve the mitigation of excessive vCPU spinning. We have identified three problems: 1) scheduler mismatch, 2) lost opportunity, and 3) overboost. The first problem comes from the mismatch between the KVM vCPU scheduler and the Linux scheduler. The second and third problems come from an inefficient algorithm for choosing the next candidate vCPU to be scheduled. Our simple modifications gracefully resolves the problems and the performance improves by up to 80 %. Our results imply the VM-Agnostic hypervisor can resolve excessive vCPU spinning more gracefully than previously believed.
KW - Hypervisor
KW - Virtualization
UR - http://www.scopus.com/inward/record.url?scp=85104579985&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85104579985&partnerID=8YFLogxK
U2 - 10.1145/3453933.3454020
DO - 10.1145/3453933.3454020
M3 - Conference contribution
AN - SCOPUS:85104579985
T3 - VEE 2021 - Proceedings of the 17th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments
SP - 139
EP - 152
BT - VEE 2021 - Proceedings of the 17th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments
A2 - Titzer, Ben L.
A2 - Xu, Harry
A2 - Zhang, Irene
PB - Association for Computing Machinery, Inc
T2 - 17th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments, VEE 2021
Y2 - 16 April 2021 through 16 April 2021
ER -