目前,运行在虚拟机上的客户操作系统(GuestOS)是面向物理机器开发的普通操作系统,其中存在不适应虚拟化环境的因素,影响虚拟机的I/O性能.作者通过测试发现了影响虚拟机I/O性能的一些问题,针对这些问题提出了优化方法:一方面,通过合并客户操作系统中连续的I/O指令,降低虚拟机的时钟中断频率,从而降低环境切换的开销;另一方面,消除客户操作系统中的冗余操作,包括在虚拟化环境下无效的函数、冗余的I/O调度以及虚拟网卡驱动对NAPI的支持,使虚拟机只执行必要的操作,从而提高系统的性能.
There are some operations in Guest OS causing the I/O performance degradation.For it is the general OS,which is oriented physical machines,directly running on the virtual machine as the Guest OS.This paper evaluates KVM I/O performance,find that the Guest OS should be adapted to the virtual environment for better performance,and proposes some optimizations.First,reduce VM Exits by merging successive I/O instructions and decreasing the frequency of timer interrupt;Second,removes some redundant operations from Guest OS,including the operations useless in virtual environment,the I/O scheduler whose results will be rescheduled in the Host OS,and the NAPI support in virtual NIC driver.