US20140040895A1 - Electronic device and method for allocating resources for virtual machines - Google Patents
Electronic device and method for allocating resources for virtual machines Download PDFInfo
- Publication number
- US20140040895A1 US20140040895A1 US13/955,000 US201313955000A US2014040895A1 US 20140040895 A1 US20140040895 A1 US 20140040895A1 US 201313955000 A US201313955000 A US 201313955000A US 2014040895 A1 US2014040895 A1 US 2014040895A1
- Authority
- US
- United States
- Prior art keywords
- specified resources
- resources
- virtual machine
- usage
- usage rates
- 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.)
- Abandoned
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5077—Logical partitioning of resources; Management or configuration of virtualized resources
Definitions
- Embodiments of the present disclosure relate to cloud computing technology, and particularly to an electronic device and method for allocating resources for virtual machines.
- Cloud computing technology provides services to client users with a lower cost. Because the client users do not need to buy much hardware, the client users can obtain the services by employing virtual machines from a cloud computing provider.
- the user can specify and buy resources of the virtual machines with a corresponding price. Then, the cloud computing provider allocates the specified resources to the user and makes a charge according to the price.
- the cloud computing provider allocates the specified resources to the user and makes a charge according to the price.
- the user employs the virtual machines, he/she may not actually know the amount of resources really needed for completing the services. Therefore, a more efficient method for allocating resources of virtual machines is desired.
- FIG. 1 is a schematic block diagram of a control server connecting with a plurality of virtual machine servers, client computers, and database servers.
- FIG. 2 is a block diagram of one embodiment of the control server including a resource allocating system.
- FIG. 3 is a schematic block diagram of function modules of the resource allocating system included in the control server.
- FIG. 4 is a flowchart of one embodiment of a method for allocating resources for virtual machines using the control server.
- FIG. 5 is a schematic diagram of a master/slave architecture of the plurality of database servers.
- FIG. 6 is a schematic diagram of distributed parallel computing using the plurality of database servers.
- non-transitory computer-readable medium may be a hard disk drive, a compact disc, a digital video disc, a tape drive or other storage medium.
- FIG. 1 is a schematic block diagram of a control server 2 connected to a plurality of virtual machine (VM) servers, client computers, and database servers.
- the control server 2 is connected to the VM servers (e.g., a VM server 4 and a VM server 5 ), the client computers (only client computer 1 is shown in FIG. 1 ), and the database servers (only one database server 3 is shown in FIG. 1 ) through a network.
- the network may be an intranet, the Internet or other suitable communication network, such as general packet radio service (GPRS), WIFI/wireless local area network (WIFI/WLAN), third generation/wideband code division multiple access (3G/WCDMA), or 3.5G/high-speed downlink packet access (3.5G/HSDPA).
- GPRS general packet radio service
- WIFI/WLAN WIFI/wireless local area network
- 3G/WCDMA third generation/wideband code division multiple access
- 3.5G/HSDPA 3.5G/high-speed downlink packet access
- Each of the VM servers includes a VM monitoring program, which obtains usage rates of specified resources of the VMs installed on the VM server after a preset time interval (e.g., ten minutes), and sends the usage rates of the specified resources to the control server 2 .
- the usage rates of the specified resources may include, but are not limited to, a central processing unit (CPU) usage rate (CPU%), a memory usage rate (Memory%), and a hard disk usage rate (Disk%) of the VM servers occupied by the virtual machines.
- the VM server 4 obtains the usage rates of the CPU of the virtual machines 41 and 42
- the VM server 5 obtains the usage rates of the CPU of the virtual machines 51 and 52 .
- the specified resources may be reduced or increased.
- the control server 2 stores the usage rates of the specified resources of the virtual machines into different data tables in the database servers 3 according to a name of each virtual machine. For example, the usage rates of the specified resources of VM 41 are stored in a first data sheet “ 41 ”, and the usage rates of the specified resources of VM 42 are stored in a second data sheet “ 42 .”
- the data sheet includes a plurality of columns, such as a name of the virtual machine, an identifier (ID) of the virtual machine, a CPU usage rate, a memory usage rate, and a hard disk usage rate of the virtual machine, and a storing time of the usage rates of the specified resources.
- the plurality of database servers 3 provide a function of distributed parallel computing.
- the plurality of database servers 3 are distributed in a master/slave architecture.
- One of the database servers 3 is the master server, and the other database servers 3 are slave servers.
- the master server controls the computing of the slave servers, collects computing results from the slave servers, and transmits the collected computing results to the control server 2 for further processing.
- FIG. 2 is a block diagram of one embodiment of the control server 2 including a resource allocating system 24 .
- the control server 2 further includes a display device 20 , an input device 22 , a storage device 23 , and at least one processor 25 .
- FIG. 1 illustrates only one example of the control server 2 that may include more or fewer components than illustrated, or have a different configuration of the various components in other embodiments.
- the display device 20 displays the usage rates of the specified resources of the virtual machines
- the input device 22 may be a mouse or a keyboard used for input.
- the storage device 23 may be a non-volatile computer storage chip that can be electrically erased and reprogrammed, such as a hard disk or a flash memory card.
- the resource allocating system 24 is used to dynamically update resource allocation of the virtual machines for the client computer 1 according to a change of the usage rates of specified resources of the virtual machines.
- the resource allocating system 24 may include computerized instructions in the form of one or more programs that are executed by the at least one processor 25 and stored in the storage device 23 (or memory). A detailed description of the resource allocating system 24 is given in the following paragraphs.
- FIG. 3 is a block diagram of function modules of the resource allocating system 24 included in the control server 2 .
- the resource allocating system 24 may include one or more modules, for example, a data obtaining module 240 , a calculating module 241 , a proposing module 242 , and an allocating module 243 .
- the word “module”, as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language.
- One or more software instructions in the modules may be embedded in firmware, such as in an EPROM.
- the modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable medium include flash memory and hard disk drives.
- FIG. 4 is a flowchart of one embodiment of a method for allocating resources for virtual machines using the control server 2 . Depending on the embodiment, additional steps may be added, others removed, and the ordering of the steps may be changed.
- step S 10 a user logs on a management interface of the virtual machines through the client computer 1 , and starts up a virtual machine (e.g., VM 41 ).
- the user may select a resource allocation, a price to pay, and a security mechanism of the virtual machine.
- step S 11 the data obtaining module 240 obtains usage rates of specified resources of the virtual machine, and stores the usage rates of the specified resources of the virtual machine in a data table.
- the usage rates of the specified resources of the virtual machine are sampled by the VM server 4 and transmitted to the control server 2 through the network.
- the data obtaining module 240 may obtain the usage rates of the specified resources of the virtual machine after a preset time interval (e.g., one minute), the usage rates of the specified resources may include the CPU usage rate, the memory usage rate, and the hard disk usage rate.
- the calculating module 241 calculates an average usage rate of each specified resource of the virtual machine after a preset cycle time (e.g., one hour), and determines a resource-utilization level (hereinafter referred to as “resource level”) of the virtual machine according to the average usage rate of each specified resource of the virtual machine.
- the resource level of the virtual machine is determined by a plurality of usage levels of the average usage rates of the specified resources (hereinafter referred to as “usage levels of the specified resources”) of the virtual machine.
- the calculating module 241 calculates the average usage rate of each specified resource of the virtual machine using a distributed parallel computing method.
- the calculating module 241 splits the data of the usage rates of the specified resources of the virtual machine into different groups according to a sequence of the times when data is obtained (obtaining time), assigns the data of the usage rates of the specified resources in each group into a database server 3 , and calculates a sum of the usage rates of each specified resource in each group.
- the calculating module 241 splits the data of the usage rates into different groups of “split 1 ”, “split 2 ”, and “split m ”, where each group includes ten usage rates of the specified resources at ten time points.
- the first group “split i ” includes the usage rates of the specified resources (the CPU, the memory, and the hard disk) from a time point “time 1 ” to time point “time 10 ”, and the second group “split 2 ” includes the usage rates of the specified resources from a time point “time 11 ” to time point “time 20 ”.
- the data in the first group “split 1 ” may be assigned to a first slave server 1 for calculating a sum of the usage rates of each specified resource in the first group
- the data in the second group “split 2 ” may be assigned to a second slave server 2 for calculating a sum of the usage rates of each specified resource in the second group. Then, the results of calculation for each specified resource are returned to the control server 2 .
- the calculating module 241 calculates a total sum of the usage rates of each specified resource in the different groups, divides the total sum by a number of the usage rates of each specified resource, and obtains an average usage rate of each specified resource of the virtual machine, such as an average usage rate of the CPU, an average usage rate of the memory, and an average usage rate of the hard disk.
- n represents the number of the usage rates of each specified resource
- “i” represents the time point
- “C i ” represents the usage rate of the CPU at the time point “i”
- “M i ” represents the usage rate of the memory at the time point “i”
- “D i ” represents the usage rate of the hard disk at the time point “i”.
- C′ represents the average usage rate of the CPU
- “M′” represents the average usage rate of the memory
- D′ represents the average usage rate of the hard disk.
- the specified resources include three types, such as the CPU, the memory, and the hard disk.
- the average usage rates of each specified resource are divided into three usage levels by two threshold values.
- a method for determining the resource level of the virtual machine according to different combinations of the usage levels of each specified resource is as follows.
- the usage level of the first type of the specified resources is determined to be a first level, which may be recorded using a symbol “I”.
- the usage level of the first type of the specified resources is determined to be a second level, which may be recorded using a symbol “II”.
- the usage level of the first type of the specified resources is determined to be a third level, which may be recorded using a character “III”.
- the usage level of the second type of the specified resources is determined to be a first level, which may be recorded using a symbol “A”.
- the usage level of the second type of the specified resources is determined to be a second level, which may be recorded using a symbol “B”.
- the usage level of the second type of the specified resources is determined to be a third level, which may be recorded using a character “C”.
- the usage level of the third type of the specified resources is determined to be a first level, which may be recorded using a symbol “i”.
- the usage level of the third type of the specified resources is determined to be a second level, which may be recorded using a symbol “ii”.
- the usage level of the third type of the specified resources is determined to be a third level, which may be recorded using a character “iii”.
- “Spec CPU ” represents the usage level of the CPU
- “Spec MEM ” represents the usage level of the memory
- “Spec Disk ” represents the usage level of the hard disk
- “Spec(Spec CPU , Spec MEM , Spec Disk )” represent the resource level of the virtual machine.
- An algorithm for determining the resource level of the virtual machine is as follows, where “Threshold 1 ” to “Threshold 6 ” represents the first threshold value to the sixth threshold value.
- the average usage rate of each specified resource is divided into three usage levels by the two threshold values.
- the average usage rate of the CPU is divided into three usage levels of I, II, and III
- the average usage rate of the memory is divided into three usage levels of A, B, and C
- the average usage rate of the hard disk is divided into three usage levels i, ii, and iii.
- a proposed resource allocation corresponding to each resource level is pre-determined.
- a proposed lower resource level allocates less resources, and a proposed higher resource level allocates more resources.
- Spec(I, A, i) represents that the average usage rates of the three types of the specified resources are low, thus, less resources for the virtual machine are proposed to the user.
- Spec(III, C, iii) represents that the average usage rates of the three types of the specified resources are high, thus more resources for the virtual machine are proposed to the user.
- the usage levels of the specified resources may be increased or decreased by increasing the threshold values or decreasing the threshold values, so that different resource levels of the virtual machine are determined.
- step S 13 the proposing module 242 obtains a proposed resource allocation corresponding to the resource level of the virtual machine, and sends the proposed resource allocation (proposal) to the client computer 1 that uses the virtual machine.
- the resource level “Spec(SpecCPU , SpecMEM , SpecDisk)” of the virtual machine is determined as Spec(I, C, i).
- the user may select updated resources of the virtual machine from the proposed resource allocation through the management interface of VM, or input updated resources manually according to the proposed resource allocation, or let the proposing module 242 determine updated resources automatically from the proposed resource allocation.
- the user may select the updated resources when the virtual machine is running (Hot Plug), or after the virtual machine stops running.
- step S 15 the allocating module 243 allocates the updated resources to the virtual machine according to the proposed resource allocation. For example, if the user selects the updated resources of (500 MB, 3.2 GB, 20 GB) from the proposed resource allocation, the allocating module 243 allocates the updated resources of (500 MB, 3.2 GB, 20 GB) to the virtual machine. If the user lets the control server 2 (e.g., the proposing module 242 ) determine the updated resources automatically, the allocating module 243 determines the updated resources from the proposed resource allocation according to a preset sequence (e.g., a size of the resources in an ascending order) or randomly.
- a preset sequence e.g., a size of the resources in an ascending order
- the initial value of the resource allocation (e.g., 2.5 GB, 4 GB, 200 GB) is not replaced by the updated resources (500 MB, 3.2 GB, 20 GB), both of them are stored in the storage device 23 of the control device 2 .
- merely one database server 3 is used, the control server 2 and the database server 3 are combined into one server or other suitable electronic device.
- VM server 4 may be used, the control server 2 and the VM server 4 can be combined into one server.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
In a method for allocating resources for a virtual machine (VM), usage rates of specified resources of the VM are obtained. A resource level of the VM is determined according to an average usage rate of each specified resource, to obtain a proposal for a revised resource allocation corresponding to the resource-utilization level of the VM.
The proposed resource allocation is sent to a client computer, and updated resources are allocated to the VM according to the proposal if the proposal is accepted.
Description
- 1. Technical Field
- Embodiments of the present disclosure relate to cloud computing technology, and particularly to an electronic device and method for allocating resources for virtual machines.
- 2. Description of Related Art
- Cloud computing technology provides services to client users with a lower cost. Because the client users do not need to buy much hardware, the client users can obtain the services by employing virtual machines from a cloud computing provider.
- When a user employs the virtual machines from the cloud computing provider, the user can specify and buy resources of the virtual machines with a corresponding price. Then, the cloud computing provider allocates the specified resources to the user and makes a charge according to the price. However, when the user employs the virtual machines, he/she may not actually know the amount of resources really needed for completing the services. Therefore, a more efficient method for allocating resources of virtual machines is desired.
-
FIG. 1 is a schematic block diagram of a control server connecting with a plurality of virtual machine servers, client computers, and database servers. -
FIG. 2 is a block diagram of one embodiment of the control server including a resource allocating system. -
FIG. 3 is a schematic block diagram of function modules of the resource allocating system included in the control server. -
FIG. 4 is a flowchart of one embodiment of a method for allocating resources for virtual machines using the control server. -
FIG. 5 is a schematic diagram of a master/slave architecture of the plurality of database servers. -
FIG. 6 is a schematic diagram of distributed parallel computing using the plurality of database servers. - All of the processes described below may be embodied in, and fully automated via, functional code modules executed by one or more general purpose electronic devices or processors. The code modules may be stored in any type of non-transitory computer-readable medium or other storage device. Some or all of the methods may alternatively be embodied in specialized hardware. Depending on the embodiment, the non-transitory computer-readable medium may be a hard disk drive, a compact disc, a digital video disc, a tape drive or other storage medium.
-
FIG. 1 is a schematic block diagram of acontrol server 2 connected to a plurality of virtual machine (VM) servers, client computers, and database servers. In one embodiment, thecontrol server 2 is connected to the VM servers (e.g., aVM server 4 and a VM server 5), the client computers (onlyclient computer 1 is shown inFIG. 1 ), and the database servers (only onedatabase server 3 is shown inFIG. 1 ) through a network. The network may be an intranet, the Internet or other suitable communication network, such as general packet radio service (GPRS), WIFI/wireless local area network (WIFI/WLAN), third generation/wideband code division multiple access (3G/WCDMA), or 3.5G/high-speed downlink packet access (3.5G/HSDPA). - Each of the VM servers includes a VM monitoring program, which obtains usage rates of specified resources of the VMs installed on the VM server after a preset time interval (e.g., ten minutes), and sends the usage rates of the specified resources to the
control server 2. In one embodiment, the usage rates of the specified resources may include, but are not limited to, a central processing unit (CPU) usage rate (CPU%), a memory usage rate (Memory%), and a hard disk usage rate (Disk%) of the VM servers occupied by the virtual machines. For example, theVM server 4 obtains the usage rates of the CPU of the 41 and 42, and thevirtual machines VM server 5 obtains the usage rates of the CPU of the 51 and 52. In other embodiments, the specified resources may be reduced or increased.virtual machines - The
control server 2 stores the usage rates of the specified resources of the virtual machines into different data tables in thedatabase servers 3 according to a name of each virtual machine. For example, the usage rates of the specified resources ofVM 41 are stored in a first data sheet “41”, and the usage rates of the specified resources ofVM 42 are stored in a second data sheet “42.” The data sheet includes a plurality of columns, such as a name of the virtual machine, an identifier (ID) of the virtual machine, a CPU usage rate, a memory usage rate, and a hard disk usage rate of the virtual machine, and a storing time of the usage rates of the specified resources. - In one embodiment, the plurality of
database servers 3 provide a function of distributed parallel computing. Referring toFIG. 5 , the plurality ofdatabase servers 3 are distributed in a master/slave architecture. One of thedatabase servers 3 is the master server, and theother database servers 3 are slave servers. The master server controls the computing of the slave servers, collects computing results from the slave servers, and transmits the collected computing results to thecontrol server 2 for further processing. -
FIG. 2 is a block diagram of one embodiment of thecontrol server 2 including aresource allocating system 24. In one embodiment, thecontrol server 2 further includes adisplay device 20, aninput device 22, astorage device 23, and at least oneprocessor 25.FIG. 1 illustrates only one example of thecontrol server 2 that may include more or fewer components than illustrated, or have a different configuration of the various components in other embodiments. - The
display device 20 displays the usage rates of the specified resources of the virtual machines, and theinput device 22 may be a mouse or a keyboard used for input. Thestorage device 23 may be a non-volatile computer storage chip that can be electrically erased and reprogrammed, such as a hard disk or a flash memory card. - In one embodiment, the
resource allocating system 24 is used to dynamically update resource allocation of the virtual machines for theclient computer 1 according to a change of the usage rates of specified resources of the virtual machines. Theresource allocating system 24 may include computerized instructions in the form of one or more programs that are executed by the at least oneprocessor 25 and stored in the storage device 23 (or memory). A detailed description of theresource allocating system 24 is given in the following paragraphs. -
FIG. 3 is a block diagram of function modules of theresource allocating system 24 included in thecontrol server 2. In one embodiment, theresource allocating system 24 may include one or more modules, for example, adata obtaining module 240, a calculatingmodule 241, a proposingmodule 242, and an allocatingmodule 243. In general, the word “module”, as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language. - One or more software instructions in the modules may be embedded in firmware, such as in an EPROM. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable medium include flash memory and hard disk drives.
-
FIG. 4 is a flowchart of one embodiment of a method for allocating resources for virtual machines using thecontrol server 2. Depending on the embodiment, additional steps may be added, others removed, and the ordering of the steps may be changed. - In step S10, a user logs on a management interface of the virtual machines through the
client computer 1, and starts up a virtual machine (e.g., VM 41). The user may select a resource allocation, a price to pay, and a security mechanism of the virtual machine. For example, initial values of the resource allocation of the virtual machine is (CPU, Memory, Hard disk)=(2.5GB, 4GB, 200GB). - In step S11, the
data obtaining module 240 obtains usage rates of specified resources of the virtual machine, and stores the usage rates of the specified resources of the virtual machine in a data table. The usage rates of the specified resources of the virtual machine are sampled by theVM server 4 and transmitted to thecontrol server 2 through the network. Thedata obtaining module 240 may obtain the usage rates of the specified resources of the virtual machine after a preset time interval (e.g., one minute), the usage rates of the specified resources may include the CPU usage rate, the memory usage rate, and the hard disk usage rate. - In step S12, the calculating
module 241 calculates an average usage rate of each specified resource of the virtual machine after a preset cycle time (e.g., one hour), and determines a resource-utilization level (hereinafter referred to as “resource level”) of the virtual machine according to the average usage rate of each specified resource of the virtual machine. The resource level of the virtual machine is determined by a plurality of usage levels of the average usage rates of the specified resources (hereinafter referred to as “usage levels of the specified resources”) of the virtual machine. For example, supposing that the specified resources include three types (e.g., the CPU, the memory, and the hard disk), and each of specified resources has three usage levels, thus the virtual machine has twenty-seven (3*3*3=27) resource levels according to different combinations of the usage levels. - In one embodiment, the calculating
module 241 calculates the average usage rate of each specified resource of the virtual machine using a distributed parallel computing method. In the distributed parallel computing method, the calculatingmodule 241 splits the data of the usage rates of the specified resources of the virtual machine into different groups according to a sequence of the times when data is obtained (obtaining time), assigns the data of the usage rates of the specified resources in each group into adatabase server 3, and calculates a sum of the usage rates of each specified resource in each group. - For example, referring to
FIG. 6 , the calculatingmodule 241 splits the data of the usage rates into different groups of “split1”, “split2”, and “splitm”, where each group includes ten usage rates of the specified resources at ten time points. The first group “spliti” includes the usage rates of the specified resources (the CPU, the memory, and the hard disk) from a time point “time1” to time point “time10”, and the second group “split2” includes the usage rates of the specified resources from a time point “time11” to time point “time20”. Referring toFIG. 5 , the data in the first group “split1” may be assigned to afirst slave server 1 for calculating a sum of the usage rates of each specified resource in the first group, and the data in the second group “split2” may be assigned to asecond slave server 2 for calculating a sum of the usage rates of each specified resource in the second group. Then, the results of calculation for each specified resource are returned to thecontrol server 2. - The calculating
module 241 calculates a total sum of the usage rates of each specified resource in the different groups, divides the total sum by a number of the usage rates of each specified resource, and obtains an average usage rate of each specified resource of the virtual machine, such as an average usage rate of the CPU, an average usage rate of the memory, and an average usage rate of the hard disk. - For example, referring to
FIG. 6 , “n” represents the number of the usage rates of each specified resource, “i” represents the time point, “Ci” represents the usage rate of the CPU at the time point “i”, “Mi” represents the usage rate of the memory at the time point “i”, and “Di” represents the usage rate of the hard disk at the time point “i”. “C′” represents the average usage rate of the CPU, “M′” represents the average usage rate of the memory, and “D′” represents the average usage rate of the hard disk. - In one embodiment, the specified resources include three types, such as the CPU, the memory, and the hard disk. The average usage rates of each specified resource are divided into three usage levels by two threshold values. A method for determining the resource level of the virtual machine according to different combinations of the usage levels of each specified resource is as follows.
- If the average usage rate of a first type (e.g., the CPU) of the specified resources is less than or equal to a first threshold value (e.g., 20%), then the usage level of the first type of the specified resources is determined to be a first level, which may be recorded using a symbol “I”.
- If the average usage rate of the first type of the specified resources is greater than the first threshold value and is less than or equal to a second threshold value (e.g., 70%), then the usage level of the first type of the specified resources is determined to be a second level, which may be recorded using a symbol “II”.
- If the average usage rate of the first type of the specified resources is greater than the second threshold value, then the usage level of the first type of the specified resources is determined to be a third level, which may be recorded using a character “III”.
- In a similar way, if the average usage rate of a second type (e.g., the memory) of the specified resources is less than or equal to a third threshold value (e.g., 40%), then the usage level of the second type of the specified resources is determined to be a first level, which may be recorded using a symbol “A”.
- If the average usage rate of the second type of the specified resources is greater than the third threshold value and is less than or equal to a fourth threshold value (e.g., 80%), then the usage level of the second type of the specified resources is determined to be a second level, which may be recorded using a symbol “B”.
- If the average usage rate of the second type of the specified resources is greater than the fourth threshold value, then the usage level of the second type of the specified resources is determined to be a third level, which may be recorded using a character “C”.
- In a similar way, if the average usage rate of a third type (e.g., the hard disk) of the specified resources is less than or equal to a fifth threshold value (e.g., 30%), then the usage level of the third type of the specified resources is determined to be a first level, which may be recorded using a symbol “i”.
- If the average usage rate of the third type of the specified resources is greater than the fifth threshold value and is less than or equal to a sixth threshold value (e.g., 60%), then the usage level of the third type of the specified resources is determined to be a second level, which may be recorded using a symbol “ii”.
- If the average usage rate of the third type of the specified resources is greater than the sixth threshold value, then the usage level of the third type of the specified resources is determined to be a third level, which may be recorded using a character “iii”.
- For example, supposing that “SpecCPU” represents the usage level of the CPU, “SpecMEM” represents the usage level of the memory, and “SpecDisk” represents the usage level of the hard disk, then “Spec(SpecCPU, SpecMEM, SpecDisk)” represent the resource level of the virtual machine. An algorithm for determining the resource level of the virtual machine is as follows, where “Threshold1” to “Threshold6” represents the first threshold value to the sixth threshold value.
- If (C′Threshold') SpecCPU=I;
- Else if (Threshold1<C′Threshold2) SpecCPU=II;
- Else if (Threshold2<C′) SpecCPU=III;
- If (M′Threshold3) SpecMEM=A;
- Else if (Threshold3<M′Threshold4) SpecMEM=B;
- Else if (Threshold4<M′) SpecMEM=C;
-
- Else if (Threshold5<D′Threshold6) SpecDisk=ii;
- Else if (Threshold6<D′) SpecDisk=iii.
- In this embodiment, the average usage rate of each specified resource is divided into three usage levels by the two threshold values. The average usage rate of the CPU is divided into three usage levels of I, II, and III, the average usage rate of the memory is divided into three usage levels of A, B, and C, and the average usage rate of the hard disk is divided into three usage levels i, ii, and iii. Thus, the virtual machine has twenty-seven (3*3*3=27) resource levels according to different combinations of the different usage levels of the three types of specified resources. A proposed resource allocation corresponding to each resource level is pre-determined. A proposed lower resource level allocates less resources, and a proposed higher resource level allocates more resources. For example, Spec(I, A, i) represents that the average usage rates of the three types of the specified resources are low, thus, less resources for the virtual machine are proposed to the user. Spec(III, C, iii) represents that the average usage rates of the three types of the specified resources are high, thus more resources for the virtual machine are proposed to the user.
- In other embodiments, the usage levels of the specified resources may be increased or decreased by increasing the threshold values or decreasing the threshold values, so that different resource levels of the virtual machine are determined.
- In step S13, the proposing
module 242 obtains a proposed resource allocation corresponding to the resource level of the virtual machine, and sends the proposed resource allocation (proposal) to theclient computer 1 that uses the virtual machine. - For example, the average usage rate of the CPU is 60% (C′=60%), the average usage rate of the memory is 85% (M′=85%), and the average usage rate of the hard disk is 20% (D′=20%);
- Because Threshold1<60%<Threshold2, thus, SpecCPU=I.
- Because Threshold4<85%, thus, SpecMEM=C and
- Because 20%<Threshold5, thus, SpecDisk=i.
- The resource level “Spec(SpecCPU , SpecMEM , SpecDisk)” of the virtual machine is determined as Spec(I, C, i). For example, the proposed resource allocation corresponding to the resource level Spec(I,C, i) is as follows: CPU={500 MB, . . . , 1.75 GB}, Memory={3.2 GB, . . . , 4 GB}, and Hard disk=10 GB, . . . , 60 GB}. The user may select updated resources of the virtual machine from the proposed resource allocation through the management interface of VM, or input updated resources manually according to the proposed resource allocation, or let the proposing
module 242 determine updated resources automatically from the proposed resource allocation. The user may select the updated resources when the virtual machine is running (Hot Plug), or after the virtual machine stops running. - In step S14, the allocating
module 243 determines whether the client computer 1 (the user) accepts the proposed resource allocation. For example, if the user selects the updated resources of (CPU=500 MB, Memory=3.2 GB, Hard disk=20 GB) or lets the proposingmodule 242 determine the updated resources automatically, the allocatingmodule 243 determines that theclient computer 1 accepts the proposed resource allocation, then step S15 is executed. If theclient computer 1 does not accept the proposed resource allocation, the procedure ends. - In step S15, the allocating
module 243 allocates the updated resources to the virtual machine according to the proposed resource allocation. For example, if the user selects the updated resources of (500 MB, 3.2 GB, 20 GB) from the proposed resource allocation, the allocatingmodule 243 allocates the updated resources of (500 MB, 3.2 GB, 20 GB) to the virtual machine. If the user lets the control server 2 (e.g., the proposing module 242) determine the updated resources automatically, the allocatingmodule 243 determines the updated resources from the proposed resource allocation according to a preset sequence (e.g., a size of the resources in an ascending order) or randomly. - In this embodiment, the initial value of the resource allocation (e.g., 2.5 GB, 4 GB, 200 GB) is not replaced by the updated resources (500 MB, 3.2 GB, 20 GB), both of them are stored in the
storage device 23 of thecontrol device 2. - In other embodiments, merely one
database server 3 is used, thecontrol server 2 and thedatabase server 3 are combined into one server or other suitable electronic device. Further, merely oneVM server 4 may be used, thecontrol server 2 and theVM server 4 can be combined into one server. - It should be emphasized that the above-described embodiments of the present disclosure, particularly, any embodiments, are merely possible examples of implementations, merely set forth for a clear understanding of the principles of the disclosure. Many variations and modifications may be made to the above-described embodiment(s) of the disclosure without departing substantially from the spirit and principles of the disclosure. All such modifications and variations are intended to be included herein within the scope of this disclosure and the present disclosure and protected by the following claims.
Claims (20)
1. A method for allocating resources for a virtual machine using an electronic device, the method comprising:
obtaining usage rates of specified resources of the virtual machine using a processor of the electronic device;
calculating an average usage rate of each of the specified resources after a preset cycle time, and determining a resource level of the virtual machine according to the average usage rate of each of the specified resources;
obtaining a proposed resource allocation corresponding to the resource level of the virtual machine, and sending the proposed resource allocation to a client computer that uses the virtual machine; and
allocating updated resources to the virtual machine according to the proposed resource allocation.
2. The method according to claim 1 , wherein the average usage rate of each of the specified resources is calculated using a distributed parallel computing method.
3. The method according to claim 2 , wherein the distributed parallel computing method comprises:
splitting the usage rates of the specified resources into a plurality of groups, and calculating a sum of the usage rates of each of the specified resources in each of the plurality of groups by assigning the usage rates of the specified resources in each of the plurality of groups into a corresponding database server; and
calculating a total sum of the usage rates of each of the specified resources in all of the plurality of groups, and obtain an average usage rate of each of the specified resources by dividing the total sum with a number of the usage rates of each of the specified resources.
4. The method according to claim 3 , wherein the usage rates of the specified resources are split into a plurality of groups according to a sequence of obtaining time of the usage rates of the specified resources.
5. The method according to claim 1 , wherein the resource level of the virtual machine is determined by a plurality of usage levels of the average usage rates of the specified resources of the virtual machine.
6. The method according to claim 5 , wherein the average usage rates of each of the specified resources are divided into a plurality of usage levels by preset threshold values of each of the specified resources.
7. The method according to claim 6 , wherein a number of the preset threshold values of each of the specified resources is two, and the average usage rates of each of the specified resources are divided into three usage levels by the two preset threshold values of each of the specified resources.
8. An electronic device, comprising:
a processor;
a storage device storing a plurality of instructions, which when executed by the processor, causes the processor to:
obtain usage rates of specified resources of a virtual machine;
calculate an average usage rate of each of the specified resources after a preset cycle time, and determine a resource level of the virtual machine according to the average usage rate of each of the specified resources;
obtain a proposed resource allocation corresponding to the resource level of the virtual machine, and send the proposed resource allocation to a client computer that uses the virtual machine; and
allocate updated resources to the virtual machine according to the proposed resource allocation.
9. The electronic device according to claim 8 , wherein the average usage rate of each of the specified resources is calculated using a distributed parallel computing method.
10. The electronic device according to claim 9 , wherein the distributed parallel computing method comprises:
splitting the usage rates of the specified resources into a plurality of groups, and calculating a sum of the usage rates of each of the specified resources in each of the plurality of groups by assigning the usage rates of the specified resources in each of the plurality of groups into a corresponding database server; and
calculating a total sum of the usage rates of each of the specified resources in all of the plurality of groups, and obtain an average usage rate of each of the specified resources by dividing the total sum with a number of the usage rates of each of the specified resources.
11. The electronic device according to claim 10 , wherein the usage rates of the specified resources are split into a plurality of groups according to a sequence of obtaining time of the usage rates of the specified resources.
12. The electronic device according to claim 8 , wherein the resource level of the virtual machine is determined by a plurality of usage levels of the average usage rates of the specified resources of the virtual machine.
13. The electronic device according to claim 12 , wherein the average usage rates of each of the specified resources are divided into a plurality of usage levels by preset threshold values of each of the specified resources.
14. The electronic device according to claim 13 , wherein a number of the preset threshold values of each of the specified resources is two, and the average usage rates of each of the specified resources are divided into three usage levels by the two preset threshold values of each of the specified resources.
15. A non-transitory storage medium having stored thereon instructions that, when executed by a processor of an electronic device, causes the electronic device to perform a method for allocating resources for a virtual machine, the method comprising:
obtaining usage rates of specified resources of the virtual machine using a processor of the electronic device;
calculating an average usage rate of each of the specified resources after a preset cycle time, and determining a resource level of the virtual machine according to the average usage rate of each of the specified resources;
obtaining a proposed resource allocation corresponding to the resource level of the virtual machine, and sending the proposed resource allocation to a client computer that uses the virtual machine; and
allocating updated resources to the virtual machine according to the proposed resource allocation.
16. The non-transitory storage medium according to claim 15 , wherein the average usage rate of each of the specified resources is calculated using a distributed parallel computing method.
17. The non-transitory storage medium according to claim 16 , wherein the distributed parallel computing method comprises:
splitting the usage rates of the specified resources into a plurality of groups, and calculating a sum of the usage rates of each of the specified resources in each of the plurality of groups by assigning the usage rates of the specified resources in each of the plurality of groups into a corresponding database server; and
calculating a total sum of the usage rates of each of the specified resources in all of the plurality of groups, and obtain an average usage rate of each of the specified resources by dividing the total sum with a number of the usage rates of each of the specified resources.
18. The non-transitory storage medium according to claim 17 , wherein the usage rates of the specified resources are split into a plurality of groups according to a sequence of obtaining time of the usage rates of the specified resources.
19. The non-transitory storage medium according to claim 15 , wherein the resource level of the virtual machine is determined by a plurality of usage levels of the average usage rates of the specified resources of the virtual machine.
20. The non-transitory storage medium according to claim 19 , wherein the average usage rates of each of the specified resources are divided into a plurality of usage levels by preset threshold values of each of the specified resources.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW101128335A TW201407476A (en) | 2012-08-06 | 2012-08-06 | System and method for allocating resource of virtual machine |
| TW101128335 | 2012-08-06 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| US20140040895A1 true US20140040895A1 (en) | 2014-02-06 |
Family
ID=48985955
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US13/955,000 Abandoned US20140040895A1 (en) | 2012-08-06 | 2013-07-31 | Electronic device and method for allocating resources for virtual machines |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US20140040895A1 (en) |
| EP (1) | EP2696286A2 (en) |
| JP (1) | JP2014032674A (en) |
| TW (1) | TW201407476A (en) |
Cited By (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20160004551A1 (en) * | 2013-10-04 | 2016-01-07 | Hitachi, Ltd. | Resource management system and resource management method |
| US20160065487A1 (en) * | 2014-09-03 | 2016-03-03 | Kabushiki Kaisha Toshiba | Electronic apparatus, method, and storage medium |
| US20160239327A1 (en) * | 2015-02-18 | 2016-08-18 | Red Hat Israel, Ltd. | Identifying and preventing removal of virtual hardware |
| US20170163661A1 (en) * | 2014-01-30 | 2017-06-08 | Orange | Method of detecting attacks in a cloud computing architecture |
| US9886296B2 (en) * | 2014-12-01 | 2018-02-06 | International Business Machines Corporation | Managing hypervisor weights in a virtual environment |
| WO2018148322A1 (en) | 2017-02-08 | 2018-08-16 | Alibaba Group Holding Limited | Resource allocation method and apparatus |
| CN109767073A (en) * | 2018-12-15 | 2019-05-17 | 深圳壹账通智能科技有限公司 | Calculation method, device, computer equipment and storage medium for project budget |
| US10423456B2 (en) * | 2014-07-31 | 2019-09-24 | Hewlett Packard Enterprise Development Lp | Dynamic adjustment of resource utilization thresholds |
| CN111522843A (en) * | 2020-06-01 | 2020-08-11 | 北京创鑫旅程网络技术有限公司 | Control method, system, equipment and storage medium of data platform |
| US20220326976A1 (en) * | 2021-04-09 | 2022-10-13 | Pensando Systems Inc. | Methods and systems for a data driven policy-based approach to improve upgrade efficacy |
| CN120123101A (en) * | 2025-05-09 | 2025-06-10 | 中国交通信息科技集团有限公司 | A hybrid allocation method and system for two types of virtual machines |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2016029974A1 (en) * | 2014-08-29 | 2016-03-03 | Nec Europe Ltd. | Method for operating a virtual network infrastructure |
| US9921866B2 (en) | 2014-12-22 | 2018-03-20 | Intel Corporation | CPU overprovisioning and cloud compute workload scheduling mechanism |
| CN106155764A (en) * | 2015-04-23 | 2016-11-23 | 阿里巴巴集团控股有限公司 | The method and device of scheduling virtual machine input and output resource |
| WO2017051474A1 (en) * | 2015-09-25 | 2017-03-30 | 株式会社日立製作所 | Computer system management method and computer system |
| CN107656807B (en) * | 2016-07-26 | 2021-06-29 | 华为技术有限公司 | Method and device for automatic elastic scaling of virtual resources |
| TWI607382B (en) * | 2016-09-05 | 2017-12-01 | Chunghwa Telecom Co Ltd | Method and system for adjusting virtual resources |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20120272237A1 (en) * | 2011-04-20 | 2012-10-25 | Ayal Baron | Mechanism for managing quotas in a distributed virtualziation environment |
| US20130080841A1 (en) * | 2011-09-23 | 2013-03-28 | Sungard Availability Services | Recover to cloud: recovery point objective analysis tool |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5101140B2 (en) * | 2007-03-20 | 2012-12-19 | 株式会社日立製作所 | System resource control apparatus and control method |
| JP4982578B2 (en) * | 2010-02-22 | 2012-07-25 | 西日本電信電話株式会社 | Resource allocation device, resource allocation method, and resource allocation control program |
| JP2011221581A (en) * | 2010-04-02 | 2011-11-04 | Hitachi Ltd | Management method for computer system, computer system management terminal and computer management system |
-
2012
- 2012-08-06 TW TW101128335A patent/TW201407476A/en unknown
-
2013
- 2013-07-31 EP EP13178816.8A patent/EP2696286A2/en not_active Withdrawn
- 2013-07-31 US US13/955,000 patent/US20140040895A1/en not_active Abandoned
- 2013-08-02 JP JP2013161215A patent/JP2014032674A/en active Pending
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20120272237A1 (en) * | 2011-04-20 | 2012-10-25 | Ayal Baron | Mechanism for managing quotas in a distributed virtualziation environment |
| US20130080841A1 (en) * | 2011-09-23 | 2013-03-28 | Sungard Availability Services | Recover to cloud: recovery point objective analysis tool |
Cited By (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20160004551A1 (en) * | 2013-10-04 | 2016-01-07 | Hitachi, Ltd. | Resource management system and resource management method |
| US9495195B2 (en) * | 2013-10-04 | 2016-11-15 | Hitachi, Ltd. | Resource migration between virtual containers based on utilization rate and performance degradation |
| US20170163661A1 (en) * | 2014-01-30 | 2017-06-08 | Orange | Method of detecting attacks in a cloud computing architecture |
| US10659475B2 (en) * | 2014-01-30 | 2020-05-19 | Orange | Method of detecting attacks in a cloud computing architecture |
| US10423456B2 (en) * | 2014-07-31 | 2019-09-24 | Hewlett Packard Enterprise Development Lp | Dynamic adjustment of resource utilization thresholds |
| US20160065487A1 (en) * | 2014-09-03 | 2016-03-03 | Kabushiki Kaisha Toshiba | Electronic apparatus, method, and storage medium |
| US9886296B2 (en) * | 2014-12-01 | 2018-02-06 | International Business Machines Corporation | Managing hypervisor weights in a virtual environment |
| US9817688B2 (en) * | 2015-02-18 | 2017-11-14 | Red Hat Israel, Ltd. | Identifying and preventing removal of virtual hardware |
| US20160239327A1 (en) * | 2015-02-18 | 2016-08-18 | Red Hat Israel, Ltd. | Identifying and preventing removal of virtual hardware |
| WO2018148322A1 (en) | 2017-02-08 | 2018-08-16 | Alibaba Group Holding Limited | Resource allocation method and apparatus |
| EP3580669A4 (en) * | 2017-02-08 | 2020-01-15 | Alibaba Group Holding Limited | Resource allocation method and apparatus |
| CN109767073A (en) * | 2018-12-15 | 2019-05-17 | 深圳壹账通智能科技有限公司 | Calculation method, device, computer equipment and storage medium for project budget |
| CN111522843A (en) * | 2020-06-01 | 2020-08-11 | 北京创鑫旅程网络技术有限公司 | Control method, system, equipment and storage medium of data platform |
| US20220326976A1 (en) * | 2021-04-09 | 2022-10-13 | Pensando Systems Inc. | Methods and systems for a data driven policy-based approach to improve upgrade efficacy |
| CN120123101A (en) * | 2025-05-09 | 2025-06-10 | 中国交通信息科技集团有限公司 | A hybrid allocation method and system for two types of virtual machines |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2014032674A (en) | 2014-02-20 |
| TW201407476A (en) | 2014-02-16 |
| EP2696286A2 (en) | 2014-02-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20140040895A1 (en) | Electronic device and method for allocating resources for virtual machines | |
| US9483288B2 (en) | Method and system for running a virtual appliance | |
| US9898346B2 (en) | Resource substitution and reallocation in a virtual computing environment | |
| US10007461B1 (en) | Redistributing data in a distributed storage system based on attributes of the data | |
| US10877986B2 (en) | Obtaining performance data via an application programming interface (API) for correlation with log data | |
| US10318541B2 (en) | Correlating log data with performance measurements having a specified relationship to a threshold value | |
| US11119982B2 (en) | Correlation of performance data and structure data from an information technology environment | |
| US9009719B2 (en) | Computer workload capacity estimation using proximity tables | |
| US8762525B2 (en) | Managing risk in resource over-committed systems | |
| US20140282540A1 (en) | Performant host selection for virtualization centers | |
| US9430153B2 (en) | Garbage collection and other management of memory heaps | |
| US20140324862A1 (en) | Correlation for user-selected time ranges of values for performance metrics of components in an information-technology environment with log data from that information-technology environment | |
| WO2019108649A1 (en) | Efficiency indexes | |
| US10411977B2 (en) | Visualization of workload distribution on server resources | |
| US20120323821A1 (en) | Methods for billing for data storage in a tiered data storage system | |
| US11803773B2 (en) | Machine learning-based anomaly detection using time series decomposition | |
| CN103593224A (en) | Virtual machine resource allocation system and method | |
| US20230136226A1 (en) | Techniques for auto-tuning compute load resources | |
| US10990519B2 (en) | Multi-tenant cloud elastic garbage collector | |
| US10565020B2 (en) | Adjustment of the number of central processing units to meet performance requirements of an I/O resource | |
| CN104580194A (en) | Virtual resource management method and device oriented to video applications | |
| US9910706B2 (en) | Managing asset placement with respect to a shared pool of configurable computing resources | |
| US20180246763A1 (en) | Computer system management method and computer system | |
| WO2016206441A1 (en) | Method and device for allocating virtual resource, and computer storage medium | |
| CN112748858B (en) | Method, electronic device and computer program product for managing disk arrays |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| AS | Assignment |
Owner name: HON HAI PRECISION INDUSTRY CO., LTD., TAIWAN Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:PENG, KUAN-CHIAO;YEH, CHIEN-FA;LEE, CHUNG-I;AND OTHERS;SIGNING DATES FROM 20130709 TO 20130723;REEL/FRAME:030909/0866 |
|
| STCB | Information on status: application discontinuation |
Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION |