CN110703987B - A method and system for improving virtual disk IO performance - Google Patents
A method and system for improving virtual disk IO performance Download PDFInfo
- Publication number
- CN110703987B CN110703987B CN201910819280.1A CN201910819280A CN110703987B CN 110703987 B CN110703987 B CN 110703987B CN 201910819280 A CN201910819280 A CN 201910819280A CN 110703987 B CN110703987 B CN 110703987B
- Authority
- CN
- China
- Prior art keywords
- virtual
- virtual machine
- virtual disk
- performance
- disk
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 20
- 230000004048 modification Effects 0.000 claims description 14
- 238000012986 modification Methods 0.000 claims description 14
- 238000005457 optimization Methods 0.000 claims description 9
- 230000002452 interceptive effect Effects 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 3
- 238000006467 substitution reaction Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 230000007812 deficiency Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000004043 responsiveness Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0662—Virtualisation aspects
- G06F3/0664—Virtualisation aspects at device level, e.g. emulation of a storage device or system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0674—Disk device
- G06F3/0676—Magnetic disk device
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本发明属于虚拟化技术领域,具体涉及一种提高虚拟磁盘IO性能的方法及系统。The invention belongs to the technical field of virtualization, and in particular relates to a method and a system for improving the IO performance of a virtual disk.
背景技术Background technique
IOPS,Input/Output Per Second的简称,即每秒的读写次数。IOPS, short for Input/Output Per Second, is the number of reads and writes per second.
凭借降低成本,提高运营效率,加速企业创新步伐等优势,虚拟化技术越来越受到广大用户的青睐。Kernel Virtual Machine(KVM)虚拟化在很大程度上已取代Xen,成为在大多数Linux系统上创建和支持虚拟机(VM)的默认开源方案。当企业把服务迁移至KVM虚拟化时,通常关注于核心的计算元素比如处理器和内存,但是虚拟磁盘的IO性能同样对虚拟机的总体性能以及响应能力具有重要的影响。当前一些虚拟化系统虚拟磁盘性能差、响应缓慢等问题也随之而来,无法满足用户不同应用场景的需求。目前缺少一种根据不同类型应用自动调整参数设置,使得在一定存储硬件配置下虚拟磁盘达到最优的方法。With the advantages of reducing costs, improving operational efficiency, and accelerating the pace of enterprise innovation, virtualization technology is increasingly favored by users. Kernel Virtual Machine (KVM) virtualization has largely replaced Xen as the default open source solution for creating and supporting virtual machines (VMs) on most Linux systems. When enterprises migrate services to KVM virtualization, they usually focus on core computing elements such as processors and memory, but the IO performance of virtual disks also has a significant impact on the overall performance and responsiveness of virtual machines. At present, some virtualization systems have poor performance and slow response of virtual disks, which cannot meet the needs of users in different application scenarios. Currently, there is a lack of a method for automatically adjusting parameter settings according to different types of applications, so that a virtual disk can be optimized under a certain storage hardware configuration.
此为现有技术的不足,因此,针对现有技术中的上述缺陷,提供一种提高虚拟磁盘IO性能的方法及系统,是非常有必要的。This is the deficiency of the prior art, therefore, it is very necessary to provide a method and system for improving the IO performance of a virtual disk in view of the above-mentioned defects in the prior art.
发明内容SUMMARY OF THE INVENTION
针对现有技术的上述缺少一种根据不同类型应用自动调整参数设置,使得在一定存储硬件配置下虚拟磁盘达到最优方法的缺陷,本发明提供一种提高虚拟磁盘IO性能的方法及系统,以解决上述技术问题。Aiming at the above-mentioned defect of the prior art that there is a lack of an automatic adjustment parameter setting according to different types of applications, so that the virtual disk can reach the optimal method under a certain storage hardware configuration, the present invention provides a method and system for improving the IO performance of a virtual disk, so as to Solve the above technical problems.
第一方面,本发明提供一种提高虚拟磁盘IO性能的方法,包括如下步骤:In a first aspect, the present invention provides a method for improving the IO performance of a virtual disk, comprising the following steps:
S1.提升虚拟主机内核性能;S1. Improve virtual host kernel performance;
S2.修改虚拟机管理工具libvirt的默认参数配置,使得虚拟机兼容windows和linux两种操作系统;S2. Modify the default parameter configuration of the virtual machine management tool libvirt, so that the virtual machine is compatible with both windows and linux operating systems;
S3.为虚拟机用户配置可选IO应用类型,IO应用类型绑定IO模型;S3. Configure an optional IO application type for the virtual machine user, and the IO application type is bound to the IO model;
S4.配置虚拟化系统自动对不同类型虚拟机进行优化。修改虚拟机管理工具libvirt的默认参数配置,实现对windows和linux虚拟机均适用的通用优化项;为虚拟机用户配置可选IO应用类型,对存储不熟悉的用户,提供IO应用类型选项,实现智能优化。S4. Configure the virtualization system to automatically optimize different types of virtual machines. Modify the default parameter configuration of the virtual machine management tool libvirt to implement general optimization items applicable to both Windows and Linux virtual machines; configure optional IO application types for virtual machine users, and provide IO application type options for users who are not familiar with storage. Smart optimization.
进一步地,步骤S1中,通过升级虚拟主机内核版本提升虚拟主机内核性能。设置虚拟化系统内核从CentOS7.3版本默认内核升级到CentOS7.6版本默认内核。通过内核升级可以降低网络报文处理延时,可以大幅提高读写IOPS。Further, in step S1, the performance of the virtual host kernel is improved by upgrading the virtual host kernel version. Set the virtualized system kernel to upgrade from the default kernel of CentOS7.3 to the default kernel of CentOS7.6. Through the kernel upgrade, the network packet processing delay can be reduced, and the read and write IOPS can be greatly improved.
进一步地,步骤S2具体步骤如下:Further, the specific steps of step S2 are as follows:
S21.修改虚拟机管理工具Libvirt的xml配置文件,修改虚拟磁盘默认读写缓存模式为cache=none;S21. Modify the xml configuration file of the virtual machine management tool Libvirt, and modify the default read-write cache mode of the virtual disk to cache=none;
S22.修改虚拟机管理工具Libvirt的xml配置文件,对所有的虚拟磁盘读写缓存模式都增加io=native字段。修改虚拟磁盘默认的读写缓存模式,对所有磁盘增加IO的本地字段。S22. Modify the xml configuration file of the virtual machine management tool Libvirt, and add an io=native field to all virtual disk read-write cache modes. Modify the default read-write cache mode of virtual disks, and add IO local fields to all disks.
进一步地,步骤S3中为虚拟机用户配置的可选IO应用类型包括视频流媒体、大文件拷贝、备份、联机分析处理、web文件服务器、web服务器日志、邮件协作服务器、桌面云虚拟化、在线交互处理数据以及工作站;Further, the optional IO application types configured for the virtual machine user in step S3 include video streaming, large file copy, backup, online analytical processing, web file server, web server log, mail collaboration server, desktop cloud virtualization, online Interactive processing of data and workstations;
IO模型包括大块顺序读写和小块随机读写。系统根据IO应用类型自动对应到“大块顺序读写”或者“小块随机读写”IO模型上。管理界面还可对两类应用类型进行举例说明,帮助用户选择。The IO model includes large-block sequential reads and writes and small-block random reads and writes. The system automatically corresponds to the "large block sequential read and write" or "small block random read and write" IO model according to the IO application type. The management interface can also illustrate two types of application types to help users choose.
进一步地,步骤S4具体步骤如下:Further, the specific steps of step S4 are as follows:
S41.获取虚拟机的操作系统类型和应用类型,判断虚拟机操作系统类型;S41. Obtain the operating system type and application type of the virtual machine, and determine the operating system type of the virtual machine;
S42.若是Linux操作系统,进入步骤S43;S42. If it is a Linux operating system, go to step S43;
若是windows操作系统,则在虚拟机管理工具libvirt的xml配置文件中增加hyperv字段,进入步骤S43;If it is a windows operating system, add a hyperv field to the xml configuration file of the virtual machine management tool libvirt, and go to step S43;
S43.判断并根据虚拟磁盘IO应用类型,自动设置虚拟磁盘参数值,调用底层接口对虚拟机进行配置。首先判断虚拟机操作系统类型,如果是Linux系统无需特殊处理,如果是windows系统,则在libvirt层虚拟机的xml配置文件中增加hyperv字段;Libvirt,用于管理虚拟化平台的开源的API,后台程序和管理工具;判断虚拟磁盘IO应用类型,自动设置最优参数值并调用底层接口进行配置,使得虚拟磁盘性能达到最优。S43. Determine and automatically set virtual disk parameter values according to the virtual disk IO application type, and call the underlying interface to configure the virtual machine. First determine the type of the virtual machine operating system. If it is a Linux system, no special treatment is required. If it is a Windows system, add the hyperv field to the xml configuration file of the libvirt layer virtual machine; Libvirt, an open source API for managing virtualization platforms, background Programs and management tools; determine the virtual disk IO application type, automatically set the optimal parameter values and call the underlying interface for configuration, so that the virtual disk performance is optimal.
进一步地,步骤S43具体步骤如下:Further, the specific steps of step S43 are as follows:
S431.判断虚拟磁盘IO模型;S431. Determine the virtual disk IO model;
S432.当虚拟磁盘IO模型为大块顺序读写时,采用虚拟化系统默认的簇大小和CPU二级缓存大小设置;进入步骤S434;S432. When the virtual disk IO model is large-block sequential read and write, the default cluster size and CPU L2 cache size settings of the virtualization system are used; enter step S434;
S433.当虚拟磁盘IO模型为小块随机读写时,设置簇大小为256K,设置CPU二级缓存大小=虚拟磁盘大小*8/簇大小,或者根据自定义接口获取数据对簇大小和CPU二级缓存大小进行设置;S433. When the virtual disk IO model is random read and write in small blocks, set the cluster size to 256K, set the CPU L2 cache size = virtual disk size * 8/cluster size, or obtain data from a custom interface to pair the cluster size and CPU 2 level cache size to set;
S434.调用底层接口对虚拟机进行配置。磁盘I/O类型如果是“大块顺序读写”,则无需特殊处理。如果是“小块随机读写”,则进行CPU的二级缓存和簇大小设置,簇大小调整为256k时候对小块随机读写性能提升较大,CPU的二级缓存大小设置为=磁盘大小*8/簇大小来推荐最佳默认值并进行配置;同时开放CPU的二级缓存和簇大小参数设置选项,对有经验的用户可以自行设置。S434. Call the underlying interface to configure the virtual machine. If the disk I/O type is "large block sequential read and write", no special treatment is required. If it is "small block random read and write", set the CPU's second-level cache and cluster size. When the cluster size is adjusted to 256k, the performance of small-block random read and write is greatly improved, and the CPU's second-level cache size is set to = disk size *8/cluster size to recommend the best default value and configure it; at the same time, open the CPU L2 cache and cluster size parameter setting options, which can be set by experienced users.
第二方面,本发明提供一种提高虚拟磁盘IO性能的系统,包括In a second aspect, the present invention provides a system for improving IO performance of a virtual disk, comprising:
内核性能提升模块,用于提升虚拟主机内核性能;Kernel performance improvement module, used to improve virtual host kernel performance;
参数修改模块,用于修改虚拟机管理工具libvirt的默认参数配置,使得虚拟机兼容windows和linux两种操作系统;The parameter modification module is used to modify the default parameter configuration of the virtual machine management tool libvirt, so that the virtual machine is compatible with both windows and linux operating systems;
IO应用类型提供模块,用于为虚拟机用户配置可选IO应用类型,IO应用类型绑定IO模型;The IO application type provides a module for configuring optional IO application types for virtual machine users, and the IO application type is bound to the IO model;
虚拟机优化模块,用于配置虚拟化系统自动对不同类型虚拟机进行优化。The virtual machine optimization module is used to configure the virtualization system to automatically optimize different types of virtual machines.
进一步地,参数修改模块包括:Further, the parameter modification module includes:
缓存模式修改单元,用于修改虚拟机管理工具Libvirt的xml配置文件,修改虚拟磁盘默认读写缓存模式为cache=none;The cache mode modification unit is used to modify the xml configuration file of the virtual machine management tool Libvirt, and modify the default read-write cache mode of the virtual disk to cache=none;
磁盘文件调整配置单元,用于修改虚拟机管理工具Libvirt的xml配置文件,对所有的虚拟磁盘读写缓存模式都增加io=native字段。The disk file adjustment configuration unit is used to modify the xml configuration file of the virtual machine management tool Libvirt, and the io=native field is added to all virtual disk read-write cache modes.
进一步地,虚拟机优化模块包括:Further, the virtual machine optimization module includes:
虚拟机操作系统类型判断单元,用于获取虚拟机的操作系统类型和应用类型,判断虚拟机操作系统类型;A virtual machine operating system type judging unit, used to obtain the operating system type and application type of the virtual machine, and determine the virtual machine operating system type;
Windows操作系统虚拟机配置文件更改单元,用于在windows操作系统,对虚拟机管理工具libvirt的xml配置文件中增加hyperv字段;The Windows operating system virtual machine configuration file changing unit is used to add the hyperv field to the xml configuration file of the virtual machine management tool libvirt in the Windows operating system;
虚拟磁盘参数配置单元,判断并根据虚拟磁盘IO应用类型,自动设置虚拟磁盘参数值,调用底层接口对虚拟机进行配置。The virtual disk parameter configuration unit determines and automatically sets the virtual disk parameter value according to the virtual disk IO application type, and calls the underlying interface to configure the virtual machine.
进一步地,虚拟磁盘参数配置单元包括:Further, the virtual disk parameter configuration unit includes:
IO模型判断子单元,用于判断虚拟磁盘IO模型;The IO model judgment subunit is used to judge the virtual disk IO model;
大块顺序读写设置子单元,用于当虚拟磁盘IO模型为大块顺序读写时,采用虚拟化系统默认的簇大小和CPU二级缓存大小设置;Large block sequential read and write setting subunit, used to set the default cluster size and CPU L2 cache size of the virtualization system when the virtual disk IO model is large block sequential read and write;
小块随机读写设置子单元,用于当虚拟磁盘IO模型为小块随机读写时,设置簇大小为256K,设置CPU二级缓存大小=虚拟磁盘大小*8/簇大小,或者根据自定义接口获取数据对簇大小和CPU二级缓存大小进行设置;Small block random read and write setting subunit, used to set the cluster size to 256K when the virtual disk IO model is small block random read and write, set the CPU L2 cache size = virtual disk size * 8/cluster size, or according to custom The interface obtains data to set the cluster size and the size of the CPU L2 cache;
虚拟机配置子单元,用于调用底层接口对虚拟机进行配置。The virtual machine configuration subunit is used to call the underlying interface to configure the virtual machine.
本发明的有益效果在于,The beneficial effect of the present invention is that,
本发明提供的提高虚拟磁盘IO性能的方法及系统,根据用户的不用业务场景,自动调整优化配置参数,使得在固定硬件设备的情况下,虚拟磁盘IO性能达到最优。The method and system for improving virtual disk IO performance provided by the present invention automatically adjusts and optimizes configuration parameters according to different business scenarios of the user, so that the virtual disk IO performance is optimal in the case of fixed hardware devices.
此外,本发明设计原理可靠,结构简单,具有非常广泛的应用前景。In addition, the present invention has reliable design principle and simple structure, and has a very wide application prospect.
由此可见,本发明与现有技术相比,具有突出的实质性特点和显著的进步,其实施的有益效果也是显而易见的。It can be seen that, compared with the prior art, the present invention has outstanding substantive features and significant progress, and the beneficial effects of its implementation are also obvious.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. In other words, other drawings can also be obtained based on these drawings without creative labor.
图1是本发明的方法流程示意图一;Fig. 1 is method flow schematic diagram one of the present invention;
图2是本发明的方法流程示意图二;Fig. 2 is method flow schematic diagram two of the present invention;
图3为本发明的系统示意图;Fig. 3 is the system schematic diagram of the present invention;
图中,1-内核性能提升模块;2-参数修改模块;2.1-缓存模式修改单元;2.2-磁盘文件调整配置单元;3-IO应用类型提供模块;4-虚拟机优化模块;4.1-虚拟机操作系统类型判断单元;4.2-Windows操作系统虚拟机配置文件更改单元;4.3-虚拟磁盘参数配置单元;4.3.1-IO模型判断子单元;4.3.2-大块顺序读写设置子单元;4.3.3-小块随机读写设置子单元;4.3.4-虚拟机配置子单元。In the figure, 1-kernel performance improvement module; 2-parameter modification module; 2.1-cache mode modification unit; 2.2-disk file adjustment configuration unit; 3-IO application type providing module; 4-virtual machine optimization module; 4.1-virtual machine Operating system type judgment unit; 4.2-Windows operating system virtual machine configuration file modification unit; 4.3-Virtual disk parameter configuration unit; 4.3.1-IO model judgment subunit; .3- Small block random read and write setting sub-unit; 4.3.4- Virtual machine configuration sub-unit.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本发明中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described The embodiments are only some of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
实施例1:Example 1:
如图1所示,本发明提供一种提高虚拟磁盘IO性能的方法,包括如下步骤:As shown in Figure 1, the present invention provides a method for improving the IO performance of a virtual disk, comprising the following steps:
S1.提升虚拟主机内核性能;通过升级虚拟主机内核版本提升虚拟主机内核性能,提升了虚拟机报文处理时延,大幅度提供读写IOPS;设置虚拟化系统内核从CentOS7.3版本默认内核升级到CentOS7.6版本默认内核;S1. Improve the performance of the virtual host kernel; improve the performance of the virtual host kernel by upgrading the virtual host kernel version, improve the virtual machine message processing delay, and greatly provide read and write IOPS; set the virtualized system kernel to upgrade from the default kernel of CentOS7.3 To CentOS7.6 version default kernel;
S2.修改虚拟机管理工具libvirt的默认参数配置,使得虚拟机兼容windows和linux两种操作系统;S2. Modify the default parameter configuration of the virtual machine management tool libvirt, so that the virtual machine is compatible with both windows and linux operating systems;
S3.为虚拟机用户配置可选IO应用类型,IO应用类型绑定IO模型;为虚拟机用户配置的可选IO应用类型包括视频流媒体、大文件拷贝、备份、联机分析处理、web文件服务器、web服务器日志、邮件协作服务器、桌面云虚拟化、在线交互处理数据以及工作站;IO模型包括大块顺序读写和小块随机读写;S3. Configure optional IO application types for virtual machine users, and IO application types are bound to IO models; optional IO application types configured for virtual machine users include video streaming, large file copy, backup, online analytical processing, web file server , web server log, mail collaboration server, desktop cloud virtualization, online interactive data processing and workstation; IO model includes large block sequential read and write and small block random read and write;
S4.配置虚拟化系统自动对不同类型虚拟机进行优化。存储虚拟化将来自于多个网络存储设备的资源整合为资源池,对外部来说,相当于单个存储设备,连同虚拟化的磁盘、块、磁带系统与文件系统。主机通常通过iscsi、fc、nfs等协议连接存储设备,网络报文处理性能,对于虚拟磁盘性能影响较大。S4. Configure the virtualization system to automatically optimize different types of virtual machines. Storage virtualization integrates resources from multiple network storage devices into a resource pool, which is equivalent to a single storage device to the outside world, along with virtualized disk, block, tape systems and file systems. The host usually connects to the storage device through protocols such as iscsi, fc, and nfs. The network packet processing performance has a great impact on the performance of the virtual disk.
实施例2:Example 2:
如图2所示,本发明提供一种提高虚拟磁盘IO性能的方法,包括如下步骤:As shown in Figure 2, the present invention provides a method for improving the IO performance of a virtual disk, comprising the following steps:
S1.提升虚拟主机内核性能;通过升级虚拟主机内核版本提升虚拟主机内核性能;设置虚拟化系统内核从CentOS7.3版本默认内核升级到CentOS7.6版本默认内核;S1. Improve the performance of the virtual host kernel; improve the virtual host kernel performance by upgrading the virtual host kernel version; set the virtualized system kernel to upgrade from the default kernel of CentOS7.3 version to the default kernel of CentOS7.6 version;
S2.修改虚拟机管理工具libvirt的默认参数配置,使得虚拟机兼容windows和linux两种操作系统;具体步骤如下:S2. Modify the default parameter configuration of the virtual machine management tool libvirt to make the virtual machine compatible with both Windows and Linux operating systems; the specific steps are as follows:
S21.修改虚拟机管理工具Libvirt的xml配置文件,修改虚拟磁盘默认读写缓存模式为cache=none;S21. Modify the xml configuration file of the virtual machine management tool Libvirt, and modify the default read-write cache mode of the virtual disk to cache=none;
S22.修改虚拟机管理工具Libvirt的xml配置文件,对所有的虚拟磁盘读写缓存模式都增加io=native字段;S22. Modify the xml configuration file of the virtual machine management tool Libvirt, and add the io=native field to all virtual disk read-write cache modes;
S3.为虚拟机用户配置可选IO应用类型,IO应用类型绑定IO模型;为虚拟机用户配置的可选IO应用类型包括视频流媒体、大文件拷贝、备份、联机分析处理、web文件服务器、web服务器日志、邮件协作服务器、桌面云虚拟化、在线交互处理数据以及工作站;IO模型包括大块顺序读写和小块随机读写;管理界面还可对两类应用类型进行举例说明,帮助用户选择;如虚拟磁盘IO应用类型为视频流媒体、数据备份等,推荐选择“大块顺序读写”选项。若是数据库、OLTP(Online Transaction Processing)虚拟磁盘I/O应用类型,推荐选择“小块随机读写”选项;S3. Configure optional IO application types for virtual machine users, and IO application types are bound to IO models; optional IO application types configured for virtual machine users include video streaming, large file copy, backup, online analytical processing, web file server , web server log, mail collaboration server, desktop cloud virtualization, online interactive data processing and workstation; the IO model includes large-block sequential read and write and small-block random read and write; the management interface can also give examples of the two types of applications, help User's choice; if the virtual disk IO application type is video streaming, data backup, etc., it is recommended to select the "large block sequential read and write" option. If it is a database, OLTP (Online Transaction Processing) virtual disk I/O application type, it is recommended to select the "small block random read and write" option;
S4.配置虚拟化系统自动对不同类型虚拟机进行优化;具体步骤如下:S4. Configure the virtualization system to automatically optimize different types of virtual machines; the specific steps are as follows:
S41.获取虚拟机的操作系统类型和应用类型,判断虚拟机操作系统类型;S41. Obtain the operating system type and application type of the virtual machine, and determine the operating system type of the virtual machine;
S42.若是Linux操作系统,进入步骤S43;S42. If it is a Linux operating system, go to step S43;
若是windows操作系统,则在虚拟机管理工具libvirt的xml配置文件中增加hyperv字段,进入步骤S43;If it is a windows operating system, add a hyperv field to the xml configuration file of the virtual machine management tool libvirt, and go to step S43;
S43.判断并根据虚拟磁盘IO应用类型,自动设置虚拟磁盘参数值,调用底层接口对虚拟机进行配置;具体步骤如下:S43. Determine and automatically set virtual disk parameter values according to the virtual disk IO application type, and call the underlying interface to configure the virtual machine; the specific steps are as follows:
S431.判断虚拟磁盘IO模型;S431. Determine the virtual disk IO model;
S432.当虚拟磁盘IO模型为大块顺序读写时,采用虚拟化系统默认的簇大小和CPU二级缓存大小设置;进入步骤S434;S432. When the virtual disk IO model is large-block sequential read and write, the default cluster size and CPU L2 cache size settings of the virtualization system are used; enter step S434;
S433.当虚拟磁盘IO模型为小块随机读写时,设置簇大小为256K,设置CPU二级缓存大小=虚拟磁盘大小*8/簇大小,或者根据自定义接口获取数据对簇大小和CPU二级缓存大小进行设置;S433. When the virtual disk IO model is random read and write in small blocks, set the cluster size to 256K, set the CPU L2 cache size = virtual disk size * 8/cluster size, or obtain data from a custom interface to pair the cluster size and CPU 2 level cache size to set;
S434.调用底层接口对虚拟机进行配置。S434. Call the underlying interface to configure the virtual machine.
实施例3:Example 3:
如图3所示,本发明提供一种提高虚拟磁盘IO性能的系统,包括:As shown in FIG. 3, the present invention provides a system for improving virtual disk IO performance, including:
内核性能提升模块1,用于提升虚拟主机内核性能;Kernel
参数修改模块2,用于修改虚拟机管理工具libvirt的默认参数配置,使得虚拟机兼容windows和linux两种操作系统;参数修改模块2包括:The parameter modification module 2 is used to modify the default parameter configuration of the virtual machine management tool libvirt, so that the virtual machine is compatible with both Windows and Linux operating systems; the parameter modification module 2 includes:
缓存模式修改单元2.1,用于修改虚拟机管理工具Libvirt的xml配置文件,修改虚拟磁盘默认读写缓存模式为cache=none;The cache mode modification unit 2.1 is used to modify the xml configuration file of the virtual machine management tool Libvirt, and modify the default read and write cache mode of the virtual disk to cache=none;
磁盘文件调整配置单元2.2,用于修改虚拟机管理工具Libvirt的xml配置文件,对所有的虚拟磁盘读写缓存模式都增加io=native字段;Disk file adjustment configuration unit 2.2, used to modify the xml configuration file of the virtual machine management tool Libvirt, and add the io=native field to all virtual disk read-write cache modes;
IO应用类型提供模块3,用于为虚拟机用户配置可选IO应用类型,IO应用类型绑定IO模型;The IO application type provides module 3, which is used to configure optional IO application types for virtual machine users, and the IO application type is bound to the IO model;
虚拟机优化模块4,用于配置虚拟化系统自动对不同类型虚拟机进行优化;虚拟机优化模块4包括:The virtual machine optimization module 4 is used to configure the virtualization system to automatically optimize different types of virtual machines; the virtual machine optimization module 4 includes:
虚拟机操作系统类型判断单元4.1,用于获取虚拟机的操作系统类型和应用类型,判断虚拟机操作系统类型;The virtual machine operating system type judgment unit 4.1 is used to obtain the operating system type and application type of the virtual machine, and judge the virtual machine operating system type;
Windows操作系统虚拟机配置文件更改单元4.2,用于在windows操作系统,对虚拟机管理工具libvirt的xml配置文件中增加hyperv字段;The Windows operating system virtual machine configuration file changing unit 4.2 is used to add the hyperv field to the xml configuration file of the virtual machine management tool libvirt in the Windows operating system;
虚拟磁盘参数配置单元4.3,判断并根据虚拟磁盘IO应用类型,自动设置虚拟磁盘参数值,调用底层接口对虚拟机进行配置;虚拟磁盘参数配置单元4.3包括:The virtual disk parameter configuration unit 4.3 determines and automatically sets the virtual disk parameter value according to the virtual disk IO application type, and calls the underlying interface to configure the virtual machine; the virtual disk parameter configuration unit 4.3 includes:
IO模型判断子单元4.3.1,用于判断虚拟磁盘IO模型;The IO model judgment subunit 4.3.1 is used to judge the virtual disk IO model;
大块顺序读写设置子单元4.3.2,用于当虚拟磁盘IO模型为大块顺序读写时,采用虚拟化系统默认的簇大小和CPU二级缓存大小设置;Sub-unit 4.3.2 of large block sequential read and write setting is used to set the default cluster size and CPU L2 cache size of the virtualization system when the virtual disk IO model is large block sequential read and write;
小块随机读写设置子单元4.3.3,用于当虚拟磁盘IO模型为小块随机读写时,设置簇大小为256K,设置CPU二级缓存大小=虚拟磁盘大小*8/簇大小,或者根据自定义接口获取数据对簇大小和CPU二级缓存大小进行设置;Small block random read and write setting sub-unit 4.3.3 is used to set the cluster size to 256K when the virtual disk IO model is small block random read and write, and set the CPU L2 cache size = virtual disk size * 8/cluster size, or Set the cluster size and CPU L2 cache size according to the data obtained from the custom interface;
虚拟机配置子单元4.3.4,用于调用底层接口对虚拟机进行配置。The virtual machine configuration subunit 4.3.4 is used to call the underlying interface to configure the virtual machine.
尽管通过参考附图并结合优选实施例的方式对本发明进行了详细描述,但本发明并不限于此。在不脱离本发明的精神和实质的前提下,本领域普通技术人员可以对本发明的实施例进行各种等效的修改或替换,而这些修改或替换都应在本发明的涵盖范围内/任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。Although the present invention has been described in detail in conjunction with the preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, those of ordinary skill in the art can make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions should all fall within the scope of the present invention/any Those skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910819280.1A CN110703987B (en) | 2019-08-31 | 2019-08-31 | A method and system for improving virtual disk IO performance |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910819280.1A CN110703987B (en) | 2019-08-31 | 2019-08-31 | A method and system for improving virtual disk IO performance |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110703987A CN110703987A (en) | 2020-01-17 |
CN110703987B true CN110703987B (en) | 2022-07-22 |
Family
ID=69193902
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910819280.1A Active CN110703987B (en) | 2019-08-31 | 2019-08-31 | A method and system for improving virtual disk IO performance |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110703987B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102262557A (en) * | 2010-05-25 | 2011-11-30 | 运软网络科技(上海)有限公司 | Method for constructing virtual machine monitor by bus architecture and performance service framework |
CN103605630A (en) * | 2013-11-28 | 2014-02-26 | 中标软件有限公司 | Virtual server system and data reading-writing method thereof |
CN104144173A (en) * | 2013-05-06 | 2014-11-12 | 上海宏第网络科技有限公司 | A campus cloud platform system and method based on distributed virtual service technology |
-
2019
- 2019-08-31 CN CN201910819280.1A patent/CN110703987B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102262557A (en) * | 2010-05-25 | 2011-11-30 | 运软网络科技(上海)有限公司 | Method for constructing virtual machine monitor by bus architecture and performance service framework |
CN104144173A (en) * | 2013-05-06 | 2014-11-12 | 上海宏第网络科技有限公司 | A campus cloud platform system and method based on distributed virtual service technology |
CN103605630A (en) * | 2013-11-28 | 2014-02-26 | 中标软件有限公司 | Virtual server system and data reading-writing method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN110703987A (en) | 2020-01-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11573714B2 (en) | Compressibility instrumented dynamic volume provisioning | |
US9395920B2 (en) | Throttle disk I/O using disk drive simulation model | |
US7577959B2 (en) | Providing on-demand capabilities using virtual machines and clustering processes | |
US10579404B2 (en) | Provisioning virtual desktops with stub virtual disks | |
US10360060B2 (en) | Virtual machine monitor to I/O stack conduit in virtual real memory | |
US9423983B2 (en) | Intelligent storage controller | |
CN105224391B (en) | A kind of online backup method and system of virtual machine | |
US20070220121A1 (en) | Virtual machine migration between servers | |
US20060005189A1 (en) | Systems and methods for voluntary migration of a virtual machine between hosts with common storage connectivity | |
US20120089650A1 (en) | System and method for a storage system | |
CN101656718A (en) | Network server system and method for establishing and starting virtual machine thereof | |
US9395918B2 (en) | Dynamic record management including opening a virtual storage access method (VSAM) data set and modifying a VSAM control block structure | |
CN109690482A (en) | Virtual machine graphics processor allocation | |
WO2009150122A1 (en) | Systems and methods for virtualizing storage for wpar clients using node port id virtuali zation | |
CN106603618A (en) | Cloud platform-based application auto scaling method | |
US20220004411A1 (en) | Hot Growing A Cloud Hosted Block Device | |
WO2021169639A1 (en) | Method, system and device for bmc customization, and readable storage medium | |
CN112804375B (en) | A configuration method for single network card and multiple IPs | |
CN110703987B (en) | A method and system for improving virtual disk IO performance | |
CN113254151B (en) | Method and device for virtualizing supercomputer system | |
Meier et al. | IBM systems virtualization: Servers, storage, and software | |
US12014047B2 (en) | Stream based compressibility with auto-feedback | |
US20230359533A1 (en) | User Triggered Virtual Machine Cloning for Recovery/Availability/Scaling | |
CN114546552A (en) | A method, system, device and medium for publishing virtual desktop | |
WO2024220260A1 (en) | Power-management virtual machines |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |