[go: up one dir, main page]

CN103593224A - Virtual machine resource allocation system and method - Google Patents

Virtual machine resource allocation system and method Download PDF

Info

Publication number
CN103593224A
CN103593224A CN201210286556.2A CN201210286556A CN103593224A CN 103593224 A CN103593224 A CN 103593224A CN 201210286556 A CN201210286556 A CN 201210286556A CN 103593224 A CN103593224 A CN 103593224A
Authority
CN
China
Prior art keywords
virtual machine
resources
resource
specific resources
average service
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.)
Pending
Application number
CN201210286556.2A
Other languages
Chinese (zh)
Inventor
彭冠桥
叶建发
李忠一
林彦宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinyang Shenzhen Sea Network Intelligent Technology Co Ltd
Original Assignee
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hongfujin Precision Industry Shenzhen Co Ltd, Hon Hai Precision Industry Co Ltd filed Critical Hongfujin Precision Industry Shenzhen Co Ltd
Priority to CN201210286556.2A priority Critical patent/CN103593224A/en
Publication of CN103593224A publication Critical patent/CN103593224A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种虚拟机资源配置系统及方法,该方法包括:资料获取步骤,获取一台虚拟机特定资源的使用率;计算步骤,每隔一个分析周期,计算该虚拟机特定资源的平均使用率,并根据该虚拟机特定资源的平均使用率确定该虚拟机的资源层级;推荐步骤,根据该虚拟机的资源层级获取推荐的资源规格,并将该推荐的资源规格发送至用户端;配置步骤,当用户端接受该推荐的资源规格时,根据该推荐的资源规格重新为该虚拟机分配资源。利用本发明可以根据用户端虚拟机使用过程中特定资源使用率的变化,提供给用户推荐的资源规格。

Figure 201210286556

A virtual machine resource allocation system and method, the method comprising: a data acquisition step of obtaining the usage rate of a specific resource of a virtual machine; a calculation step of calculating the average usage rate of the specific resource of the virtual machine every other analysis cycle, and Determine the resource level of the virtual machine according to the average usage rate of the specific resource of the virtual machine; the recommending step is to obtain the recommended resource specification according to the resource level of the virtual machine, and send the recommended resource specification to the client; the configuration step, when When the client accepts the recommended resource specification, it re-allocates resources for the virtual machine according to the recommended resource specification. Utilizing the present invention can provide the user with recommended resource specifications according to the change of specific resource utilization rate during the use of the virtual machine at the user end.

Figure 201210286556

Description

虚拟机资源配置系统及方法Virtual machine resource configuration system and method

技术领域 technical field

本发明涉及一种云计算服务系统及方法,尤其涉及一种虚拟机资源配置系统及方法。The present invention relates to a cloud computing service system and method, in particular to a virtual machine resource configuration system and method.

背景技术 Background technique

云服务提供用户一种节省运算成本的解决方案,用户无须花费大量成本购买硬件,只要透过虚拟化的应用即可达到多台实体主机的运算目的。目前的云服务提供商主要有Amazon EC2、CloudShare或Citrix等,他们都提供不同特色的用户操作接口与服务。Cloud services provide users with a solution to save computing costs. Users do not need to spend a lot of money to purchase hardware, as long as the virtualized application can achieve the computing purpose of multiple physical hosts. The current cloud service providers mainly include Amazon EC2, CloudShare or Citrix, etc., and they all provide different user operation interfaces and services.

用户向云服务提供商申请虚拟机(Virtual Machine,VM)时,可以依据需求选择资源规格与价格,但用户在选择虚拟机资源时,可能无法准确预测将使用到多少资源,而选择太多或太少的资源将造成成本浪费。虽然部份厂商有提供用多少资源则付多少价钱的方案,但也可能因用户无法掌握虚拟机使用状况而造成预算超额使用。When users apply for a virtual machine (Virtual Machine, VM) from a cloud service provider, they can choose resource specifications and prices according to their needs. However, when users choose virtual machine resources, they may not be able to accurately predict how many resources will be used, and choose too many or Too few resources will result in wasted costs. Although some vendors offer a plan to pay as much as resources are used, it may also cause budget overuse because users cannot grasp the usage status of virtual machines.

发明内容 Contents of the invention

鉴于以上内容,有必要提供一种虚拟机资源配置系统,其可根据用户端虚拟机使用过程中特定资源使用率的变化,提供给用户推荐的资源规格,并根据该推荐的资源规格重新为该虚拟机分配资源。In view of the above, it is necessary to provide a virtual machine resource configuration system, which can provide the user with recommended resource specifications according to the changes in the utilization rate of specific resources during the use of the virtual machine at the client end, and reconfigure the virtual machine according to the recommended resource specifications. Virtual machines allocate resources.

鉴于以上内容,有必要提供一种虚拟机资源配置方法,其可根据用户端虚拟机使用过程中特定资源使用率的变化,提供给用户推荐的资源规格,并根据该推荐的资源规格重新为该虚拟机分配资源。In view of the above, it is necessary to provide a virtual machine resource configuration method, which can provide the user with a recommended resource specification according to the change of the specific resource usage rate during the use of the client virtual machine, and reconfigure the resource specification according to the recommended resource specification. Virtual machines allocate resources.

一种虚拟机资源配置系统,该系统包括:资料获取模块,用于获取一台虚拟机特定资源的使用率;计算模块,用于每隔一个分析周期,计算该虚拟机特定资源的平均使用率,并根据该虚拟机特定资源的平均使用率确定该虚拟机的资源层级;推荐模块,用于根据该虚拟机的资源层级获取推荐的资源规格,并将该推荐的资源规格发送至用户端;配置模块,用于当用户端接受该推荐的资源规格时,根据该推荐的资源规格重新为该虚拟机分配资源。A virtual machine resource configuration system, the system includes: a data acquisition module, used to obtain the usage rate of a specific resource of a virtual machine; a calculation module, used to calculate the average usage rate of the specific resource of the virtual machine every other analysis cycle , and determine the resource level of the virtual machine according to the average usage rate of the specific resource of the virtual machine; the recommendation module is used to obtain the recommended resource specification according to the resource level of the virtual machine, and send the recommended resource specification to the client; The configuration module is configured to re-allocate resources for the virtual machine according to the recommended resource specification when the client accepts the recommended resource specification.

一种虚拟机资源配置方法,该方法包括:资料获取步骤,获取一台虚拟机特定资源的使用率;计算步骤,每隔一个分析周期,计算该虚拟机特定资源的平均使用率,并根据该虚拟机特定资源的平均使用率确定该虚拟机的资源层级;推荐步骤,根据该虚拟机的资源层级获取推荐的资源规格,并将该推荐的资源规格发送至用户端;配置步骤,当用户端接受该推荐的资源规格时,根据该推荐的资源规格重新为该虚拟机分配资源。A method for configuring virtual machine resources, the method comprising: a data acquisition step of obtaining the usage rate of a specific resource of a virtual machine; a calculation step of calculating the average usage rate of the specific resource of the virtual machine every other analysis cycle, and according to the The average utilization rate of the specific resource of the virtual machine determines the resource level of the virtual machine; the recommendation step is to obtain the recommended resource specification according to the resource level of the virtual machine, and send the recommended resource specification to the client; the configuration step is to When the recommended resource specification is accepted, resources are re-allocated to the virtual machine according to the recommended resource specification.

相较于现有技术,所述的虚拟机资源配置系统及方法,其可实时监控用户端虚拟机的资源使用状况,根据用户端虚拟机使用过程中特定资源使用率的变化,提供给用户推荐的资源规格,并根据该推荐的资源规格重新为该虚拟机分配资源,避免用户申请过量或不足的资源。Compared with the prior art, the virtual machine resource configuration system and method can monitor the resource usage status of the client virtual machine in real time, and provide recommendations to the user according to changes in the utilization rate of specific resources during the use of the client virtual machine. resource specifications, and re-allocate resources for the virtual machine according to the recommended resource specifications, so as to prevent users from applying for excessive or insufficient resources.

本发明适合应用在提供IaaS(Infrastructure as a Service,基础设施即服务)的场景下,不仅让用户省下不必要的花费,也可提高服务提供商的硬件资源使用率。The present invention is suitable for application in the scenario of providing IaaS (Infrastructure as a Service), which not only saves unnecessary costs for users, but also improves the utilization rate of hardware resources of service providers.

附图说明 Description of drawings

图1是本发明控制服务器的网络架构图。Fig. 1 is a network architecture diagram of the control server of the present invention.

图2是本发明虚拟机资源配置系统的运行环境示意图。FIG. 2 is a schematic diagram of the operating environment of the virtual machine resource configuration system of the present invention.

图3是虚拟机资源配置系统的功能模块图。Fig. 3 is a functional block diagram of the virtual machine resource configuration system.

图4是本发明虚拟机资源配置方法的较佳实施例的流程图。Fig. 4 is a flow chart of a preferred embodiment of the method for configuring virtual machine resources in the present invention.

图5是多个数据库服务器的主/从架构示意图。FIG. 5 is a schematic diagram of a master/slave architecture of multiple database servers.

图6是多个数据库服务器分布式平行运算的示意图。FIG. 6 is a schematic diagram of distributed parallel computing of multiple database servers.

主要元件符号说明Description of main component symbols

  用户端 user terminal   1 1   控制服务器 control server   2 2   数据库服务器 database server   3 3   虚拟机服务器 Virtual machine server   4、5 4,5   虚拟机 virtual machine   41、42、51、52 41, 42, 51, 52   显示设备 display screen   20 20   输入设备 input device   22 twenty two   存储器 memory   23 twenty three   虚拟机资源配置系统 Virtual machine resource configuration system   24 twenty four   处理器 Processor   25 25   资料获取模块  Data Acquisition Module   240 240   计算模块 Computing module   241 241   推荐模块 Recommended modules   242 242   配置模块 configuration module   243 243

具体实施方式 Detailed ways

如图1所示,是本发明控制服务器的网络架构图。在本实施例中,所述控制服务器2通过网络与多个用户端1(图中仅示出一个)、多个数据库服务器3(图中仅示出一个)、多个虚拟机服务器(图1中为虚拟机服务器4和5)相连。所述网络可以是企业内部网(Intranet),也可以是互联网(Internet)或其它类型的通讯网络,如GPRS、Wi-Fi/WLAN、3G/WCDMA、3.5G/HSDPA等。As shown in FIG. 1, it is a network architecture diagram of the control server of the present invention. In this embodiment, the control server 2 communicates with a plurality of client terminals 1 (only one is shown in the figure), a plurality of database servers 3 (only one is shown in the figure), and a plurality of virtual machine servers (only one is shown in FIG. 1 ) through a network. The virtual machine servers 4 and 5) are connected. The network may be an intranet, the Internet, or other types of communication networks, such as GPRS, Wi-Fi/WLAN, 3G/WCDMA, 3.5G/HSDPA, and the like.

其中,每台虚拟机服务器中都安装有虚拟机监控程序,用于每隔预定时间,监控用户端1虚拟机的特定资源的使用率,并将监控得到的虚拟机特定资源的使用率发送至控制服务器2。例如,虚拟机服务器4监控虚拟机41和42的资源使用率,虚拟机服务器5监控虚拟机51和52的资源使用率。在本实施例中,所述特定资源使用率包括三种类型,CPU使用率(CPU%)、内存使用率(Memory%)和硬盘使用率(Disk%)。在其他实施例中,也可以增加或减少资源使用率的类型。Wherein, each virtual machine server is installed with a virtual machine monitoring program, which is used to monitor the utilization rate of the specific resource of the virtual machine of the client 1 every predetermined time, and send the monitored utilization rate of the specific resource of the virtual machine to Control server 2. For example, virtual machine server 4 monitors resource usage rates of virtual machines 41 and 42 , and virtual machine server 5 monitors resource usage rates of virtual machines 51 and 52 . In this embodiment, the specific resource usage includes three types, CPU usage (CPU%), memory usage (Memory%), and hard disk usage (Disk%). In other embodiments, the type of resource usage may also be increased or decreased.

控制服务器2作为虚拟机服务器中心,根据虚拟机的名称将每个虚拟机的资源使用率存到对应的数据表中。例如,虚拟机41的资源使用率存储到数据表Table41,虚拟机42的资源使用率存储到数据表Table42。其中,每个数据表包括以下栏位,虚拟机名称、ID、CPU使用率、内存使用率、硬盘使用率与存储时间等。The control server 2 acts as a virtual machine server center, and stores the resource utilization rate of each virtual machine in a corresponding data table according to the name of the virtual machine. For example, the resource usage rate of the virtual machine 41 is stored in the data table Table41, and the resource usage rate of the virtual machine 42 is stored in the data table Table42. Wherein, each data table includes the following fields, virtual machine name, ID, CPU usage, memory usage, hard disk usage, and storage time.

在本实施例中,所述多个数据库服务器3提供分布式平行运算功能。参阅图5所示,所述多个数据库服务器3的架构为主从式架构(Master/Slave),由一台主服务器(Master Server)负责分割数据并分配到不同的从服务器(Slave Server),从服务器负责运算分配到的数据,并将结果回传给主服务器,主服务器再将汇总的数据传给控制服务器2,以进一步进行运算。In this embodiment, the multiple database servers 3 provide distributed parallel computing functions. Referring to Fig. 5, the architecture of the plurality of database servers 3 is a master-slave architecture (Master/Slave), and a master server (Master Server) is responsible for dividing data and distributing it to different slave servers (Slave Server), The slave server is responsible for calculating the allocated data, and returns the result to the master server, and the master server then transmits the aggregated data to the control server 2 for further calculation.

如图2所示,是本发明虚拟机资源配置系统的运行环境示意图。该虚拟机资源配置系统运行于控制服务器2中。该控制服务器2还包括通过数据总线相连的显示设备20、输入设备22、存储器23和处理器25。As shown in FIG. 2 , it is a schematic diagram of the operating environment of the virtual machine resource configuration system of the present invention. The virtual machine resource configuration system runs on the control server 2 . The control server 2 also includes a display device 20 , an input device 22 , a memory 23 and a processor 25 connected via a data bus.

所述存储器23用于存储所述虚拟机资源配置系统24的程序代码和虚拟机资源使用率的数据表等资料。所述显示设备20用于显示虚拟机的资源使用率等资料。所述输入设备22用于输入用户设置的各种数据,如虚拟机的名称等。The memory 23 is used to store the program code of the virtual machine resource allocation system 24 and data tables of virtual machine resource utilization and other materials. The display device 20 is used for displaying information such as the resource usage rate of the virtual machine. The input device 22 is used to input various data set by the user, such as the name of the virtual machine and so on.

所述虚拟机资源配置系统24用于根据用户端1虚拟机使用过程中特定资源使用率的变化,提供给用户推荐的资源规格,并根据该推荐的资源规格重新为该虚拟机分配资源,具体过程以下描述。The virtual machine resource configuration system 24 is used to provide the user with recommended resource specifications according to changes in the specific resource usage rate during the use of the virtual machine at the client terminal 1, and to re-allocate resources for the virtual machine according to the recommended resource specifications, specifically The procedure is described below.

在本实施例中,所述虚拟机资源配置系统24可以被分割成一个或多个模块,所述一个或多个模块被存储在所述存储器23中并被配置成由一个或多个处理器(本实施例为一个处理器25)执行,以完成本发明。例如,参阅图3所示,所述虚拟机资源配置系统24被分割成资料获取模块240、计算模块241、推荐模块242和配置模块243。本发明所称的模块是完成一特定功能的程序段,比程序更适合于描述软件在控制服务器2中的执行过程。以下将结合图4说明各模块的具体功能。In this embodiment, the virtual machine resource configuration system 24 can be divided into one or more modules, and the one or more modules are stored in the memory 23 and configured to be processed by one or more processors (this embodiment is a processor 25) to complete the present invention. For example, referring to FIG. 3 , the virtual machine resource configuration system 24 is divided into a data acquisition module 240 , a calculation module 241 , a recommendation module 242 and a configuration module 243 . The module referred to in the present invention is a program segment that completes a specific function, and is more suitable than a program to describe the execution process of software in the control server 2 . The specific functions of each module will be described below with reference to FIG. 4 .

如图4所示,是本发明虚拟机资源配置方法的较佳实施例的流程图。As shown in FIG. 4 , it is a flowchart of a preferred embodiment of the virtual machine resource configuration method of the present invention.

步骤S10,用户通过用户端1登录到虚拟机管理界面,启动一台虚拟机(如虚拟机41)。其中包含选择该虚拟机的资源规格、价格与安全机制等。假设用户初始选择的资源规格为(CPU,内存,硬盘)=(2.5GB,4GB,200GB)。Step S10 , the user logs in to the virtual machine management interface through the user terminal 1 and starts a virtual machine (such as the virtual machine 41 ). It includes selecting the resource specification, price and security mechanism of the virtual machine. Assume that the resource specification initially selected by the user is (CPU, memory, hard disk) = (2.5GB, 4GB, 200GB).

步骤S11,资料获取模块240获取虚拟机服务器侦测到的该虚拟机特定资源的使用率,并将该虚拟机特定资源的使用率存储于一个数据表。例如,资料获取模块240每隔1分钟,获取虚拟机服务器侦测到的该虚拟机特定资源的使用率,如CPU使用率、内存使用率和硬盘使用率。In step S11, the data obtaining module 240 obtains the usage rate of the specific resource of the virtual machine detected by the virtual machine server, and stores the usage rate of the specific resource of the virtual machine in a data table. For example, the data acquisition module 240 acquires the usage rate of the specific resource of the virtual machine detected by the virtual machine server, such as the CPU usage rate, the memory usage rate and the hard disk usage rate, every minute.

步骤S12,计算模块241每隔一个分析周期,计算该虚拟机特定资源的平均使用率,并根据该虚拟机特定资源的平均使用率确定该虚拟机的资源层级。其中,该虚拟机的资源层级包括每种特定资源的平均使用率层级。In step S12, the calculation module 241 calculates the average usage rate of the specific resource of the virtual machine every other analysis period, and determines the resource level of the virtual machine according to the average usage rate of the specific resource of the virtual machine. Wherein, the resource level of the virtual machine includes an average utilization rate level of each specific resource.

其中,所述计算模块241运用分布式平行运算(分割与合并),计算该虚拟机特定资源的平均使用率。当需要对一个虚拟机的特定资源使用率进行分析时,计算模块241依据该虚拟机特定资源使用率的获取时间顺序,将该虚拟机特定资源使用率分割成不同区块(Split),并将各区块分派给不同的数据库服务器3进行平行加法运算。Wherein, the computing module 241 uses distributed parallel computing (segmentation and merging) to calculate the average usage rate of the specific resource of the virtual machine. When the specific resource usage of a virtual machine needs to be analyzed, the calculation module 241 divides the specific resource usage of the virtual machine into different blocks (Split) according to the acquisition time sequence of the specific resource usage of the virtual machine, and Each block is assigned to different database servers 3 for parallel addition operations.

例如,参阅图6所示,计算模块241将每10笔资料分割成一个区块,得到区块split1、split2、…、splitm,其中,区块split1包括时间点为time1至time10的CPU使用率、内存使用率、硬盘使用率,区块split2包括时间点为time11至time20的CPU使用率、内存使用率、硬盘使用率。然后,计算模块241将区块split1分派给从服务器1进行加法运算,将区块split2分派给从服务器2进行加法运算等等,并将运算结果传回至控制服务器2。For example, as shown in FIG. 6, the calculation module 241 divides every 10 pieces of data into a block to obtain blocks split 1 , split 2 , ..., split m , wherein the block split 1 includes time points from time 1 to time The CPU usage, memory usage, and hard disk usage of 10 , block split 2 includes the CPU usage, memory usage, and hard disk usage from time 11 to time 20 . Then, the calculation module 241 assigns the block split 1 to the slave server 1 for addition operation, assigns the block split 2 to the slave server 2 for addition operation, etc., and sends back the operation result to the control server 2 .

计算模块241对每台从服务器算出的总和进行分组,同一组的数据再进行加总获得分组总和。接着,计算模块241再将所有分组总和加总得出最终加总值。最后,计算模块241再将最终加总值除以记录数获得特定资源的平均使用率,如CPU平均使用率、内存平均使用率、硬盘平均使用率。The calculation module 241 groups the sums calculated by each slave server, and adds up the data of the same group to obtain the group sum. Next, the calculation module 241 sums up all group sums to obtain a final summation value. Finally, the calculation module 241 divides the final total value by the number of records to obtain the average usage rate of specific resources, such as the average CPU usage rate, the average memory usage rate, and the average hard disk usage rate.

例如,参阅图6所示,n代表周期(即记录数),i代表时间点,Ci代表时间点i的CPU使用率,Mi代表时间点i的内存使用率,Di代表时间点i的硬盘使用率,C′代表CPU平均使用率,M′代表内存平均使用率,D′代表硬盘平均使用率。For example, as shown in Figure 6, n represents the period (that is, the number of records), i represents the time point, C i represents the CPU usage rate at time point i, M i represents the memory usage rate at time point i, and D i represents time point i C' represents the average CPU usage, M' represents the average memory usage, and D' represents the average hard disk usage.

在本实施例中,以三种资源类型为例进行说明,每种资源的平均使用率被两个阀值分成三个层级。根据该虚拟机特定资源的平均使用率确定该虚拟机的资源层级的方法为:In this embodiment, three types of resources are taken as examples for illustration, and the average usage rate of each resource is divided into three levels by two thresholds. The method of determining the resource level of the virtual machine according to the average utilization rate of the specific resource of the virtual machine is as follows:

如果第一类型资源的平均使用率(如CPU平均使用率)小于或等于第一阀值(如20%),则确定该第一类型资源的平均使用率为层级一,记为I;If the average usage rate of the first type of resource (such as the average CPU usage rate) is less than or equal to the first threshold (such as 20%), then determine the average usage rate of the first type of resource level one, denoted as I;

如果第一类型资源的平均使用率大于第一阀值,且小于或等于第二阀值(70%),则确定该第一类型资源的平均使用率为层级二,记为II;If the average usage rate of the first type of resource is greater than the first threshold and less than or equal to the second threshold (70%), then determine the average usage rate of the first type of resource as level two, denoted as II;

如果第一类型资源的平均使用率大于第二阀值,则确定该第一类型资源的平均使用率为层级三,记为III。If the average utilization rate of the first type resource is greater than the second threshold, then determine the average utilization rate of the first type resource as level three, denoted as III.

同理,如果第二类型资源的平均使用率(如内存平均使用率)小于或等于第三阀值(如40%),则确定该第二类型资源的平均使用率为层级一,记为A;Similarly, if the average usage rate of the second type of resource (such as the average memory usage rate) is less than or equal to the third threshold (such as 40%), then determine the average usage rate of the second type of resource level 1, denoted as A ;

如果第二类型资源的平均使用率大于第三阀值,且小于或等于第四阀值(80%),则确定该第二类型资源的平均使用率为层级二,记为B;If the average usage rate of the second-type resource is greater than the third threshold and less than or equal to the fourth threshold (80%), then determine the average usage rate of the second-type resource as Level 2, denoted as B;

如果第二类型资源的平均使用率大于第四阀值,则确定该第二类型资源的平均使用率为层级三,记为C。If the average usage rate of the second type resource is greater than the fourth threshold, then determine the average usage rate of the second type resource as Level 3, denoted as C.

同理,如果第三类型资源的平均使用率(如硬盘平均使用率)小于或等于第五阀值(如30%),则确定该第三类型资源的平均使用率为层级一,记为i;Similarly, if the average usage rate of the third type of resource (such as the average usage rate of the hard disk) is less than or equal to the fifth threshold (such as 30%), then determine the average usage rate of the third type of resource level 1, denoted as i ;

如果第三类型资源的平均使用率大于第五阀值,且小于或等于第六阀值(60%),则确定该第三类型资源的平均使用率为层级二,记为ii;If the average usage rate of the third type of resource is greater than the fifth threshold and less than or equal to the sixth threshold (60%), then determine the average usage rate of the third type of resource as Level 2, denoted as ii;

如果第三类型资源的平均使用率大于第六阀值,则确定该第三类型资源的平均使用率为层级三,记为iii。If the average utilization rate of the third-type resource is greater than the sixth threshold, then determine the average utilization rate of the third-type resource as Level 3, denoted as iii.

举例而言,假设SpecCPU代表CPU平均使用率的层级,SpecMEM代表内存平均使用率的层级,SpecDisk代表硬盘平均使用率的层级,Spec(SpecCPU,SpecMEM,SpecDisk)代表该虚拟机的资源层级,则确定该虚拟机资源层级的算法如下。For example, assume that Spec CPU represents the level of average CPU usage, Spec MEM represents the level of average memory usage, Spec Disk represents the level of average hard disk usage, and Spec(Spec CPU , Spec MEM , Spec Disk ) represents the virtual machine the resource level of the virtual machine, the algorithm for determining the resource level of the virtual machine is as follows.

If(C’≤Threshold1)SpecCPU=I;If(C'≤Threshold 1 )Spec CPU =I;

Else if(Threshold1<C’≤Threshold2)SpecCPU=II;Else if(Threshold 1 <C'≤Threshold 2 )Spec CPU =II;

Else if(Threshold2<C’)SpecCPU=III;Else if(Threshold 2 <C')Spec CPU =III;

If(M’≤Threshold3)SpecMEM=A;If(M'≤Threshold 3 )Spec MEM =A;

Else if(Threshold3<M’≤Threshold4)SpecMEM=B;Else if(Threshold 3 <M'≤Threshold 4 )Spec MEM =B;

Else if(Threshold4<M’)SpecMEM=C;Else if(Threshold 4 <M')Spec MEM =C;

If(D’≤Threshold5)SpecDisk=i;If(D'≤Threshold 5 )Spec Disk =i;

Else if(Threshold5<D’≤Threshold6)SpecDisk=ii;Else if(Threshold 5 <D'≤Threshold 6 )Spec Disk =ii;

Else if(Threshold6<D’)SpecDisk=iii。Else if(Threshold 6 <D')Spec Disk =iii.

其中,Threshold1至Threshold6分别代表第一阀值至第六阀值。Wherein, Threshold 1 to Threshold 6 respectively represent the first threshold to the sixth threshold.

在本实施例中,每种特定资源的平均使用率被两个阀值分成三个层级,其中,CPU平均使用率被分为I、II、III三个层级,内存平均使用率被分为A、B、C三个层级,硬盘平均使用率被分为i、ii、iii三个层级。因此,根据排列组合可以得到27种不同的虚拟机资源层级,每种资源层级都预设有推荐的资源规格,层级越低分配的资源越少,层级越高分配的资源越多。例如,Spec(I,A,i)代表三项资源的平均使用率都较低,则推荐使用低资源规格。Spec(III,C,iii)代表三项资源的平均使用率都较高,则推荐使用高资源规格。In this embodiment, the average usage rate of each specific resource is divided into three levels by two thresholds, wherein the average CPU usage rate is divided into three levels I, II, and III, and the average memory usage rate is divided into A , B, and C levels, and the average hard disk usage rate is divided into three levels i, ii, and iii. Therefore, 27 different virtual machine resource levels can be obtained according to the arrangement and combination. Each resource level is preset with recommended resource specifications. The lower the level, the less resources are allocated, and the higher the level, the more resources are allocated. For example, Spec(I, A, i) represents that the average usage rates of the three resources are all low, and it is recommended to use a low resource specification. Spec (III, C, iii) means that the average utilization rate of the three resources is high, so it is recommended to use a high resource specification.

在其他实施例中,也可以通过增加或减少阀值,组合得到其他不同的虚拟机资源层级,方法类似,在此不再赘述。In other embodiments, other different virtual machine resource levels can also be combined by increasing or decreasing the threshold, the method is similar, and will not be repeated here.

步骤S13,推荐模块242根据该虚拟机的资源层级获取推荐的资源规格,并将该推荐的资源规格发送至用户端1。例如,假设计算出的CPU平均使用率C′=60%,内存平均使用率M′=85,硬盘平均使用率D′=20%,则可得知:Step S13 , the recommendation module 242 obtains the recommended resource specification according to the resource level of the virtual machine, and sends the recommended resource specification to the client terminal 1 . For example, assuming that the calculated average CPU usage C'=60%, the average memory usage M'=85, and the hard disk average usage D'=20%, it can be known that:

Threshold1<60%<Threshold2,SpecCPU=I;Threshold 1 <60%<Threshold 2 , Spec CPU =I;

Threshold4<85%,SpecMEM=C;Threshold 4 <85%, Spec MEM =C;

20%<Threshold5,SpecDisk=i;20%<Threshold 5 , Spec Disk = i;

则该虚拟机的资源层级Spec(SpecCPU,SpecMEM,SpecDisk)=Spec(I,C,i),假设资源层级(I,C,i)推荐的资源规格为:Then the resource level of the virtual machine Spec(Spec CPU , Spec MEM , Spec Disk )=Spec(I, C, i), assuming that the resource specification recommended by the resource level (I, C, i) is:

CPU={500MB,…,1.75GB},CPU = {500MB,...,1.75GB},

内存={3.2GB,…,4GB},memory = {3.2GB,...,4GB},

硬盘={最低容量,…,60GB}。Hard disk = {minimum capacity, ..., 60GB}.

用户可自行选择上述范围内的资源项目,或自行输入上述范围内的值或由推荐模块242推荐固定的资源项目给用户。其中,上述修改可以在虚拟机运行时完成(Hot Plug),也可以暂停虚拟机运行后再修改完成。The user can select a resource item within the above range by himself, or input a value within the above range by himself, or the recommendation module 242 recommends a fixed resource item to the user. Among them, the above modification can be completed while the virtual machine is running (Hot Plug), or the modification can be completed after the virtual machine is suspended.

步骤S14,配置模块243判断用户端1是否接受推荐的资源规格。例如,如果用户选择特定的资源规格(500MB,3.2GB,20GB)或选择由推荐模块242推荐固定的资源项目,则判定用户端1接受推荐的资源规格,执行步骤S15。如果用户端1没有接受推荐的资源规格,则流程结束。In step S14, the configuration module 243 determines whether the user terminal 1 accepts the recommended resource specification. For example, if the user selects a specific resource specification (500MB, 3.2GB, 20GB) or selects a fixed resource item recommended by the recommendation module 242, it is determined that the user terminal 1 accepts the recommended resource specification, and step S15 is performed. If the user terminal 1 does not accept the recommended resource specification, the process ends.

步骤S15,配置模块243根据该推荐的资源规格重新为该虚拟机分配资源。例如,如果用户在该推荐的资源规格中选择(500MB,3.2GB,20GB),则配置模块243根据该用户选择的资源规则重新为该虚拟机分配资源。如果用户选择由控制服务器2推荐固定的资源项目,则配置模块243从该推荐的资源规格中随机或按照预定的顺序(如资源从小到大的顺序)选取特定的资源。In step S15, the configuration module 243 re-allocates resources for the virtual machine according to the recommended resource specification. For example, if the user selects (500MB, 3.2GB, 20GB) in the recommended resource specifications, the configuration module 243 re-allocates resources for the virtual machine according to the resource rules selected by the user. If the user chooses that the control server 2 recommends a fixed resource item, the configuration module 243 selects a specific resource from the recommended resource specifications randomly or in a predetermined order (such as the order of resources from small to large).

其中,用户初始选择的资源规格,即(CPU,内存,硬盘)=(2.5GB,4GB,200GB),不会被该推荐的资源规格覆盖,将保存于存储器23中。Wherein, the resource specification initially selected by the user, ie (CPU, memory, hard disk)=(2.5GB, 4GB, 200GB), will not be overwritten by the recommended resource specification and will be stored in the memory 23 .

在其他实施例中,所述数据库服务器3也可以为一台,甚至可以将控制服务器2和数据库服务器3合并为一台服务器。进一步地,虚拟机服务器4也可以为一台,甚至可以将控制服务器2和虚拟机服务器4合并为一台服务器。In other embodiments, the database server 3 can also be one, and even the control server 2 and the database server 3 can be combined into one server. Further, the virtual machine server 4 can also be one, and even the control server 2 and the virtual machine server 4 can be combined into one server.

最后应说明的是,以上实施例仅用以说明本发明的技术方案而非限制,尽管参照较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或等同替换,而不脱离本发明技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention without limitation. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be Modifications or equivalent replacements can be made without departing from the spirit and scope of the technical solutions of the present invention.

Claims (14)

1. a resources of virtual machine configuration-system, is characterized in that, this system comprises:
Data acquisition module, for obtaining the utilization rate of a virtual machine specific resources;
Computing module, for every an analytical cycle, calculates the average service rate of this virtual machine specific resources, and according to the average service rate of this virtual machine specific resources, determines the resource level of this virtual machine;
Recommending module, for obtain the resource specification of recommendation according to the resource level of this virtual machine, and is sent to user side by the resource specification of this recommendation; And
Configuration module when accepting the resource specification of this recommendation when user side, is this virtual machine Resources allocation according to the resource specification of this recommendation again.
2. resources of virtual machine configuration-system as claimed in claim 1, is characterized in that, described computing module uses distributed parallel calculation method to calculate the average service rate of this virtual machine specific resources.
3. resources of virtual machine configuration-system as claimed in claim 2, is characterized in that, described distributed parallel calculation method is:
Acquisition time order according to this virtual machine specific resources utilization rate, is divided into different blocks by the utilization rate of this virtual machine specific resources, and each block is divided and tasks different database servers and carry out parallel addition computing;
The operation result that gathers all database servers, the operation result gathering according to this calculates the average service rate of this virtual machine specific resources.
4. resources of virtual machine configuration-system as claimed in claim 1, is characterized in that, the resource level of this virtual machine comprises the average service rate level of every kind of specific resources.
5. resources of virtual machine configuration-system as claimed in claim 4, is characterized in that, the threshold values that the average service rate of every kind of specific resources is preset is divided into a plurality of levels.
6. resources of virtual machine configuration-system as claimed in claim 5, is characterized in that, the quantity of the pre-set threshold value that every kind of specific resources is corresponding is two, and the average service rate of every kind of specific resources is divided into three levels by two threshold values.
7. resources of virtual machine configuration-system as claimed in claim 1, is characterized in that, the resource specification of this recommendation can not cover the resource specification of this virtual machine initial setting.
8. a resources of virtual machine collocation method, is characterized in that, the method comprises:
Data obtaining step, obtains the utilization rate of a virtual machine specific resources;
Calculation procedure, every an analytical cycle, calculates the average service rate of this virtual machine specific resources, and according to the average service rate of this virtual machine specific resources, determines the resource level of this virtual machine;
Recommendation step, obtains the resource specification of recommendation according to the resource level of this virtual machine, and the resource specification of this recommendation is sent to user side; And
Configuration step, when user side is accepted the resource specification of this recommendation, is this virtual machine Resources allocation according to the resource specification of this recommendation again.
9. resources of virtual machine collocation method as claimed in claim 8, is characterized in that, the average service rate of this virtual machine specific resources obtains according to distributed parallel calculation method.
10. resources of virtual machine collocation method as claimed in claim 9, is characterized in that, described distributed parallel calculation method is:
Acquisition time order according to this virtual machine specific resources utilization rate, is divided into different blocks by the utilization rate of this virtual machine specific resources, and each block is divided and tasks different database servers and carry out parallel addition computing;
The operation result that gathers all database servers, the operation result gathering according to this calculates the average service rate of this virtual machine specific resources.
11. resources of virtual machine collocation methods as claimed in claim 8, is characterized in that, the resource level of this virtual machine comprises the average service rate level of every kind of specific resources.
12. resources of virtual machine collocation methods as claimed in claim 11, is characterized in that, the threshold values that the average service rate of every kind of specific resources is preset is divided into a plurality of levels.
13. resources of virtual machine collocation methods as claimed in claim 12, is characterized in that, the quantity of the pre-set threshold value that every kind of specific resources is corresponding is two, and the average service rate of every kind of specific resources is divided into three levels by two threshold values.
14. resources of virtual machine collocation methods as claimed in claim 8, is characterized in that, the resource specification of this recommendation can not cover the resource specification of this virtual machine initial setting.
CN201210286556.2A 2012-08-13 2012-08-13 Virtual machine resource allocation system and method Pending CN103593224A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210286556.2A CN103593224A (en) 2012-08-13 2012-08-13 Virtual machine resource allocation system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210286556.2A CN103593224A (en) 2012-08-13 2012-08-13 Virtual machine resource allocation system and method

Publications (1)

Publication Number Publication Date
CN103593224A true CN103593224A (en) 2014-02-19

Family

ID=50083380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210286556.2A Pending CN103593224A (en) 2012-08-13 2012-08-13 Virtual machine resource allocation system and method

Country Status (1)

Country Link
CN (1) CN103593224A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105320559A (en) * 2014-07-30 2016-02-10 中国移动通信集团广东有限公司 Scheduling method and device of cloud computing system
CN105912403A (en) * 2016-04-14 2016-08-31 青岛海信传媒网络技术有限公司 Resource management method and device of Docker container
CN107463433A (en) * 2017-08-18 2017-12-12 郑州云海信息技术有限公司 The method and apparatus for managing the resource of virtual machine
CN109753338A (en) * 2017-11-06 2019-05-14 阿里巴巴集团控股有限公司 The detection method and device of virtual GPU utilization rate
CN109901912A (en) * 2019-03-01 2019-06-18 厦门容能科技有限公司 A method of recommending the configuration of cloud host
CN111682971A (en) * 2020-07-23 2020-09-18 拉货宝网络科技有限责任公司 Logistics system resource automatic management method
CN111752712A (en) * 2020-06-28 2020-10-09 中国银行股份有限公司 Method and device for improving resource utilization rate of virtual machine
CN111767150A (en) * 2020-07-02 2020-10-13 中国铁建重工集团股份有限公司 A dynamic adjustment method of vGPU resources
CN113569137A (en) * 2021-07-06 2021-10-29 北京汇钧科技有限公司 Recommendation method and device for cloud host specification, storage medium and electronic device
CN114067593A (en) * 2021-11-15 2022-02-18 国汽智控(北京)科技有限公司 Communication method and system of vehicle and cloud server

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101656657A (en) * 2008-08-19 2010-02-24 国际商业机器公司 Method and system for determining resource utilization rate of each tenant in multi-tenant architecture
CN101826028A (en) * 2009-02-02 2010-09-08 三星电子株式会社 Electronic device, virtual machine providing device and method for using virtual machine service
CN101887377A (en) * 2009-05-13 2010-11-17 佳能株式会社 License management system and license management method
CN101916281A (en) * 2010-08-17 2010-12-15 上海云数信息科技有限公司 Concurrent computational system and non-repetition counting method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101656657A (en) * 2008-08-19 2010-02-24 国际商业机器公司 Method and system for determining resource utilization rate of each tenant in multi-tenant architecture
CN101826028A (en) * 2009-02-02 2010-09-08 三星电子株式会社 Electronic device, virtual machine providing device and method for using virtual machine service
CN101887377A (en) * 2009-05-13 2010-11-17 佳能株式会社 License management system and license management method
CN101916281A (en) * 2010-08-17 2010-12-15 上海云数信息科技有限公司 Concurrent computational system and non-repetition counting method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
梅彼得: "XEN虚拟机资源分配策略研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105320559B (en) * 2014-07-30 2019-02-19 中国移动通信集团广东有限公司 A scheduling method and device for a cloud computing system
CN105320559A (en) * 2014-07-30 2016-02-10 中国移动通信集团广东有限公司 Scheduling method and device of cloud computing system
CN105912403A (en) * 2016-04-14 2016-08-31 青岛海信传媒网络技术有限公司 Resource management method and device of Docker container
CN107463433A (en) * 2017-08-18 2017-12-12 郑州云海信息技术有限公司 The method and apparatus for managing the resource of virtual machine
CN109753338B (en) * 2017-11-06 2023-03-21 阿里巴巴集团控股有限公司 Virtual GPU (graphics processing Unit) utilization rate detection method and device
CN109753338A (en) * 2017-11-06 2019-05-14 阿里巴巴集团控股有限公司 The detection method and device of virtual GPU utilization rate
CN109901912A (en) * 2019-03-01 2019-06-18 厦门容能科技有限公司 A method of recommending the configuration of cloud host
CN111752712A (en) * 2020-06-28 2020-10-09 中国银行股份有限公司 Method and device for improving resource utilization rate of virtual machine
CN111752712B (en) * 2020-06-28 2023-08-18 中国银行股份有限公司 Method and device for improving resource utilization rate of virtual machine
CN111767150A (en) * 2020-07-02 2020-10-13 中国铁建重工集团股份有限公司 A dynamic adjustment method of vGPU resources
CN111682971A (en) * 2020-07-23 2020-09-18 拉货宝网络科技有限责任公司 Logistics system resource automatic management method
CN113569137A (en) * 2021-07-06 2021-10-29 北京汇钧科技有限公司 Recommendation method and device for cloud host specification, storage medium and electronic device
CN113569137B (en) * 2021-07-06 2024-06-18 北京汇钧科技有限公司 Recommendation method and device for cloud host specification, storage medium and electronic device
CN114067593A (en) * 2021-11-15 2022-02-18 国汽智控(北京)科技有限公司 Communication method and system of vehicle and cloud server
CN114067593B (en) * 2021-11-15 2024-02-13 国汽智控(北京)科技有限公司 Communication method and system of vehicle and cloud server

Similar Documents

Publication Publication Date Title
CN103593224A (en) Virtual machine resource allocation system and method
TW201407476A (en) System and method for allocating resource of virtual machine
US10587682B2 (en) Resource allocation diagnosis on distributed computer systems
US10613907B2 (en) Resource substitution and reallocation in a virtual computing environment
US8612577B2 (en) Systems and methods for migrating software modules into one or more clouds
CN106326002B (en) Resource scheduling method, device and device
US20190213647A1 (en) Numa-based client placement
US8799897B2 (en) Automated cost calculation for virtualized infrastructure
US9298512B2 (en) Client placement in a computer network system using dynamic weight assignments on resource utilization metrics
US20120131174A1 (en) Systems and methods for identifying usage histories for producing optimized cloud utilization
JP7614703B2 (en) Tuning the Performance of Computing Systems
US10411969B2 (en) Backend resource costs for online service offerings
CN105830392A (en) Method, node and computer program for enabling allocation of resource components
CN113168398A (en) Upgrade determination for telemetry data based devices
US20180246763A1 (en) Computer system management method and computer system
US10476766B1 (en) Selecting and configuring metrics for monitoring
US20180374110A1 (en) Cost-driven approach to determine inventory layout in cloud computing environments
CN114219468A (en) Micro-service charging method and device based on private container cloud and related components
US20190251606A1 (en) Per-tenant cost calculation in multi-tenant data storage system
US12045664B1 (en) Classifying workloads for burstable compute platforms
US9818137B1 (en) Estimating the operating cost of computing resources provided by a service provider
Wesner Towards Usage-Based Dynamic Overbooking in IaaS Clouds
Abo-Rizka et al. Multi-agents based framework for selecting cloud service provider
HK1233001A1 (en) Resource scheduling method, device and apparatus
HK1233001A (en) Resource scheduling method, device and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20160621

Address after: 518000 Guangdong Province, Shenzhen New District of Longhua City, Dalang street, Hua Sheng Lu Yong Jingxuan commercial building 1608

Applicant after: Jinyang Shenzhen sea Network Intelligent Technology Co., Ltd.

Address before: 518109 Guangdong city of Shenzhen province Baoan District Longhua Town Industrial Zone tabulaeformis tenth East Ring Road No. 2 two

Applicant before: Hongfujin Precise Industry (Shenzhen) Co., Ltd.

Applicant before: Hon Hai Precision Industry Co., Ltd.

RJ01 Rejection of invention patent application after publication

Application publication date: 20140219

RJ01 Rejection of invention patent application after publication