节点文献

虚拟机本地存储写性能优化研究

Write Performance Optimization of Virtual Machine on the Local Storage

【作者】 李丁丁

【导师】 金海;

【作者基本信息】 华中科技大学 , 计算机系统结构, 2013, 博士

【摘要】 系统虚拟化技术解耦了传统操作系统与硬件设备之间的粘合度,使得多个同时运行的操作系统例程(虚拟机)可以部署在单个的物理平台上以共享底层的硬件资源,从而实现服务器整合而达到提高硬件利用率的效果。除此之外,系统虚拟化技术还可以为操作系统在同构、甚至异构物理平台之间的实时迁移,用户计算环境的快速部署、以及恶意软件的安全隔离等需求上带来有效可靠的技术解决方案,降低了组织机构或个人在计算机硬件和相关管理上的投资成本。尽管如此,相比较传统的操作系统环境,虚拟化技术亦给底层的存储设备的写入方向带来了性能挑战。这是因为:第一,由于虚拟机管理器的引入,使得虚拟机内部的写请求需要经历更长的I/0路径,增加了额外的CPU开销;第二,虚拟机管理器的引入亦使得虚拟机内部的相关块设备驱动程序很难获取准确的存储设备相关信息,失去了写操作性能进一步调优的机会;第三,由于服务器整合,使得共享存储设备需要面对和处理成倍增加的并发写请求数目,进一步加剧了其性能瓶颈。目前,国内外相关的虚拟化存储性能优化工作偏重于读取方面,而对于写入方面则存在一定程度上的关注缺失。因此有必要对虚拟机本地存储写操作的性能进行研究和优化。虚拟机本地存储写操作的新模型,可以对虚拟机内部的文件级写操作进行同步处理,再对虚拟机管理器的块级写操作进行异步处理。其中,虚拟机内部的同步处理意味着写请求可以绕过文件系统的复杂异步处理逻辑,缩短其从虚拟机层次到虚拟机管理器层次之间所需要经历的I/O路径,而异步处理指的是在块级的写请求到达存储硬件之前,根据底层具体的存储特性,在虚拟机管理器层次进行相关优化,以减轻共享存储由于并发I/O数目激增而产生的处理压力。基于域间通信技术的虚拟机存储协议栈优化机制,进一步优化了虚拟机本地存储写操作的性能。通过利用虚拟机系统提供的域间通信接口,进一步减小写操作从虚拟机层次切换到虚拟机管理器层次的CPU开销。同时,该优化机制亦可以在单独的虚拟化体系结构下使用。固态盘在虚拟化环境下写放大问题的优化机制,可以看作是虚拟机本地存储写操作的具体应用。具体而言,由于虚拟机管理器的引入,导致虚拟机文件系统与虚拟机管理器文件系统之间产生语义缺失,使得底层基于NAND闪存芯片的固态盘设备需要接收更多的重写操作,从而产生持续写放大的性能问题。该机制通过在虚拟机管理器层次加入块级别的写操作缓存,并在其上施加特定缓存管理逻辑,以缓解重写操作增多而导致写放大问题在虚拟化固态盘上产生的性能负面影响。综上所述,通过使用虚拟机本地存储写操作的新模型,可以减小写请求所需要消耗的至多80%左右的虚拟化CPU开销,也可以在虚拟机管理器层次加入对特定存储硬件设备的优化机制,以此来对整个虚拟化系统进行相应的I/O优化,缓解共享存储设备所需要面对和处理的I/O压力。同时,该虚拟化写操作模型对读操作兼容,不影响其性能。

【Abstract】 Virtualization technology reduces the affinity between traditional operating system (OS) and hardware, allowing multiple OS instances to run simultaneously on a single physical machine, thus improves the hardware utilization. Furthermore, virtualization technology provides an efficient and reliable solution, for the live migration of OS between homogeneous and even heterogeneous platforms, for the rapid deploy of user computing environment, and for the safe isolation of malicious software, largely reducing the IT investment cost of relevant organizations or individuals.However, compared with the traditional OS, virtualization technology challenges the write performance of shared storage device. First, due to the interposition of virtual machine monitor (VMM), write requests are required to experience the longer I/O path, incurring extra CPU overhead. Second, because of semantic gap, VMM eliminates the accurate information of specific storage device to the virtual block driver inside a virtual machine (VM), sacrificing a critical opportunity to improve the write performance according to the specific storage device. Third, due to server consolidation, the shared storage is required to face and handle the multiplied write requests, which further deteriorates the bottleneck of system performance. For the moment, many researchers focus only on the read direction to improve the performance of virtualized disk I/O, leaving write direction as unconcerned. To fill this gap, this paper provides insight into the main problems of write performance in a virtualized system and then presents improvements upon it.First, we propose a novel disk I/O model of virtualized system, called HypeGear. This new model handles the file level write request inside VM as synchronous manner, and then deals the block level write request inside VMM with asynchronous manner. Synchronous means that the write request can bypass the complex procedure in VM’s original path and asynchronous manner indicates that VMM can improve the write requests according the specific storage’s characteristic, instead of directly being written into the bottom disk device. Second, we devise a method to improve the storage protocol stack of a typical virtualized system, which can further reduce the CPU consumption of HypeGear. In detail, we leverage the interface of inter-domain transferring provided by virtualized system, accelerating the process of VM’s write request being trapped into VMM. It should be noted that this method can be deployed separately on the original virtualized system, not depending on HypeGear.Third, we propose an improvement for a virtualized solid state drive (SSD) system. This improvement can be treated as a specific application of HypeGear. In detail, due to the interposition of VMM, the semantic bridge between VM’s and VMM’s file systems are masked, which allowing more rewrite requests to be rushed into SSD and producing the problem of write amplification. Our improvement adds a block level write cache into VMM layer and uses a tailor-made cache management to reduce the number of rewrite that must touch SSD. In this way, the seriousness of write amplification in a virtualized SSD system can be effectively relieved.In summary, our new disk I/O model of virtualized system can improve up to80%CPU consumption of storage protocol stacks in a virtualized system. It also can implement some effective and specific improvements inside VMM layer to enhance the performance of different storage devices, improving the bottleneck of these shared storage devices in the virtualized environment.

节点文献中: 

本文链接的文献网络图示:

本文的引文网络