| With the rapid development of large-scale integrated circuit technology,computing power will no longer be the bottleneck of business applications,meanwhile,the exclusive occupation of physical resources becomes a waste.The mainstream topic in current computing research is how to use excess computing resources when providing secure,stable,fast deployment,and on-demand computing resource services.Virtualization technology is the key to realize those features and the virtual machine performance is the key parameter in customer service.This paper will study the properties and optimizations of KVM virtual machines in the following steps: Firstly,we will present the origination and development background of KVM,with the virtualization environment optimized.Then,from the aspects of KVM virtualization principle,virtual machine scheduling,memory usage and I/O access optimization,the performance optimization scheme and implementation method of virtual machine are comprehensively studied.Around the KVM virtual machine performance improvement,the specific work of the research is as follows:(1)Using open source Linux as VMM,compiling the latest kernel on a Centos7 system,and modifying/adjusting the function modules in the kernel that affect KVM performance,installing the latest version of I/O simulation software QEMU and virtual machine management software libvirt,and building an environment-optimized KVM virtualization platform.(2)The realization principle of KVM hardware-assisted full virtualization(Intel VT-x technology)and the in-depth analysis of the software-driven principle and operation mechanism of KVM kernel module are studied.Based on the in-depth understanding of the virtual machine operation mode,a processor-based algorithm is proposed.From the perspective of KVM virtual machine performance optimization,a set of VCPU capture event capture schemes was designed and implemented.For the third approach,the feasibility of the improvement was verified.(3)In this work,we also perform in-depth study of the impact of Linux process management,scheduling strategy,and operational priority on processor resource consumption,proposed a KVM virtual machine scheduling optimization solution,designed and implemented a process monitoring program combined with real-time monitoring,which enables priority change regarding the properties of computing needs,therefore,the virtual machine can get more opportunities to occupy physical processor resources according to actual needs,and improve the overall performance of the KVM virtual machine.The optimization scheme is verified by experiment.(4)From the aspects of optimizing memory usage and access efficiency,three approaches for optimizing memory usage were discussed,depending on the adaptation scenarios according to physical resource environment and business system requirements,detailed implementation methods are proposed.(5)The access principle and implementation process of paravirtualized devices based on virtio are investigated,and the improvements on accessing performance of KVM virtual machine I/O using paravirtualization is discussed and determined.In addition,we propose the application scenario of I/O virtualization technology in hardware pass-through model and the idea of implementing I/O optimization with specific services.Using experiments,the implementation methods and steps of virtual machine I/O performance optimization under virtio,Intel VT-d and SR-IOV standards are presented. |