WO2016095162A1 - Device and method for determining operation for adjusting number of virtual machines - Google Patents

Device and method for determining operation for adjusting number of virtual machines Download PDF

Info

Publication number
WO2016095162A1
WO2016095162A1 PCT/CN2014/094226 CN2014094226W WO2016095162A1 WO 2016095162 A1 WO2016095162 A1 WO 2016095162A1 CN 2014094226 W CN2014094226 W CN 2014094226W WO 2016095162 A1 WO2016095162 A1 WO 2016095162A1
Authority
WO
WIPO (PCT)
Prior art keywords
vms
load
indicator
determining
performance
Prior art date
Application number
PCT/CN2014/094226
Other languages
French (fr)
Chinese (zh)
Inventor
唐朋成
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201480028886.9A priority Critical patent/CN106170767B/en
Priority to PCT/CN2014/094226 priority patent/WO2016095162A1/en
Publication of WO2016095162A1 publication Critical patent/WO2016095162A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines

Definitions

  • the present invention relates to cloud computing technologies, and in particular, to an apparatus and method for determining a virtual machine number adjustment operation.
  • Cloud Computing technology integrates computing, storage, service components, network software/hardware resources distributed on the network, and provides users with convenient and fast services based on resource virtualization.
  • the functions of network elements in the network can be implemented by one or more virtual machines.
  • EPC network elements in the EPC network such as: Mobility Management Entity (MME), Packet Data Network Gateway (Packet)
  • MME Mobility Management Entity
  • Packet Packet Data Network Gateway
  • PGW Packet Data Network Gateway
  • SGW Serving GateWay
  • HSS Home Subscriber Server
  • VNFs virtualized network functions
  • the number of VMs in the VNF can be adjusted as the business changes. This automatic adjustment process is called “automatic capacity expansion/reduction:” Users can set the corresponding application programming interface (API) provided by the vendor. The VM number adjustment program.
  • API application programming interface
  • FIG. 1 shows an existing VM number adjustment scheme.
  • the central processing unit (CPU) utilization is used to measure the load of the system, and the number of VMs is adjusted according to the system load.
  • an action corresponding to the threshold is performed, for example, adding a VM, and the length is a period of the expansion cooling time, regardless of whether the load exceeds the upper expansion threshold.
  • the action corresponding to the threshold is performed, For example, if one VM is reduced, and then the length is the condensed cooldown time, the VM can no longer be reduced regardless of whether the system load exceeds the lower threshold.
  • the number of VMs that can be increased or decreased can only be fixed if the capacity is increased or reduced. In some scenarios, for example, in the case of sudden service, the number of VMs can only be fixed. The number of VMs is slow to expand.
  • An embodiment of the present invention provides an apparatus and method for determining a VM number adjustment operation, to provide a flexible configuration scheme of a VM.
  • an embodiment of the present invention provides an apparatus for determining a virtual machine VM number adjustment operation, including:
  • a data acquisition module configured to acquire a load indicator of a current time system and a number of VMs used by the system, where the system includes one or more VMs;
  • a first determining module configured to determine, according to a load indicator of the system at the current time and a number of VMs used by the system, a first operation to be performed on the system
  • the first operation includes: adding m VMs, reducing n VMs, or keeping the number of VMs unchanged, where m, n are positive integers, and m, n are systems of the first decision module according to current time
  • the load indicator and the number of VMs used by the system are determined.
  • the first determining module is specifically configured to:
  • the performance indicator of the system after performing the first operation is predicted by the first decision module according to the load indicator of the system at the current time, and the number of VMs used by the system after performing the first operation;
  • the number of VMs used by the system after performing the first operation is predicted by the first decision module according to the number of VMs used by the system at the current time and the determined first operation.
  • the data collection module is further configured to: before the first determining module determines the first operation, obtain the current time Performance indicators of the system;
  • the first decision module is specifically configured to:
  • the last time the system is in the current state the cumulative reward value obtained by performing the first operation on the system, the immediate reward value obtained by performing the first operation on the system at the current time, and the last time
  • the system is in a next state, performing a maximum of the accumulated reward values obtained by each of the first set of executable first operations for the system, wherein the next state is The state in which the system is located after performing the first operation;
  • the reward value is determined by the first decision module according to the number of VMs used by the system, and the performance index of the system under the load indicated by the load indicator of the system at the current time, the system The fewer the number of VMs used, the higher the performance metric of the system indicates the higher the performance of the system, the greater the reward value.
  • the first determining module is specifically configured to:
  • the largest cumulative return value is selected.
  • the device further includes: a VM quantity adjustment mode selection module, configured to select a mode for adjusting the number of VMs;
  • the first decision module is specifically configured to:
  • the method for adjusting the number of VMs selected by the VM quantity adjustment mode selection module is: adjusting the number of VMs used by the system according to the load indicator of the system at the current time and the number of VMs used by the system,
  • the first operation to be performed on the system is determined based on the load indicator of the system at the current time and the number of VMs used by the system.
  • the apparatus further includes a second determining module, configured to:
  • the method for adjusting the number of VMs selected by the VM quantity adjustment mode selection module is: determining whether the number of VMs needs to be adjusted according to the upper limit threshold of the load index of the system and the lower limit threshold of the load indicator of the system,
  • the second operation includes: adding p VMs, reducing q VMs, or keeping the number of VMs unchanged, the p being a preset upward adjustment step, and the q being a preset downward adjustment step , p, q are positive integers.
  • the data collection module is further configured to: acquire a load indicator of the system in each of the T historical moments before the current time, where T is a positive integer;
  • the load indicator upper limit threshold and the load indicator lower limit threshold are determined by the second decision module according to the following conditions according to the load index of the system in each of the T historical moments before the current time:
  • the performance indicators of the system meet the preset performance index requirements, and the number of VMs used is the least.
  • the second determining module is specifically configured to determine the load indicator upper limit threshold and the load indicator lower threshold according to the following steps:
  • the input return ratio is determined by performing the following steps:
  • predicting that the system performs the second operation after performing the second operation on the system according to the combination of the candidate load index upper threshold and the lower limit of the load indicator The number of VMs; and predicting performance indicators of the system after performing the second operation according to the load indicator of the system at the historical moment and the predicted number of VMs used by the system after performing the second operation;
  • an embodiment of the present invention provides a method for determining a virtual machine VM number adjustment operation, including:
  • the first operation includes: adding m VMs, reducing n VMs, or keeping the number of VMs unchanged, where m and n are positive integers, and m and n are load indicators of the system according to the current time and the The number of VMs used by the system is determined.
  • determining a first operation to be performed on the system includes:
  • the performance indicator of the system after performing the first operation is predicted according to the load indicator of the system at the current time, and the number of VMs used by the system after performing the first operation;
  • the number of VMs used by the system after an operation is predicted based on the number of VMs used by the system at the current time, and the determined first operation.
  • the method before determining the first operation to be performed on the system, the method further includes: acquiring a performance indicator of the system at the current moment;
  • Determining the first action to be performed on the system including:
  • the cumulative reward value obtained by the system in the current state for performing the first operation on the system, the immediate reward value obtained by performing the first operation on the system at the current time, and the last time The system is in the next state, performing the executable first on the system a maximum of the cumulative reward values obtained by each of the first operations in the set of operations, wherein the next state is a state in which the system is after performing the first operation;
  • the reward value is determined according to the number of VMs used by the system, and the performance index of the system under the load indicated by the load indicator of the system at the current time, and the number of VMs used by the system is increased. Less, the performance metric of the system indicates that the higher the performance of the system, the greater the reward value.
  • determining an immediate reward value obtained by performing the first operation on the system at a current moment includes:
  • determining, in the next state in which the system is located after performing the first operation, performing the The maximum of the cumulative reward values obtained for each of the first operations in the set of first operations performed including:
  • the largest cumulative return value is selected.
  • the method further includes: selecting a VM quantity adjustment The way;
  • Determining the first action to be performed on the system including:
  • the number of selected VMs is adjusted, the number of VMs used by the system is adjusted according to the load indicator of the system and the number of VMs used by the system.
  • the sixth possible implementation manner if the selected number of VMs is adjusted, according to the upper limit threshold of the load index of the system and the lower threshold of the load indicator of the system, To determine whether the number of VMs needs to be adjusted, after selecting the method of adjusting the number of VMs, it also includes:
  • the operation includes: adding p VMs, reducing q VMs, or keeping the number of VMs unchanged, the p being a preset upward adjustment step, the q being a preset downward adjustment step, p, q being A positive integer.
  • the load indicator upper limit threshold and the load indicator lower limit threshold are based on T historical moments before the acquired current time
  • the load indicators of the system described in each historical moment are determined according to the following conditions:
  • the performance indicator of the system meets the preset performance index requirement, and the number of VMs used is the least, where T is a positive integer.
  • the load indicator upper limit threshold and the load indicator lower threshold are specifically determined according to the following steps:
  • the input return ratio is determined by performing the following steps:
  • the load indicator of the system is predicted, and the prediction is based on the negative of the candidate.
  • the number of VMs is adjusted according to the load index of the system and the number of VMs used by the system.
  • the number of VMs is adjusted according to the load index of the system and the number of VMs used by the system.
  • the number of VMs can be accurately determined. The value enables the number of VM adjustments to be determined in real time based on the load change of the system and the number of VMs currently used, improving the real-time performance of the VM adjustment.
  • the performance index of the system meets the preset performance index requirement, and the number of VMs used by the system is the least. It can balance the performance of the system with the number of VMs of the system, and improve the VM utilization while ensuring the performance requirements of the system.
  • the method of reinforcement learning is adopted, and when the value of the adjustment is determined, the accumulated return value of the historical time before the current time is considered, and The possible return value at the next moment is also considered, so that it is no longer necessary to set the cooling time in the method shown in FIG. 1, thereby improving the real-time performance of the VM number adjustment.
  • unnecessary expansion and shrinkage operations can be reduced, and the ping-pong effect is slowed down.
  • the upper limit of the load index may be adjusted according to the historical load of the system. Threshold and load indicator lower threshold, flexible setting of VM number adjustment threshold according to system load, evaluation of different thresholds to select optimal threshold, improve system VM utilization, and ensure system performance index requirements.
  • the load index upper limit threshold and the load index lower limit threshold are adjusted according to the historical load of the system, after the VM number is adjusted, the performance index of the system meets the preset performance index requirement, and the number of VMs used is the least, and the system can be considered.
  • the performance metrics and the number of VMs required for the system are considered.
  • the load index upper limit threshold and the load index lower limit threshold are adjusted according to the historical load of the system, the available thresholds are respectively evaluated for different system load conditions, and the optimal threshold is selected, so that the VM used in the adjustment system is adjusted. When the number is adjusted, the optimal threshold is selected to improve the utilization efficiency of the VM.
  • FIG. 1 is a schematic diagram of a virtual machine quantity adjustment scheme
  • FIG. 2 is a schematic structural diagram of an apparatus for determining a VM number adjustment operation according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a second apparatus for determining a VM number adjustment operation according to an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram of an apparatus for determining a VM number adjustment operation according to an embodiment of the present invention
  • Figure 5 is a schematic diagram of a method of reinforcement learning
  • FIG. 6 is a flowchart of Embodiment 1 of the present invention.
  • Figure 7 is a schematic diagram of a cumulative return table
  • FIG. 8 is a schematic diagram of a process of updating a cumulative return table according to Embodiment 1 of the present invention.
  • Embodiment 9 is a schematic diagram of a data fitting process in Embodiment 2 of the present invention.
  • FIG. 10 is a flowchart of Embodiment 3 of the present invention.
  • FIG. 11 and FIG. 12 are diagrams showing the apparatus for adjusting the number of VMs and the VNF in the fourth embodiment of the present invention. Schematic diagram
  • FIG. 13 and FIG. 14 are schematic diagrams of service scenarios applicable to an embodiment of the present invention in Embodiment 5 of the present invention.
  • FIG. 15 is a schematic structural diagram of a fourth apparatus for determining a VM number adjustment operation according to an embodiment of the present disclosure
  • FIG. 16 is a flowchart of a method for determining a VM number adjustment operation according to an embodiment of the present invention.
  • An embodiment of the present invention provides an apparatus and method for determining a VM number adjustment operation, to provide a flexible configuration scheme of a VM.
  • the data collection module acquires the load indicator of the current time system and the number of VMs used by the system, wherein the system includes one or more VMs; the first decision module The data collection module determines a first operation to be performed on the system according to the acquired load indicator of the current time system and the number of VMs used by the system; wherein the first operation includes: adding m VMs, reducing n VMs, or maintaining VMs The quantity is unchanged, where m and n are positive integers, and m and n are determined by the first decision module according to the load index of the current time system and the number of VMs used by the system.
  • the number of VMs that are increased or decreased can be determined according to the load index of the current time system and the number of VMs used by the system, and is no longer a fixed setting value, and is more flexible and adaptable.
  • the load condition of the system and the usage of the VM are used to flexibly determine whether to increase or decrease the number of VMs to adapt to different scenarios.
  • the system includes one or more VMs implemented by the one or more VMs.
  • the system can be any VNF implemented by the VM, such as various network elements in the foregoing network: MME, PGW, HSS, and the like.
  • the device for determining the VM number adjustment operation provided by the embodiment of the present invention may be located outside the system or may be located in the system. For details, refer to Embodiment 4.
  • the device for determining the number of VMs is determined by the embodiment of the present invention, and is used to determine the operation of adjusting the number of VMs, and sends the result of the determination to the device for performing the VM number adjustment, and the device for performing the VM number adjustment is provided according to the embodiment of the present invention.
  • the determination result sent by the device that determines the VM number adjustment performs an operation of adjusting the number of VMs to the system.
  • the device performing the VM number adjustment may be the VNF manager and the virtualization infrastructure in the Network Funcitons Virtualization-Management and Orchestration (NFV-MANO) in FIG.
  • the Virtualised Infrastructure Manager (VIM) is configured by the two devices in conjunction with the number of VMs executing the system VNF.
  • VMM Virtualised Infrastructure Manager
  • the method for adjusting the number of VMs disclosed in the above-mentioned standard documents is only an optional implementation manner, and the embodiments of the present invention are directed to providing an apparatus and method for determining the number of VMs to adjust the number of VMs.
  • the decision of the operation does not limit the execution of the VM number adjustment operation. It can be considered that the decision scheme provided by the embodiment of the present invention can be applied to any execution scheme of the VM number adjustment including the manner disclosed by the above standard documents.
  • the system's load indicators may include, but are not limited to, the various service load indicators and various resource load indicators listed in Table 1 below.
  • System performance indicators may include, but are not limited to, the indicators listed in Table 2:
  • Performance Business establishment success rate Service establishment delay Packet transmission delay shake Packet loss rate Block error rate Bit error rate
  • the device for determining the VM number adjustment operation has the following three types:
  • the device 10 shown in Figure 2 includes:
  • the first decision module 202 determines the first operation to be performed on the system according to the load indicator of the current time system acquired by the data collection module 201 and the number of VMs used by the system;
  • the first operation includes:
  • the above m and n are determined by the first decision module 202 according to the load index of the current time system and the number of VMs used by the system.
  • the device 11 shown in FIG. 3 includes:
  • the implementation of the data collection module 201 and the first decision module 202 may refer to the apparatus 10 for determining the VM number adjustment operation.
  • the VM quantity adjustment mode selection module 204 is configured to select the VM quantity adjustment mode, that is, the first
  • the decision module 202 determines whether the decision is still made by the second decision module 203.
  • the second decision module 203 is specifically configured to:
  • the second operation includes: adding p VMs, reducing q VMs, or keeping the number of VMs unchanged; p is a preset upward adjustment step, q is a preset downward adjustment step, and p and q are A positive integer.
  • the difference from the first operation includes: the number of VMs in the second operation is preset.
  • the number of VMs is adjusted according to the load index of the current time system acquired by the data collection module 201 and the system used. The number of VMs is determined.
  • the device 12 shown in FIG. 4 includes: a data acquisition module 201 and a second decision module 203.
  • the implementation of the data acquisition module 201 and the second decision module 203 can be adjusted by referring to the second determination of the number of VMs as shown in FIG. Operated device 11.
  • FIG. 2 is a schematic structural diagram of an apparatus 10 for determining a VM number adjustment operation according to an embodiment of the present invention. As shown in FIG. 2, the device 10 includes:
  • the data collection module 201 is configured to acquire a load indicator of the current time system and a quantity of VMs used by the system, where the system includes one or more VMs;
  • the first decision module 202 is configured to determine, according to the load indicator of the current time system acquired by the data collection module 201 and the number of VMs used by the system, the first operation to be performed on the system;
  • the first operation includes: adding m VMs, reducing n VMs, or keeping the number of VMs unchanged, where m and n are positive integers, and m and n are load indexes of the first decision module 202 according to the acquired current time system. And the number of VMs used by the system is determined.
  • the data collection module 201 can acquire the load indicator of the system and the number of VMs used by the system in a preset period. For example: 1 minute or 5 minutes.
  • the data collection module 201 can collect one of the various indicators listed in Table 1 as a load indicator of the system, such as: CPU utilization.
  • various indicators listed in Table 1 may be collected, and various indicators are weighted and normalized, and the system load indicators are comprehensively calculated.
  • max_User_num is the maximum number of users of the system
  • is a weighting factor, 0 ⁇ 1, 0 ⁇ Disk_occupation_rate ⁇ 1.
  • the first decision module 202 may determine a plurality of options for performing the first operation to be performed on the system according to the obtained load index of the system at the current time and the number of VMs used by the system, and several of them are illustrated here. . Regardless of the manner in which it is used, the purpose of flexibly setting the number of adjusted VMs can be achieved as compared with the method shown in FIG.
  • Table 3 The correspondence table between the load index of the pre-stored system and the number of VMs used by the system is shown in Table 3. This table is used to indicate the number of VMs that the system should use if the system performance is guaranteed under the system load indicated by the system's load indicator.
  • Table 3 the correspondence between the system load and the number of VMs that the system should use.
  • the performance index of the system can be measured by a specific performance indicator in Table 2, such as: service establishment delay, or various performance indicators, in a similar manner to formula 1. Perform a weighted summation to calculate.
  • the performance metrics of the system can be compared with preset performance metric thresholds to determine whether the performance metrics of the system are guaranteed. For example, if the performance indicator of the system is the packet loss rate, it is determined that the packet loss rate is less than the preset packet loss rate threshold, which ensures the performance index of the system. For example, if the performance index of the system is the success rate of the service establishment, the performance of the system is ensured when the service establishment success rate is greater than the preset service establishment success rate threshold.
  • the first decision module 202 checks the table 3, determines the number of VMs that the system corresponding to the load indicator of the current time system of the acquired system, and the number of VMs used by the system at the current time obtained by the root data collection module 201, and determines the first to be executed on the system. Operation, that is, increase or decrease the number of VMs, or keep the number of VMs unchanged, and if the number of VMs is increased or decreased, the specific value of the number of VMs is increased or decreased, so that after the first operation is performed on the system, the system uses The number of VMs is equal to the number of VMs that the system should use for the current load indicator of the system.
  • the first decision module 202 obtains the current load index of the system as 25%, and looks up Table 3 to determine that the number of VMs that the system should use is three. If the number of VMs used by the system at the current time is five, Be sure to reduce 2 VMs.
  • the first decision module 202 obtains the current load index of the system at 75%, and looks up Table 3 to determine that the number of VMs that the system should use is eight, and if the current time is obtained, the number of VMs used by the system is four. Then determine to add 4 VMs.
  • the data collection module 201 can also obtain the load indicator of the system at the previous time.
  • the first decision module 202 determines the change of the load indicator of the system according to the current time acquired by the data collection module 201 and the load index of the system at the previous time. Trends, if it is determined that the system's load index is incremented, the number of VMs used by the adjusted system can be larger than the number of VMs that should be used by the system in Table 3, and the number of system buffer VMs is preset.
  • the data collection module 201 obtains the current time, and the load indicators of the system in the first four moments are: 20%, 30%, 35%, 40%, and 45%, respectively, and the number of VMs used by the system at the current time is 2, On the basis of adding 3 VMs, taking into account the increasing trend of the system's load indicators, and then increasing the preset system buffer VM number (assumed to be 1), a total of 4 VMs are added, and the number of VMs used by the system is adjusted. Is 6.
  • This method can be applied to the scenario of sudden business, and can rapidly increase or decrease the number of VMs to meet the load of the system.
  • the first decision module 202 determines a first operation to be performed on the system such that the performance metric of the system conforms to the preset performance indicator requirement after the first operation is performed, and the number of VMs used is the least;
  • the performance indicator of the system after performing the first operation is predicted by the first decision module 202 according to the load indicator of the current time system and the number of VMs used by the system after the first operation is performed; after the first operation is performed, the system
  • the number of VMs used is predicted by the first decision module 202 based on the number of VMs used by the system at the current time, and the determined first operation to be performed on the system.
  • the preset performance indicator requirement may be a preset Service Level Agreement (SLA) requirement.
  • SLA refers to the agreement between the operator and the customer to ensure the performance and reliability of the service at a certain cost. Often this cost is a major factor driving the quality of service provided by operators.
  • three performance indicators are specified in the SLA: service processing delay, packet loss rate of service packets, and bandwidth for processing services.
  • the benchmark values of these three performance indicators are 100 milliseconds delay, 1% packet loss rate, and 100 Mbps bandwidth.
  • the service processing delay is less than 100 ms and the packet loss rate is less than 1%, the bandwidth is greater than 100 Mbps.
  • the penalty method can be based on the time setting of the violation of the SLA.
  • the penalty for violating the service processing delay per unit time is p_1
  • the penalty for the violation of the packet loss rate is p_2
  • the penalty for violating the bandwidth is p_3.
  • the data collection module 201 is further configured to: before the first decision module 202 determines that the first operation to be performed on the system, obtain a performance indicator of the current time system;
  • the first decision module 202 can employ a method of Reinforcement Learning to determine the first operation to be performed on the system.
  • the main idea of reinforcement learning is to learn and choose the best action that can achieve the goal. 5, when the body of each operation to make a i in its environment, return the value r i, the main return from the learned value obtained in a subsequent operation to produce the maximum value of the cumulative reward.
  • the return value is divided into the cumulative return value and the immediate return value.
  • the accumulated return value is the cumulative result of the return value at some time before the current time, for example, the result of the summation;
  • the immediate return value is the return value obtained after the first operation a i is performed at the current time.
  • the main body is the first decision module 202, and the environment is the above “system”, and the reward value may be determined by the number of VMs used by the system and the performance index of the system under the load indicated by the current load indicator of the system.
  • the immediate return value r can be defined by the following formula 2:
  • Performance is the performance index of the system, which can be a specific performance indicator in Table 2.
  • Standards such as: business establishment success rate, reciprocal of business establishment delay; can also integrate various performance indicators, using weighted summation in a similar way to formula 1, to calculate: the weighted results meet: weighted summation performance indicators
  • the performance index after summation is larger; the larger the performance index such as the service establishment success rate, the larger the performance index after the weighted summation.
  • Vm_number is the number of VMs used by the system.
  • the first decision module 202 determines an immediate reward value obtained by performing the first operation by:
  • the instantaneous reward value obtained by performing the first operation on the system is determined according to the predicted number of VMs used by the system after the first operation and performance indicators of the system.
  • the first determining module 202 may determine, according to the manner, performing the cumulative operation of each of the first operations in the executable first operation set in the next state in which the system is located after the performing the first operation
  • the largest cumulative return value is selected.
  • FIG. 3 is a schematic structural diagram of a second apparatus 11 for determining a VM number adjustment operation according to an embodiment of the present invention. As shown in FIG. 3, the device 11 includes:
  • the implementation of the data collection module 201 and the first decision module 202 can refer to the first type above.
  • the implementation of the corresponding module in the device 10 for determining the VM number adjustment operation; the VM number adjustment mode selection module 204 is configured to select the VM number adjustment mode, that is, whether the decision is made by the first decision module 202 or the second decision module 203.
  • the second decision module 203 is specifically configured to:
  • the second operation includes: adding p VMs, reducing q VMs, or keeping the number of VMs unchanged; p is a preset upward adjustment step, q is a preset downward adjustment step, and p and q are A positive integer.
  • the difference from the first operation includes: the number of VMs in the second operation is preset.
  • the number of VMs is adjusted according to the load index of the current time system acquired by the data collection module 201 and the system used. The number of VMs is determined.
  • the scheme similar to the VM number adjustment shown in FIG. 1 is that the load index of the current time system is compared with a preset threshold, and whether the number of VMs is adjusted is determined according to the comparison result.
  • the threshold is determined according to the load index of the historical time system.
  • the data collection module 201 is further configured to: acquire a load indicator of each of the T historical moments before the current time, where T is a positive integer;
  • the load index upper limit threshold and the load index lower limit threshold are determined by the second decision module 203 according to the load index of each historical time system in the T historical moments before the current time acquired by the data collection module 201, and satisfy:
  • the performance index of the system after performing the second operation meets the preset performance index requirement, and the number of VMs used is the least, where T is a positive integer.
  • the preset performance index requirements may also be the requirements of the aforementioned SLA.
  • the second determining module 203 is specifically configured to determine a load indicator upper limit threshold and a load indicator lower limit threshold according to the following steps:
  • the input return ratio is determined by performing the following steps:
  • the load indicator of each historical time system acquired by the data collection module 201 predict the number of VMs used by the system after performing the second operation on the system according to the combination of the candidate load index upper threshold and the lower limit of the load index;
  • the load indicator of the historical time system and the predicted number of VMs used after the second operation of the system, and the performance index of the system after the second operation is predicted by the predictor;
  • the input return ratio is determined according to the number of VMs used by the system after performing the second operation and the performance index corresponding to each of the performance indicators, wherein the number of performance indicators that meet the preset performance index requirements of each performance indicator is larger. The smaller the total number of VMs used by the system at each historical moment, the higher the return on investment ratio;
  • the third embodiment is an example of a method for the second decision module 203 to determine the lower limit threshold of the load index and the upper limit threshold of the load indicator.
  • FIG. 4 is a schematic structural diagram of a third apparatus 12 for determining a VM number adjustment operation according to an embodiment of the present invention. As shown in Figure 4, the device 12 includes:
  • the data acquisition module 201 and the second decision module 203 wherein the implementation of the data acquisition module 201 and the second decision module 203 can refer to the implementation of the corresponding module in the device 11 for determining the VM number adjustment operation as shown in FIG.
  • Embodiment 1 is an example of a method for the first decision module 202 to determine the VM number operation
  • the second embodiment is an example of a method for fitting the data analysis module 205;
  • the third embodiment is an example of a method for the second decision module 203 to determine the VM number adjustment operation
  • the fourth embodiment describes the relationship between the device for determining the VM number adjustment operation and the VNF provided by the embodiment of the present invention
  • the fifth embodiment of the present invention provides a service scenario to which the embodiment of the present invention is applied.
  • Embodiment 1 describes a method by which the first decision module 202 adjusts the number of VMs.
  • the apparatus for determining the VM number adjustment operation may further include a data analysis module 205, configured to acquire, from the data collection module 201, a load indicator, a performance indicator, and a system used by the system at a historical time.
  • the number of VMs based on the obtained data, fits a function of the system's performance metrics to the system's load metrics and the number of VMs used by the system for use by the first decision module 202 in calculating the immediate return value (see steps). S604).
  • the possible state s i of the system constitutes a state set: ⁇ s i
  • i 1..M ⁇ , and in each state, there are N kinds of executable actions for the system, that is, the first operation There are N possible choices, N kinds of executable actions constitute an Action Set: ⁇ a i
  • i 1..N ⁇ , M, N are positive integers.
  • the immediate return value of the jth action a j corresponding to the i-th state s i is r i,j , and the accumulated return value is q i,j ; the load index of the system, the number of VMs used by the system, and the performance of the system
  • Equation 3 The functional relationship between the indicators is shown in Equation 3:
  • performance is the performance index of the system
  • workload is the load indicator of the system
  • vm_number is the number of VMs used by the system.
  • Equation 4 The immediate return value is shown in Equation 4 below:
  • the Q table in Fig. 6 is the cumulative return value table, referred to as the "cumulative return table", as shown in FIG.
  • the method of Embodiment 1 specifically includes the following steps:
  • S601 Initialize the state set, the action set, and the cumulative return table.
  • the state set contains all possible states of the system;
  • the action set is a set of first operations that the system can perform;
  • the cumulative return table is used to store the accumulated reward values of each state corresponding to each action;
  • the first decision module 202 obtains the load indicator, the performance indicator, and the number of VMs used by the system at the current time t from the data collection module 201.
  • the first decision module 202 determines to perform state matching, and determines the state s t of the current time system according to the load index, the performance index, and the number of VMs used by the system at the current time t obtained in step S602;
  • the state set includes a limited number of M states, and the M states can be defined by dividing the load indicator value of the system into A intervals, and dividing the value of the system performance index into B intervals.
  • Step S603 when determining the current state of the system, can determine the load index, the performance index of the system, and the number of VMs used by the system respectively, and then find the range from the state in which the three belong respectively.
  • the state s t at which the system is currently located referred to as the "current state”.
  • the load index workload current time t of the system performing an action after a j new performance metrics performance systems ', and performing the operation after a j System number of the VM vm_number', determines the execution state after the operation a j system is located , recorded as s t+k ;
  • the acquisition state s t + returns all accumulated value of k (i.e., in a state s t + k, each movement a 1, a 2, ..., a N corresponding accumulation
  • q t+k,j is the cumulative return value obtained by executing the action a j when the system is in the state s t+k last time
  • the accumulated reward values are updated by steps S604 and S605.
  • the difference between the accumulated return value and the immediate return value is that the accumulated return value not only considers the immediate return value of the current moment, but also considers the accumulation of all the return values of the state during the historical running process, and possible The maximum cumulative return value for a state. That is, the cumulative return value not only considers the impact of the historical state on the current state, but also the impact of the possible next state on the current state.
  • the above steps S604 to S605 can also refer to the schematic diagram shown in FIG. 8.
  • For the action a j in the action set calculate the performance index performance' of the system after executing the action, calculate the immediate return value r t,j according to the number of new VMs vm_number' of the system after performing the action, and performance';
  • the immediate return value r t,j the maximum cumulative return value q t+k,l corresponding to each action in the Q table in the next state S t+k after the action is performed, and the current state in the Q table of the current state t
  • the accumulated return value q t, j obtained by performing the action a j is calculated, and the updated q′ t,j is calculated , and the accumulated return value of the execution action a j corresponding to the state t in the Q table is updated with the value.
  • S607 Determine the cooling time. During the cooling time, the system no longer increases or decreases the number of VMs.
  • Step S607 is an optional step of ensuring the reliability of the system by the cooling time.
  • the cooling time may include: expansion cooling time, shrinkage cooling time, and anti-oscillation cooling time.
  • the capacity expansion cooling time is the interval between the two expansion operations (that is, the number of VMs is increased). Each time the capacity expansion/reduction capacity is determined, the expansion cooling time timer is decremented by 1. If the timer value is greater than zero, The new capacity expansion action (that is, the current number of VMs is not changed) is allowed. If the timer is less than or equal to zero, the capacity expansion decision is allowed. Once the decision to implement the capacity expansion is made, the expansion cooling time timer is reset.
  • the implementation of the reduction cooling time is similar to the expansion cooling time, but only for the shrinking action.
  • Anti-oscillation cooling time refers to the time between the decision to expand the capacity and the time to allow the refinement decision to be made again. After each expansion decision, the timer will be reset. After each expansion/reduction decision, the timer will be decremented by 1. If the timer value is greater than zero, even if the decision is reduced, it is not allowed. This action is performed (ie, the number of current VMs is kept constant), and if the timer value is less than or equal to zero, the shrinkage decision is allowed to be performed.
  • Step S607 is an optional step. If step S607 is not performed, after step S606 is performed, step S608 is directly executed: adjusting the number of VMs used by the system.
  • the number of VMs may be dynamically changed according to the load indicator of the current time system and the number of VMs used by the system at the current time.
  • the performance indicators of the system may be consistent with the preset performance. Under the requirements of the index, the number of VMs used by the system is the least, which improves the utilization efficiency of the VM.
  • the number of VM adjustments can be dynamically changed.
  • the number of VMs that are expanded or contracted corresponding to the upper expansion threshold or the lower expansion threshold is determined, and cannot be adjusted in real time according to the load index of the system.
  • the reward value of adding or deleting different VM numbers is quantitatively evaluated, and the action with the largest return value is selected as the action to be expanded or contracted to the system.
  • the first decision module 202 determines the first operation, it can be determined not only whether to increase, decrease or maintain the number of VMs, but also accurately determine the adjusted value of the number of VMs, and realize the determination according to the load index of the system.
  • the value of the VM quantity adjustment when determining the adjusted value, considers the cumulative return value of the historical moment before the current time, and also considers the possible return value at the next moment, so that it is no longer necessary to be in the method shown in FIG. , set the cooling time, which improves the real-time performance of the VM quantity adjustment.
  • the number of VM adjustments can be adapted to different system loads and system resource occupations.
  • the second embodiment introduces a method for data fitting by the data analysis module 205.
  • the method can be applied to any device for determining the VM number adjustment operation provided by the embodiment of the present invention, and is used for fitting a functional relationship between the performance index of the system and the load index of the system and the number of VMs used by the system.
  • the data collection module 201 collects the load index of the system, the number of VMs used by the system, and the performance index of the system in the historical time period before the current time.
  • the data acquisition module The block 201 may store the collected data in a history database, which may be located in the data collection module 201 or independent of the data collection module 201.
  • the historical time period may be several days in the past, several weeks, several months, or other longer or shorter time periods, the length of which may be determined according to the actual needs of the system operation.
  • the data collection module 201 may periodically collect the foregoing data, where the data may be an instantaneous value of a fixed average value, a maximum value, or a sampling time within a sampling period.
  • the data collection module 201 may initiate a data query request to the monitoring module for monitoring the foregoing data. After receiving the query request, the monitoring module sends the requested data to the data collection module 201; or, the monitoring module cycle The data is actively reported to the data collection module 201.
  • the data analysis module 205 extracts the load index, the performance index, and the number of VMs used by the system in a historical time period from the historical database, and uses the fitting algorithm to calculate the performance index performance and the load indicator workload and the number of VMs used by the system.
  • machine learning algorithms such as linear fitting, polynomial fitting, etc. may be employed.
  • the relationship between the performance indicator and the load indicator and the number of VMs used by the system is obtained according to the collected historical time data, so that the first decision module 202 and the second decision module 203 can be provided according to the second embodiment.
  • the functional relationship predicts the return value of different operations and selects the operation with the highest return. According to the requirements of different precisions and complexity, different fitting algorithms can be selected in this embodiment during the implementation.
  • the second decision module 203 determines the upper limit threshold of the load index and the lower limit threshold of the load indicator. Program.
  • the data collection module 201 is further configured to acquire T historical times before the current time. Inscribed, the load indicator of the system at each historical moment, where T is a positive integer.
  • the data collection module 201 can periodically collect the load index of the system by using a preset data collection period Period.
  • the T load indicators may be load indicators collected at T historical moments within the pre-T*Period of the current time, or may be load indicators collected during any T acquisition periods before the current time.
  • the T historical moments may be historical moments in the past several days, weeks, or months.
  • the data collection module 201 may store the collected load indicators of the system at the T historical moments in a historical database.
  • the historical database may be located in the data collection module 201 or independent of the data collection module 201.
  • the load indicator of the T historical moments may be a load indicator collected in all collection periods of the past day: w 1 , w 2 , . . . , w T
  • the change of the load index is basically in units of days.
  • the change of the system load index of the previous day the change of the current system's load index can be basically predicted.
  • the optimal load index upper threshold and the lower limit of the load index are selected, so that the adjustment of the number of VMs of the current system is adapted to the change of the load index of the system, and the number of VMs is minimized. , to meet the requirements of the default performance indicators.
  • the load index of the T historical moments may be the load index collected in all the collection periods in the past week, and it is considered that the change of the system load indicator is basically in units of weeks; or, the load indicators of the T historical moments may be past For the load indicators collected in all collection periods of one month, it is considered that the changes in the system load indicators are basically in units of months.
  • the possible values of the upper limit threshold of the load index are th 1 , th 2 ,...,th U
  • the possible values of the lower limit of the load index are tl 1 , tl 2 ,..., tl L
  • the threshold update process is
  • the historical load indicator is a reference, and a pair of optimal thresholds are selected from all possible threshold pairs (tl i , th j ), and the evaluation criterion adopted is the input return ratio, and each performance indicator meets the preset performance index.
  • the more the required performance indicators the smaller the total number of VMs used in each historical moment, and the higher the return on investment ratio.
  • the specific calculation process is shown in Figure 10 and includes the following steps:
  • the second decision module 203 acquires the load indicators w 1 , w 2 , . . . , w T of the T historical time system from the data collection module 201.
  • the data collection module 201 stores the collected load indicators in their own historical database
  • the second decision module 203 selects a set of threshold pairs (tl i , th j ) from the candidate pair of thresholds, and uses the threshold pair as the lower limit of the load index threshold and the upper limit of the load index, and the load of the system for the T historical moments.
  • the indicators w 1 , w 2 , . . . , w T determine the second operation to be performed on the system;
  • the second operation to be performed on the system is determined with the selected threshold pair (tl i , th j ), and the number of VMs used by the system is predicted to be v t after performing the second operation.
  • the performance index p t is calculated according to the following formula 6:
  • ROI i,j h((v 1 ,v 2 ,...,v T ),(p 1 ,p 2 ,...,p T )).
  • the ROI i,j may be defined as a ratio of the total time of the system performance indicator to the preset performance indicator threshold in the T historical moments, and the total time of the VM running.
  • the ROI i, j can be calculated by the following formula 8:
  • step S1004 selecting, from the U ⁇ L ROIs calculated in step S1003, a threshold pair corresponding to the largest ROI as the optimal threshold pair, and using the upper limit threshold of the load index in the optimal threshold pair as the optimal upper limit threshold of the load index.
  • the lower limit of the load index is used as the optimal lower limit threshold of the load indicator;
  • S1005 Adjust the number of VMs used by the system according to the selected optimal load index lower threshold and the optimal load index upper threshold.
  • Embodiment 3 provides a method for determining a load index upper limit threshold and a load indicator lower limit threshold. This method can solve the problem that the threshold is difficult to determine.
  • the second decision module 203 can periodically run the steps S1001 to S1003 mentioned in this embodiment to adjust the upper limit threshold of the load index and the lower limit of the load index, so that when the number of VMs used by the system is adjusted, the optimal threshold is used. Adjust to improve the utilization efficiency of VM.
  • the load index upper threshold and the load index lower threshold are manually specified, and the user is instructed to invoke the cloud service provider's Application Programming Interface (API) to threshold.
  • API Application Programming Interface
  • the configured threshold cannot be adapted to the current system load. Blind settings may result in wasted resources or performance indicators cannot meet the requirements.
  • the threshold can adapt to the change of the system load, and the utilization efficiency of the VM is improved.
  • the fourth embodiment describes the relationship between the device for determining the VM number adjustment operation and the VNF provided by the embodiment of the present invention.
  • the apparatus for determining the VM number adjustment operation may be deployed inside each VNF, as shown in FIG. 11; or may be deployed outside the VNF to manage and arrange the VNF.
  • the VNF Manager (VNFM), as shown in Figure 12.
  • the device for adjusting the operation may be located in a service control unit for performing service control or a resource control unit for performing resource control in the VNF, where the unit for performing service control is used to establish a service, release a service, and adjust a service.
  • the unit for resource control is used to control, add, delete, etc. resources including the VM.
  • each of VNF-1, VNF-2, and VNF3 has a means for determining the VM number adjustment operation.
  • the apparatus for determining the VM number adjustment operation provided by the embodiment of the present invention is deployed in a network element other than the VNF that is responsible for managing and orchestrating the VNF, for example, in the VNF manager. Since a VNF is managed by a VNF manager, for different VNFs, the apparatus for determining the VM number adjustment operation provided by the embodiment of the present invention needs to be deployed in its corresponding VNF manager to implement different VNFs. The number of VMs is adjusted.
  • the service scenarios applicable to the embodiments of the present invention may include two basic service scenarios (Basic Scenario 1 and Basic Scenario 2) as shown in FIG. 13, and the integrated scenario shown in FIG. 13
  • the basic scenario 1 shown in FIG. 13 is a daily busy hour idle feature.
  • the main feature of the scenario is that the system load will show obvious peaks and troughs with time, and the duration of the peaks and troughs. Longer. For example: every day from 8 am to 10 pm is busy, other time periods are idle;
  • the basic scenario 2 shown in FIG. 13 is a bursty business scenario.
  • the main feature of the scene is that it also includes peaks and troughs, but the duration of the peaks and troughs is shorter. For example, a short-term business peak occurred between 12:30 and 12:45.
  • Figure 14 shows an integrated scenario, which is a combination of the two basic business scenarios shown in Figure 13.
  • the embodiments of the present invention are applicable to any of the foregoing service scenarios, and can implement accurate and real-time adjustment of the number of VMs.
  • the device for determining the VM number adjustment operation provided by the embodiment of the present invention is described.
  • the following describes the fourth device for determining the VM number adjustment operation provided by the embodiment of the present invention.
  • a fourth apparatus for determining a VM number adjustment operation includes:
  • a memory 1501 configured to store a program for adjusting the number of VMs
  • the processor 1502 is configured to call the program in the memory 1501 to determine an operation of adjusting the number of VMs performed by the system.
  • the processing performed by the processor 1502 may be specifically referred to the processing in the apparatus for determining the VM number adjustment operations of the first, second, and third types provided by the embodiments of the present invention, and the repeated description is omitted.
  • processor 1502 performs the following processing:
  • the first operation includes: adding m VMs, reducing n VMs, or keeping the number of VMs unchanged, where m and n are positive integers, and m and n are load indicators of the system according to the current time and the number of VMs used by the system. definite.
  • the bus architecture may include any number of interconnected buses and bridges, specifically linked by one or more processors represented by processor 1502 and various circuits of memory represented by memory 1501.
  • the bus architecture can also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and, therefore, will not be further described herein.
  • the bus interface provides an interface.
  • the user interface 1503 may also be an interface capable of externally connecting the required devices, including but not limited to a keypad, a display, a speaker, a microphone, a joystick, and the like.
  • the device for determining the VM number adjustment operation provided by the embodiment of the present invention is introduced. Based on the same inventive concept as the device, the embodiment of the present invention further provides a method for determining the VM number adjustment operation, which can be implemented by referring to the device. Implementation, repetition will not be repeated.
  • FIG. 16 is a flowchart of a method for determining a VM number adjustment operation according to an embodiment of the present invention. As shown in FIG. 16, the method includes:
  • S1601 Obtain the load indicator of the current time system and the number of VMs used by the system, where The system includes one or more VMs;
  • S1603 Determine, according to the current load indicator of the system and the number of VMs used by the system, the first operation to be performed on the system;
  • the first operation includes: adding m VMs, reducing n VMs, or keeping the number of VMs unchanged, where m and n are positive integers, and m and n are load indicators of the system according to the current time and the number of VMs used by the system. definite.
  • determining a first operation to be performed on the system including:
  • the performance indicator of the system after performing the first operation is predicted according to the load indicator of the current time system and the number of VMs used by the system after the first operation is performed; the number of VMs used by the system after performing the first operation is based on The number of VMs used by the system at the current time, as well as the determined first operation predicted.
  • the method before determining the first operation to be performed on the system, the method further includes: acquiring a performance indicator of the current time system;
  • Determine the first action to perform on the system including:
  • the return value is determined according to the number of VMs used by the system and the performance index of the system under the load indicated by the current load indicator of the system.
  • determining an immediate reward value obtained by performing the first operation on the system at the current moment including:
  • the instantaneous reward value obtained by performing the first operation on the system at the current time is determined according to the predicted number of VMs used by the system after the first operation and the performance index of the system.
  • determining a maximum value of the accumulated reward values obtained by performing each of the first operations of the set of executable first operations on the system in the next state in which the system is located after performing the first operation include:
  • the largest cumulative return value is selected.
  • the method before determining the first operation to be performed on the system, the method further includes: selecting a manner of adjusting the number of VMs;
  • Determine the first action to perform on the system including:
  • the number of selected VMs is adjusted, the number of VMs used by the system is adjusted according to the current load index of the system and the number of VMs used by the system.
  • the first operation to be performed on the system is determined according to the acquired load indicator of the current time system and the number of VMs used by the system.
  • the method further includes:
  • the load indicator upper limit threshold and the load indicator lower limit threshold are determined according to the following conditions according to the load index of each historical time system among the T historical moments before the acquired current time:
  • the performance indicators of the system meet the preset performance index requirements, and the number of VMs used is the least, where T is a positive integer.
  • the upper limit threshold of the load indicator and the lower limit of the load indicator are specifically determined according to the following steps:
  • the input return ratio is determined by performing the following steps:
  • For the load indicator of each historical time system acquired predict the number of VMs used by the system after performing the second operation on the system according to the combination of the candidate load index upper threshold and the lower limit of the load index; and according to the historical time The load indicator and the predicted number of VMs used by the system after performing the second operation, predicting performance indicators of the system after performing the second operation;
  • the input return ratio is determined according to the number of VMs used by the system after performing the second operation and the performance index corresponding to each of the performance indicators, wherein the number of performance indicators that meet the preset performance index requirements of each performance indicator is larger. The smaller the total number of VMs used by the system at each historical moment, the higher the return on investment ratio;
  • an embodiment of the present invention provides an apparatus and method for determining a VM number adjustment operation. If the number of VMs is adjusted according to the load index of the system and the number of VMs used by the system, it is not only determined whether to increase, decrease, or keep the number of VMs, but also accurately determine the value of the VM number adjustment.
  • the number of VM adjustments can be determined in real time according to the load change of the system and the number of VMs currently used, and the real-time performance of the VM adjustment is improved.
  • the threshold of the VM number adjustment can be flexibly set according to the load of the system, and the different thresholds are evaluated to select the optimal threshold, thereby improving the system VM utilization. , to ensure the performance requirements of the system.
  • the performance indicators of the system meet the preset performance index requirements, and the number of VMs used by the system is the minimum. It can balance the performance of the system and the number of VMs of the system, and improve the VM utilization while ensuring the performance requirements of the system.
  • the method of reinforcement learning is adopted, and when the adjusted value is determined, the accumulated return value of the historical moment before the current moment is considered. Moreover, the possible return value at the next moment is also considered, so that it is no longer necessary to set the cooling time in the method shown in FIG. 1, thereby improving the real-time performance of the VM number adjustment.
  • unnecessary expansion and shrinkage operations can be reduced, and the ping-pong effect is slowed down.
  • the load indicator upper limit threshold and the load indicator lower limit threshold are adjusted according to the historical load of the system, after the VM number is adjusted, the performance index of the system meets the preset performance index requirement, and the number of VMs used is the least, and both can be taken into consideration.
  • the performance metrics of the system and the number of VMs in the system are adjusted according to the historical load of the system.
  • the load indicator upper limit threshold and the load indicator lower limit threshold are adjusted according to the historical load of the system, the available thresholds are respectively evaluated for different system load conditions, and the optimal threshold is selected, so that the adjustment system is used.
  • the number of VMs is adjusted according to the selected optimal threshold, the utilization efficiency of the VM is improved.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may employ an entirely hardware embodiment, an entirely software embodiment, Or in the form of an embodiment of the software and hardware aspects. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Supply And Distribution Of Alternating Current (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to cloud computing technology, in particular to a device and method for determining an operation for adjusting the number of virtual machines, and is used for providing a solution for flexibly configuring VMs. In the device for determining an operation for adjusting the number of VMs provided by the embodiments of the present invention, a data collection module acquires a load index of a system and the number of VMs used by the system at the current moment; and a first judgement module determines, according to the load index of the system and the number of VMs used by the system at the current moment, a first operation to be executed on the system, wherein the first operation comprises: increasing the number of VMs to be m, decreasing the number of VMs to be n, or keeping the number of VMs unchanged, with m and n being positive integers and being determined by the first judgement module according to the load index of the system and the number of VMs used by the system at the current moment. Since the increased or decreased number of VMs can be determined according to a load index of a system and the number of VMs used by the system at the current moment, and is no longer a fixed set value, the implementation thereof is more flexible.

Description

一种确定虚拟机数量调整操作的装置和方法Device and method for determining virtual machine number adjustment operation 技术领域Technical field
本发明涉及云计算技术,尤其涉及一种确定虚拟机数量调整操作的装置和方法。The present invention relates to cloud computing technologies, and in particular, to an apparatus and method for determining a virtual machine number adjustment operation.
背景技术Background technique
云计算(Cloud Computing)技术将网络上分布的计算、存储、服务构件、网络软件/硬件等资源集中起来,基于资源虚拟化的方式为用户提供方便快捷的服务。Cloud Computing technology integrates computing, storage, service components, network software/hardware resources distributed on the network, and provides users with convenient and fast services based on resource virtualization.
对于传统的网络,可通过一个或多个虚拟机实现网络中网元的功能。比如:对于移动通信核心网——演进型分组核心网(Evolved Packet Core,EPC),EPC网络中的EPC网元,比如:移动性管理实体(Mobility Management Entity,MME)、分组数据网络网关(Packet data network GateWay,PGW)、服务网关(Serving GateWay,SGW)、归属用户服务器(Home Subscriber Server,HSS)等,可作为虚拟网络功能(Virtualized Network Function,VNF)部署在云中。在采用了云技术的EPC网络内部,不同的VNF由一个或多个虚拟机(Virtual Machine,VM)组成。For a traditional network, the functions of network elements in the network can be implemented by one or more virtual machines. For example, for the mobile communication core network - Evolved Packet Core (EPC), EPC network elements in the EPC network, such as: Mobility Management Entity (MME), Packet Data Network Gateway (Packet) The data network GateWay (PGW), the Serving GateWay (SGW), and the Home Subscriber Server (HSS) can be deployed in the cloud as virtualized network functions (VNFs). Within an EPC network with cloud technology, different VNFs consist of one or more virtual machines (VMs).
VNF中VM的数量可随着业务的变化调整,这种自动调整过程被称为“自动扩容/缩容:”用户可以通过供应商提供的应用程序编程接口(Application Programming Interface,API)设定相应的VM数量调整方案。The number of VMs in the VNF can be adjusted as the business changes. This automatic adjustment process is called “automatic capacity expansion/reduction:” Users can set the corresponding application programming interface (API) provided by the vendor. The VM number adjustment program.
图1示出了现有的一种VM数量调整方案。该方案中,利用中央处理单元(Central Processing Unit,CPU)利用率来衡量系统的负载,根据系统负载调整VM数量。当系统的负载超过用户预先设定的扩容上限阈值时,执行与该阈值相对应的动作,比如:增加一个VM,并且此后长度为扩容冷却时间的时间段内,无论负载是否超过扩容上限阈值均不再增加VM;类似地,当系统的负载低于用户预先设定的缩容下限阈值时,执行与该阈值相对应的动作, 比如:减少一个VM,并且在此后长度为缩容冷却时间的时间段内,无论系统的负载是否超过阈值下限均不能再减少VM。FIG. 1 shows an existing VM number adjustment scheme. In this solution, the central processing unit (CPU) utilization is used to measure the load of the system, and the number of VMs is adjusted according to the system load. When the load of the system exceeds the upper limit of the expansion limit set by the user, an action corresponding to the threshold is performed, for example, adding a VM, and the length is a period of the expansion cooling time, regardless of whether the load exceeds the upper expansion threshold. No longer increase the VM; similarly, when the load of the system is lower than the user's preset lower limit threshold, the action corresponding to the threshold is performed, For example, if one VM is reduced, and then the length is the condensed cooldown time, the VM can no longer be reduced regardless of whether the system load exceeds the lower threshold.
该方案中,在满足扩容或缩容条件下,增加或减少的VM数量只能是固定值,实现不灵活,在某些场景下,比如:出现突发性业务的场景下,只能增加固定数目的VM,扩容的效果慢。In this solution, the number of VMs that can be increased or decreased can only be fixed if the capacity is increased or reduced. In some scenarios, for example, in the case of sudden service, the number of VMs can only be fixed. The number of VMs is slow to expand.
发明内容Summary of the invention
本发明实施例提供一种确定VM数量调整操作的装置和方法,用以提供一种灵活的配置VM的方案。An embodiment of the present invention provides an apparatus and method for determining a VM number adjustment operation, to provide a flexible configuration scheme of a VM.
第一方面,本发明实施例提供一种确定虚拟机VM数量调整操作的装置,包括:In a first aspect, an embodiment of the present invention provides an apparatus for determining a virtual machine VM number adjustment operation, including:
数据采集模块,用于获取当前时刻系统的负荷指标和所述系统使用的VM的数量,其中,所述系统包括一个或多个VM;a data acquisition module, configured to acquire a load indicator of a current time system and a number of VMs used by the system, where the system includes one or more VMs;
第一判决模块,用于根据当前时刻所述系统的负荷指标和所述系统使用的VM的数量,确定要对所述系统执行的第一操作;a first determining module, configured to determine, according to a load indicator of the system at the current time and a number of VMs used by the system, a first operation to be performed on the system;
所述第一操作包括:增加m个VM、减少n个VM,或保持VM数量不变,其中,m、n为正整数,且m、n是所述第一判决模块根据当前时刻所述系统的负荷指标和所述系统使用的VM的数量确定的。The first operation includes: adding m VMs, reducing n VMs, or keeping the number of VMs unchanged, where m, n are positive integers, and m, n are systems of the first decision module according to current time The load indicator and the number of VMs used by the system are determined.
结合第一方面,在第一种可能的实现方式中,所述第一判决模块具体用于:With reference to the first aspect, in a first possible implementation, the first determining module is specifically configured to:
确定第一操作,以使在执行第一操作之后,所述系统的性能指标符合预设的性能指标要求,且使用的VM的数量最少;Determining the first operation, so that after performing the first operation, the performance indicators of the system meet the preset performance index requirements, and the number of VMs used is the least;
其中,执行第一操作之后所述系统的性能指标,是所述第一判决模块根据当前时刻所述系统的负荷指标,以及执行所述第一操作之后所述系统使用的VM的数量预测的;执行第一操作之后所述系统使用的VM的数量,是所述第一判决模块根据当前时刻所述系统使用的VM的数量,以及确定的第一操作预测的。 The performance indicator of the system after performing the first operation is predicted by the first decision module according to the load indicator of the system at the current time, and the number of VMs used by the system after performing the first operation; The number of VMs used by the system after performing the first operation is predicted by the first decision module according to the number of VMs used by the system at the current time and the determined first operation.
结合第一方面的第一种可能的实现方式,在第二种可能的实现方式中,所述数据采集模块还用于:在所述第一判决模块确定第一操作之前,获取当前时刻所述系统的性能指标;With reference to the first possible implementation of the first aspect, in a second possible implementation, the data collection module is further configured to: before the first determining module determines the first operation, obtain the current time Performance indicators of the system;
所述第一判决模块具体用于:The first decision module is specifically configured to:
根据当前时刻所述系统的负荷指标、性能指标和所述系统使用的VM的数量,确定当前时刻所述系统所处的当前状态;Determining a current state of the system at the current moment according to the load indicator, the performance indicator, and the number of VMs used by the system in the current moment;
对于可执行的第一操作的集合中的每一个第一操作,确定如下三项数值,并根据确定的如下三项数值,更新在所述当前状态下,对所述系统执行该第一操作得到的累积的回报值:For each of the first operations of the set of executable first operations, determining the following three values, and updating according to the determined three values, in the current state, performing the first operation on the system Cumulative return value:
上一次所述系统处于所述当前状态下,对所述系统执行该第一操作得到的累积的回报值、在当前时刻对所述系统执行该第一操作得到的即时的回报值,以及上一次所述系统处于下一个状态下,对所述系统执行所述可执行的第一操作的集合中的每一个第一操作得到的累积的回报值中的最大值,其中,所述下一个状态为执行该第一操作之后所述系统所处的状态;The last time the system is in the current state, the cumulative reward value obtained by performing the first operation on the system, the immediate reward value obtained by performing the first operation on the system at the current time, and the last time The system is in a next state, performing a maximum of the accumulated reward values obtained by each of the first set of executable first operations for the system, wherein the next state is The state in which the system is located after performing the first operation;
从更新后的每一个第一操作对应的、对所述系统执行该第一操作得到的累积的回报值中,选择最大的累积的回报值对应的第一操作,作为要对所述系统执行的第一操作;Selecting, from the accumulated reward value obtained by performing the first operation on the system corresponding to each of the updated first operations, a first operation corresponding to the largest accumulated reward value, as being performed on the system First operation
其中,所述回报值是所述第一判决模块根据所述系统使用的VM的数量,以及所述系统在当前时刻所述系统的负荷指标所指示的负荷下的性能指标确定的,所述系统使用的VM的数量越少,所述系统的性能指标指示所述系统的性能越高,所述回报值越大。The reward value is determined by the first decision module according to the number of VMs used by the system, and the performance index of the system under the load indicated by the load indicator of the system at the current time, the system The fewer the number of VMs used, the higher the performance metric of the system indicates the higher the performance of the system, the greater the reward value.
结合第一方面的第二种可能的实现方式,在第三种可能的实现方式中,所述第一判决模块具体用于:In conjunction with the second possible implementation of the first aspect, in a third possible implementation, the first
根据预测的执行该第一操作之后所述系统使用的VM的数量,以及当前时刻所述系统的负荷指标,预测执行该第一操作之后所述系统的性能指标;Predicting performance indicators of the system after performing the first operation according to the predicted number of VMs used by the system after performing the first operation, and load indicators of the system at the current time;
根据预测的执行该第一操作之后所述系统使用的VM的数量和所述系统的性能指标,确定对所述系统执行该第一操作得到的即时的回报值。 And determining an immediate reward value obtained by performing the first operation on the system according to the predicted number of VMs used by the system after performing the first operation and performance indicators of the system.
结合第一方面的第二种可能的实现方式,在第四种可能的实现方式中,所述第一判决模块具体用于:With reference to the second possible implementation of the first aspect, in a fourth possible implementation, the first determining module is specifically configured to:
根据当前时刻所述系统的负荷指标、执行该第一操作之后所述系统使用的VM的数量,预测在执行该第一操作之后所述系统所处的下一个状态;Determining, according to the load indicator of the system at the current moment, the number of VMs used by the system after performing the first operation, the next state in which the system is located after performing the first operation;
确定在所述下一个状态下,对所述系统执行所述可执行的第一操作的集合中的每一个第一操作得到的累积的回报值;Determining, in the next state, performing, for the system, a cumulative reward value obtained for each of the first operations of the set of executable first operations;
从确定的各累积的回报值中,选取最大的累积的回报值。From the determined cumulative return values, the largest cumulative return value is selected.
结合第一方面,在第五种可能的实现方式中,In combination with the first aspect, in a fifth possible implementation,
所述装置还包括:VM数量调整方式选择模块,用于选择VM数量调整的方式;The device further includes: a VM quantity adjustment mode selection module, configured to select a mode for adjusting the number of VMs;
所述第一判决模块具体用于:The first decision module is specifically configured to:
若所述VM数量调整方式选择模块选择的VM数量调整的方式为:根据当前时刻所述系统的负荷指标和所述系统使用的VM的数量,调整所述系统使用的VM的数量,则The method for adjusting the number of VMs selected by the VM quantity adjustment mode selection module is: adjusting the number of VMs used by the system according to the load indicator of the system at the current time and the number of VMs used by the system,
根据当前时刻所述系统的负荷指标和所述系统使用的VM的数量,确定要对所述系统执行的第一操作。The first operation to be performed on the system is determined based on the load indicator of the system at the current time and the number of VMs used by the system.
结合第一方面的第五种可能的实现方式,在第六种可能的实现方式中,所述装置还包括第二判决模块,用于:In conjunction with the fifth possible implementation of the first aspect, in a sixth possible implementation, the apparatus further includes a second determining module, configured to:
在所述VM数量调整方式选择模块选择的VM数量调整的方式为:按照所述系统的负荷指标上限阈值和系统的负荷指标下限阈值,判断是否需要调整VM数量之后,The method for adjusting the number of VMs selected by the VM quantity adjustment mode selection module is: determining whether the number of VMs needs to be adjusted according to the upper limit threshold of the load index of the system and the lower limit threshold of the load indicator of the system,
将所述数据采集模块获取的当前时刻所述系统的负荷指标与所述系统的负荷指标上限阈值和所述系统的负荷指标下限阈值比较,根据比较结果确定要对所述系统执行的第二操作,所述第二操作包括:增加p个VM、减小q个VM,或保持VM数量不变,所述p为预设的向上调整步长,所述q为预设的向下调整步长,p、q为正整数。Comparing the load indicator of the system at the current time acquired by the data collection module with the upper limit threshold of the load indicator of the system and the lower limit threshold of the load indicator of the system, and determining a second operation to be performed on the system according to the comparison result The second operation includes: adding p VMs, reducing q VMs, or keeping the number of VMs unchanged, the p being a preset upward adjustment step, and the q being a preset downward adjustment step , p, q are positive integers.
结合第一方面的第六种可能的实现方式,在第七种可能的实现方式中, 所述数据采集模块还用于:获取当前时刻之前的T个历史时刻中,每一个历史时刻所述系统的负荷指标,其中T为正整数;In conjunction with the sixth possible implementation of the first aspect, in a seventh possible implementation, The data collection module is further configured to: acquire a load indicator of the system in each of the T historical moments before the current time, where T is a positive integer;
所述负荷指标上限阈值和所述负荷指标下限阈值是所述第二判决模块根据当前时刻之前的T个历史时刻中,每一个历史时刻所述系统的负荷指标,按照如下条件确定的:The load indicator upper limit threshold and the load indicator lower limit threshold are determined by the second decision module according to the following conditions according to the load index of the system in each of the T historical moments before the current time:
在对所述系统执行所述第二操作之后,所述系统的性能指标符合所述预设的性能指标要求,且使用的VM的数量最少。After performing the second operation on the system, the performance indicators of the system meet the preset performance index requirements, and the number of VMs used is the least.
结合第一方面的第七种可能的实现方式,在第八种可能的实现方式中,所述第二判决模块具体用于按照如下步骤确定所述负荷指标上限阈值和所述负荷指标下限阈值:With reference to the seventh possible implementation manner of the first aspect, in the eighth possible implementation, the second determining module is specifically configured to determine the load indicator upper limit threshold and the load indicator lower threshold according to the following steps:
针对每一个备选的负荷指标上限阈值和负荷指标下限阈值的组合,通过执行如下步骤,确定投入回报比:For each combination of the upper limit threshold of the load indicator and the lower limit of the load indicator, the input return ratio is determined by performing the following steps:
对于所述数据采集模块获取的每一个历史时刻所述系统的负荷指标,预测根据该备选的负荷指标上限阈值和负荷指标下限阈值的组合对所述系统执行第二操作后,所述系统使用的VM数量;并根据该历史时刻所述系统的负荷指标和预测的执行第二操作后所述系统使用的VM数量,预测执行第二操作之后所述系统的性能指标;For the load indicator of the system at each historical time acquired by the data collection module, predicting that the system performs the second operation after performing the second operation on the system according to the combination of the candidate load index upper threshold and the lower limit of the load indicator The number of VMs; and predicting performance indicators of the system after performing the second operation according to the load indicator of the system at the historical moment and the predicted number of VMs used by the system after performing the second operation;
根据每一个历史时刻所对应的、执行所述第二操作之后所述系统使用的VM数量和的性能指标,确定投入回报比,其中,各性能指标中符合所述预设的性能指标要求的性能指标的数量越多,各历史时刻所述系统使用的VM数量的总和越少,所述投入回报比越高;Determining an input return ratio according to a performance index of the number of VMs used by the system after performing the second operation corresponding to each historical moment, wherein performance of each performance indicator meeting the preset performance index requirement The greater the number of indicators, the less the sum of the number of VMs used by the system at each historical moment, and the higher the return on investment ratio;
选择最大投入回报比对应的备选的负荷指标上限阈值和负荷指标下限阈值的组合;将选择的该组合中的负荷指标上限阈值,作为确定的所述负荷指标上限阈值,将选择的该组合中的负荷指标下限阈值,作为确定的所述负荷指标下限阈值。Selecting a combination of the corresponding maximum load return ratio and the corresponding load indicator upper limit threshold and the load indicator lower limit threshold; selecting the selected load indicator upper limit threshold as the determined load indicator upper limit threshold, the selected combination is selected The lower limit threshold of the load index is determined as the lower limit threshold of the load indicator.
第二方面,本发明实施例提供一种确定虚拟机VM数量调整操作的方法,包括: In a second aspect, an embodiment of the present invention provides a method for determining a virtual machine VM number adjustment operation, including:
获取当前时刻系统的负荷指标和所述系统使用的VM的数量,其中,所述系统使用一个或多个VM;Obtaining a load indicator of the current time system and a number of VMs used by the system, wherein the system uses one or more VMs;
根据当前时刻所述系统的负荷指标和所述系统使用的VM的数量,确定要对所述系统执行的第一操作;Determining a first operation to be performed on the system according to a load indicator of the system at the current time and a number of VMs used by the system;
所述第一操作包括:增加m个VM、减少n个VM,或保持VM数量不变,其中,m、n为正整数,且m、n是根据当前时刻所述系统的负荷指标和所述系统使用的VM的数量确定的。The first operation includes: adding m VMs, reducing n VMs, or keeping the number of VMs unchanged, where m and n are positive integers, and m and n are load indicators of the system according to the current time and the The number of VMs used by the system is determined.
结合第二方面,在第一种可能的实现方式中,确定要对所述系统执行的第一操作,包括:With reference to the second aspect, in a first possible implementation, determining a first operation to be performed on the system includes:
确定第一操作,以使执行第一操作之后所述系统的性能指标符合预设的性能指标要求,且使用的VM的数量最少;Determining the first operation, so that the performance indicator of the system after performing the first operation meets the preset performance index requirement, and the number of VMs used is the least;
其中,执行所述第一操作之后所述系统的性能指标,是根据当前时刻所述系统的负荷指标,以及执行所述第一操作之后所述系统使用的VM的数量预测的;执行所述第一操作之后所述系统使用的VM的数量,是根据当前时刻所述系统使用的VM的数量,以及确定的第一操作预测的。The performance indicator of the system after performing the first operation is predicted according to the load indicator of the system at the current time, and the number of VMs used by the system after performing the first operation; The number of VMs used by the system after an operation is predicted based on the number of VMs used by the system at the current time, and the determined first operation.
结合第二方面的第一种可能的实现方式,在第二种可能的实现方式中,在确定要对所述系统执行的第一操作之前,还包括:获取当前时刻所述系统的性能指标;With reference to the first possible implementation of the second aspect, in a second possible implementation, before determining the first operation to be performed on the system, the method further includes: acquiring a performance indicator of the system at the current moment;
确定要对所述系统执行的第一操作,包括:Determining the first action to be performed on the system, including:
根据当前时刻所述系统的负荷指标、性能指标和所述系统使用的VM的数量,确定在当前时刻所述系统所处的当前状态;Determining a current state of the system at a current time according to a load indicator, a performance indicator, and a number of VMs used by the system at the current time;
对于可执行的第一操作的集合中的每一个第一操作,确定如下三项数值,并根据确定的如下三项数值,更新在所述当前状态下,对所述系统执行该第一操作得到的累积的回报值:For each of the first operations of the set of executable first operations, determining the following three values, and updating according to the determined three values, in the current state, performing the first operation on the system Cumulative return value:
上一次所述系统处于所述当前状态下对所述系统执行该第一操作得到的累积的回报值、在当前时刻对所述系统执行该第一操作得到的即时的回报值,以及上一次所述系统处于下一个状态下,对所述系统执行所述可执行的第一 操作的集合中的每一个第一操作得到的累积的回报值中的最大值,其中,所述下一个状态为执行该第一操作之后所述系统所处的状态;The cumulative reward value obtained by the system in the current state for performing the first operation on the system, the immediate reward value obtained by performing the first operation on the system at the current time, and the last time The system is in the next state, performing the executable first on the system a maximum of the cumulative reward values obtained by each of the first operations in the set of operations, wherein the next state is a state in which the system is after performing the first operation;
从更新后的每一个第一操作对应的、对所述系统执行该第一操作得到的累积的回报值中,选择最大的累积的回报值对应的第一操作,作为要对所述系统执行的第一操作;Selecting, from the accumulated reward value obtained by performing the first operation on the system corresponding to each of the updated first operations, a first operation corresponding to the largest accumulated reward value, as being performed on the system First operation
其中,所述回报值是根据所述系统使用的VM的数量,以及所述系统在当前时刻所述系统的负荷指标所指示的负荷下的性能指标确定的,所述系统使用的VM的数量越少,所述系统的性能指标指示所述系统的性能越高,所述回报值越大。The reward value is determined according to the number of VMs used by the system, and the performance index of the system under the load indicated by the load indicator of the system at the current time, and the number of VMs used by the system is increased. Less, the performance metric of the system indicates that the higher the performance of the system, the greater the reward value.
结合第二方面的第二种可能的实现方式,在第三种可能的实现方式中,确定在当前时刻对所述系统执行该第一操作得到的即时的回报值,包括:With reference to the second possible implementation of the second aspect, in a third possible implementation, determining an immediate reward value obtained by performing the first operation on the system at a current moment includes:
根据预测的执行该第一操作之后所述系统使用的VM的数量,以及当前时刻所述系统的负荷指标,预测执行该第一操作之后所述系统的性能指标;Predicting performance indicators of the system after performing the first operation according to the predicted number of VMs used by the system after performing the first operation, and load indicators of the system at the current time;
根据预测的执行该第一操作之后所述系统使用的VM的数量和所述系统的性能指标,确定在当前时刻对所述系统执行该第一操作得到的即时的回报值。And determining, according to the predicted number of VMs used by the system after the first operation and performance indicators of the system, an immediate reward value obtained by performing the first operation on the system at a current time.
结合第二方面的第二种可能的实现方式,在第四种可能的实现方式中,确定在执行该第一操作之后所述系统所处的下一个状态下,对所述系统执行所述可执行的第一操作的集合中的每一个第一操作得到的累积的回报值中的最大值,包括:With reference to the second possible implementation of the second aspect, in a fourth possible implementation, determining, in the next state in which the system is located after performing the first operation, performing the The maximum of the cumulative reward values obtained for each of the first operations in the set of first operations performed, including:
根据当前时刻所述系统的负荷指标、执行该第一操作之后所述系统使用的VM的数量,预测在执行该第一操作之后所述系统所处的下一个状态;Determining, according to the load indicator of the system at the current moment, the number of VMs used by the system after performing the first operation, the next state in which the system is located after performing the first operation;
确定在所述下一个状态下,对所述系统执行所述可执行的第一操作的集合中的每一个第一操作得到的累积的回报值;Determining, in the next state, performing, for the system, a cumulative reward value obtained for each of the first operations of the set of executable first operations;
从确定的各累积的回报值中,选取最大的累积的回报值。From the determined cumulative return values, the largest cumulative return value is selected.
结合第二方面,在第五种可能的实现方式中,In combination with the second aspect, in a fifth possible implementation,
在确定要对所述系统执行的第一操作之前,还包括:选择VM数量调整 的方式;Before determining the first operation to be performed on the system, the method further includes: selecting a VM quantity adjustment The way;
确定要对所述系统执行的第一操作,包括:Determining the first action to be performed on the system, including:
若选择的VM数量调整的方式为:根据获取的当前时刻所述系统的负荷指标和所述系统使用的VM的数量,调整所述系统使用的VM的数量,则If the number of selected VMs is adjusted, the number of VMs used by the system is adjusted according to the load indicator of the system and the number of VMs used by the system.
根据获取的当前时刻所述系统的负荷指标和所述系统使用的VM的数量,确定要对所述系统执行的第一操作。Determining a first operation to be performed on the system according to the obtained load indicator of the system at the current time and the number of VMs used by the system.
结合第二方面的第五种可能的实现方式,在第六种可能的实现方式中,若选择的VM数量调整的方式为:按照所述系统的负荷指标上限阈值和系统的负荷指标下限阈值,判断是否需要调整VM数量,则在选择VM数量调整的方式之后,还包括:With reference to the fifth possible implementation manner of the second aspect, in the sixth possible implementation manner, if the selected number of VMs is adjusted, according to the upper limit threshold of the load index of the system and the lower threshold of the load indicator of the system, To determine whether the number of VMs needs to be adjusted, after selecting the method of adjusting the number of VMs, it also includes:
将获取的当前时刻所述系统的负荷指标与所述系统的负荷指标上限阈值和所述系统的负荷指标下限阈值比较,根据比较结果确定要对所述系统执行的第二操作,所述第二操作包括:增加p个VM、减小q个VM,或保持VM数量不变,所述p为预设的向上调整步长,所述q为预设的向下调整步长,p、q为正整数。Comparing the obtained load index of the system at the current time with the upper limit threshold of the load indicator of the system and the lower limit threshold of the load indicator of the system, and determining, according to the comparison result, a second operation to be performed on the system, the second The operation includes: adding p VMs, reducing q VMs, or keeping the number of VMs unchanged, the p being a preset upward adjustment step, the q being a preset downward adjustment step, p, q being A positive integer.
结合第二方面的第六种可能的实现方式,在第七种可能的实现方式中,所述负荷指标上限阈值和所述负荷指标下限阈值是根据获取的当前时刻之前的T个历史时刻中,每一个历史时刻所述系统的负荷指标,按照如下条件确定的:With reference to the sixth possible implementation manner of the second aspect, in a seventh possible implementation manner, the load indicator upper limit threshold and the load indicator lower limit threshold are based on T historical moments before the acquired current time The load indicators of the system described in each historical moment are determined according to the following conditions:
在对所述系统执行所述第二操作之后,所述系统的性能指标符合所述预设的性能指标要求,且使用的VM的数量最少,其中T为正整数。After performing the second operation on the system, the performance indicator of the system meets the preset performance index requirement, and the number of VMs used is the least, where T is a positive integer.
结合第二方面的第七种可能的实现方式,在第八种可能的实现方式中,所述负荷指标上限阈值和所述负荷指标下限阈值具体是根据如下步骤确定的:With reference to the seventh possible implementation manner of the second aspect, in the eighth possible implementation manner, the load indicator upper limit threshold and the load indicator lower threshold are specifically determined according to the following steps:
针对每一个备选的负荷指标上限阈值和负荷指标下限阈值的组合,通过执行如下步骤,确定投入回报比:For each combination of the upper limit threshold of the load indicator and the lower limit of the load indicator, the input return ratio is determined by performing the following steps:
对于获取的每一个历史时刻所述系统的负荷指标,预测根据该备选的负 荷指标上限阈值和负荷指标下限阈值的组合对所述系统执行第二操作后,所述系统使用的VM数量;并根据该历史时刻所述系统的负荷指标和预测的所述系统执行第二操作后使用的VM数量,预测在执行所述第二操作之后所述系统的性能指标;For each of the historical moments of the system, the load indicator of the system is predicted, and the prediction is based on the negative of the candidate. And a combination of the upper limit threshold of the load index and the lower limit threshold of the load index, the number of VMs used by the system after performing the second operation on the system; and performing the second operation according to the load indicator of the system and the predicted system at the historical moment The number of VMs used later, predicting performance metrics of the system after performing the second operation;
根据每一个历史时刻所对应的、执行第二操作之后所述系统使用的VM数量和的性能指标,确定投入回报比,其中,各性能指标中符合所述预设的性能指标要求的性能指标的数量越多,各历史时刻所述系统使用的VM数量的总和越少,所述投入回报比越高;Determining an input return ratio according to a performance index of the number of VMs used by the system after performing the second operation corresponding to each historical moment, wherein each performance indicator meets the performance index required by the preset performance indicator The greater the number, the less the sum of the number of VMs used by the system at each historical moment, and the higher the return on investment ratio;
选择最大投入回报比对应的备选的负荷指标上限阈值和负荷指标下限阈值的组合;将选择的该组合中的负荷指标上限阈值,作为确定的所述负荷指标上限阈值,将选择的该组合中的负荷指标下限阈值,作为确定的所述负荷指标下限阈值。Selecting a combination of the corresponding maximum load return ratio and the corresponding load indicator upper limit threshold and the load indicator lower limit threshold; selecting the selected load indicator upper limit threshold as the determined load indicator upper limit threshold, the selected combination is selected The lower limit threshold of the load index is determined as the lower limit threshold of the load indicator.
本发明实施例中,根据系统的负荷指标和系统使用的VM的数量调整VM的数量,在调整时,不仅可确定是增加、减少还是保持VM的数量不变,而且还能准确确定VM数量调整的数值,使得能够根据系统的负荷变化和当前时刻使用的VM的数量实时确定VM调整的数量,提高了VM调整的实时性。In the embodiment of the present invention, the number of VMs is adjusted according to the load index of the system and the number of VMs used by the system. When adjusting, not only can it be determined whether the number of VMs is increased, decreased, or maintained, but also the number of VMs can be accurately determined. The value enables the number of VM adjustments to be determined in real time based on the load change of the system and the number of VMs currently used, improving the real-time performance of the VM adjustment.
进一步地,在根据系统的负荷指标和系统使用的VM的数量调整VM的数量时,使得在VM数量调整后,系统的性能指标符合预设的性能指标要求,且系统使用的VM的数量最少,能够兼顾系统的性能指标和系统的VM数量的要求,在保证系统的性能指标的要求前提下,提高VM利用率。Further, when the number of VMs is adjusted according to the load indicator of the system and the number of VMs used by the system, after the VM number is adjusted, the performance index of the system meets the preset performance index requirement, and the number of VMs used by the system is the least. It can balance the performance of the system with the number of VMs of the system, and improve the VM utilization while ensuring the performance requirements of the system.
进一步地,在根据系统的负荷指标和系统使用的VM的数量调整VM的数量时,采用强化学习的方法,在确定调整的数值时,考虑了当前时刻前的历史时刻的累积的回报值,而且还考虑了下一时刻可能的回报值,从而不必再如图1所示的方法中,设置冷却时间,进而提高了VM数量调整的实时性。利用实施例一的强化学习的特性,能够减少不必要的扩容和缩容的操作,减缓了乒乓效应。Further, when the number of VMs is adjusted according to the load index of the system and the number of VMs used by the system, the method of reinforcement learning is adopted, and when the value of the adjustment is determined, the accumulated return value of the historical time before the current time is considered, and The possible return value at the next moment is also considered, so that it is no longer necessary to set the cooling time in the method shown in FIG. 1, thereby improving the real-time performance of the VM number adjustment. By utilizing the characteristics of the reinforcement learning of the first embodiment, unnecessary expansion and shrinkage operations can be reduced, and the ping-pong effect is slowed down.
进一步地,本发明实施例中还可根据系统的历史负荷调整负荷指标上限 阈值和负荷指标下限阈值,可根据系统的负荷灵活设置VM数量调整的阈值,对不同阈值进行评估,以选择最佳阈值,提高了系统VM利用率,保证了系统的性能指标要求。Further, in the embodiment of the present invention, the upper limit of the load index may be adjusted according to the historical load of the system. Threshold and load indicator lower threshold, flexible setting of VM number adjustment threshold according to system load, evaluation of different thresholds to select optimal threshold, improve system VM utilization, and ensure system performance index requirements.
进一步地,在根据系统的历史负荷调整负荷指标上限阈值和负荷指标下限阈值时,使得在调整VM数量后,系统的性能指标符合预设的性能指标要求,且使用的VM数量最少,能够兼顾系统的性能指标和系统的VM数量的要求。Further, when the load index upper limit threshold and the load index lower limit threshold are adjusted according to the historical load of the system, after the VM number is adjusted, the performance index of the system meets the preset performance index requirement, and the number of VMs used is the least, and the system can be considered. The performance metrics and the number of VMs required for the system.
进一步地,在根据系统的历史负荷调整负荷指标上限阈值和负荷指标下限阈值时,对不同的系统负荷情况,分别对各可用的阈值进行评估,选择最佳阈值,使得其在调整系统使用的VM的数量时,根据选择的最佳阈值进行调整,提高了VM的利用效率。Further, when the load index upper limit threshold and the load index lower limit threshold are adjusted according to the historical load of the system, the available thresholds are respectively evaluated for different system load conditions, and the optimal threshold is selected, so that the VM used in the adjustment system is adjusted. When the number is adjusted, the optimal threshold is selected to improve the utilization efficiency of the VM.
附图说明DRAWINGS
图1为一种虚拟机数量调整方案的示意图;FIG. 1 is a schematic diagram of a virtual machine quantity adjustment scheme;
图2为本发明实施例提供的第一种确定VM数量调整操作的装置的结构示意图;2 is a schematic structural diagram of an apparatus for determining a VM number adjustment operation according to an embodiment of the present invention;
图3为本发明实施例提供的第二种确定VM数量调整操作的装置的结构示意图;FIG. 3 is a schematic structural diagram of a second apparatus for determining a VM number adjustment operation according to an embodiment of the present disclosure;
图4为本发明实施例提供的第三种确定VM数量调整操作的装置的结构示意图;4 is a schematic structural diagram of an apparatus for determining a VM number adjustment operation according to an embodiment of the present invention;
图5为强化学习的方法示意图;Figure 5 is a schematic diagram of a method of reinforcement learning;
图6为本发明实施例一的流程图;Figure 6 is a flowchart of Embodiment 1 of the present invention;
图7为累积回报表的示意图;Figure 7 is a schematic diagram of a cumulative return table;
图8为本发明实施例一中更新累积回报表的过程示意图;FIG. 8 is a schematic diagram of a process of updating a cumulative return table according to Embodiment 1 of the present invention; FIG.
图9为本发明实施例二中数据拟合过程的示意图;9 is a schematic diagram of a data fitting process in Embodiment 2 of the present invention;
图10为本发明实施例三的流程图;Figure 10 is a flowchart of Embodiment 3 of the present invention;
图11、图12为本发明实施例四中VM数量调整操作的装置与VNF的关 系示意图;FIG. 11 and FIG. 12 are diagrams showing the apparatus for adjusting the number of VMs and the VNF in the fourth embodiment of the present invention. Schematic diagram
图13和图14为本发明实施例五中本发明实施例可应用的业务场景的示意图;13 and FIG. 14 are schematic diagrams of service scenarios applicable to an embodiment of the present invention in Embodiment 5 of the present invention;
图15为本发明实施例提供的第四种确定VM数量调整操作的装置的结构示意图;FIG. 15 is a schematic structural diagram of a fourth apparatus for determining a VM number adjustment operation according to an embodiment of the present disclosure;
图16为本发明实施例提供的确定VM数量调整操作的方法的流程图。FIG. 16 is a flowchart of a method for determining a VM number adjustment operation according to an embodiment of the present invention.
具体实施方式Detailed ways
本发明实施例提供一种确定VM数量调整操作的装置和方法,用以提供一种灵活的配置VM的方案。An embodiment of the present invention provides an apparatus and method for determining a VM number adjustment operation, to provide a flexible configuration scheme of a VM.
在本发明实施例提供的一种确定VM数量调整操作的装置中,数据采集模块获取当前时刻系统的负荷指标和系统使用的VM的数量,其中,系统包括一个或多个VM;第一判决模块数据采集模块根据获取的当前时刻系统的负荷指标和系统使用的VM的数量,确定要对系统执行的第一操作;其中,第一操作包括:增加m个VM、减少n个VM,或保持VM数量不变,其中,m、n为正整数,且m、n是第一判决模块根据当前时刻系统的负荷指标和系统使用的VM的数量确定的。In the apparatus for determining the VM number adjustment operation provided by the embodiment of the present invention, the data collection module acquires the load indicator of the current time system and the number of VMs used by the system, wherein the system includes one or more VMs; the first decision module The data collection module determines a first operation to be performed on the system according to the acquired load indicator of the current time system and the number of VMs used by the system; wherein the first operation includes: adding m VMs, reducing n VMs, or maintaining VMs The quantity is unchanged, where m and n are positive integers, and m and n are determined by the first decision module according to the load index of the current time system and the number of VMs used by the system.
与图1所示的VM数量调整方案相比,增加或减少的VM数量可根据当前时刻系统的负荷指标和系统使用的VM的数量确定,不再是固定设置的值,实现更灵活,可适应系统的负荷情况和VM的使用情况来灵活确定增加或减少VM数量,适应不同的场景。Compared with the VM number adjustment scheme shown in FIG. 1, the number of VMs that are increased or decreased can be determined according to the load index of the current time system and the number of VMs used by the system, and is no longer a fixed setting value, and is more flexible and adaptable. The load condition of the system and the usage of the VM are used to flexibly determine whether to increase or decrease the number of VMs to adapt to different scenarios.
下面,首先介绍本发明实施例中涉及的一些概念。In the following, some concepts involved in the embodiments of the present invention are first introduced.
一、系统First, the system
本发明实施例中,系统包括一个或多个VM,由该一个或多个VM实现。其中,系统可为任何由VM实现的VNF,比如前述的网络中的各种网元:MME、PGW、HSS等。本发明实施例提供的确定VM数量调整操作的装置可位于系统之外,也可位于系统之内,具体可参见实施例四。 In an embodiment of the invention, the system includes one or more VMs implemented by the one or more VMs. The system can be any VNF implemented by the VM, such as various network elements in the foregoing network: MME, PGW, HSS, and the like. The device for determining the VM number adjustment operation provided by the embodiment of the present invention may be located outside the system or may be located in the system. For details, refer to Embodiment 4.
本发明实施例提供的确定VM数量调整的装置,用于对VM数量调整的操作进行判决,将判决结果发给执行VM数量调整的装置,由执行执行VM数量调整的装置根据本发明实施例提供的确定VM数量调整的装置发送的判决结果,对系统执行调整VM数量的操作。这里,执行VM数量调整的装置可为图12中的网络功能虚拟化-管理和编配(Network Funcitons Virtualization-Management and Orchestration,NFV-MANO)中的VNF管理器(VNF manager)和虚拟化基础设施管理器(Virtualised Infrastructure Manager,VIM),由该两个装置配合执行系统VNF的VM数量调整。具体执行的方案可参考2014年2月公开的标准文献“组规范网络功能虚拟化-管理与编排V0.3.2”(GS NFV-MAN 001v0.3.2),这里不再赘述。The device for determining the number of VMs is determined by the embodiment of the present invention, and is used to determine the operation of adjusting the number of VMs, and sends the result of the determination to the device for performing the VM number adjustment, and the device for performing the VM number adjustment is provided according to the embodiment of the present invention. The determination result sent by the device that determines the VM number adjustment performs an operation of adjusting the number of VMs to the system. Here, the device performing the VM number adjustment may be the VNF manager and the virtualization infrastructure in the Network Funcitons Virtualization-Management and Orchestration (NFV-MANO) in FIG. The Virtualised Infrastructure Manager (VIM) is configured by the two devices in conjunction with the number of VMs executing the system VNF. For the specific implementation scheme, refer to the standard document “Group Specification Network Function Virtualization-Management and Orchestration V0.3.2” (GS NFV-MAN 001v0.3.2) published in February 2014, which will not be described here.
需要说明的是,上述标准文献中公开的VM数量调整的方式仅为一种可选的实现方式,本发明实施例旨在提供一种确定VM数量调整操作的装置和方法,实现对VM数量调整操作的判决,并不对VM数量调整操作的执行加以限定,可认为本发明实施例提供的判决方案可适用于包括上述标准文献公开的方式在内的任何VM数量调整的执行方案。It should be noted that the method for adjusting the number of VMs disclosed in the above-mentioned standard documents is only an optional implementation manner, and the embodiments of the present invention are directed to providing an apparatus and method for determining the number of VMs to adjust the number of VMs. The decision of the operation does not limit the execution of the VM number adjustment operation. It can be considered that the decision scheme provided by the embodiment of the present invention can be applied to any execution scheme of the VM number adjustment including the manner disclosed by the above standard documents.
二、系统的负荷指标Second, the system's load indicators
系统的负荷指标可包括但不限于下面的表1所列出的各种业务负荷指标和各种资源负荷指标。The system's load indicators may include, but are not limited to, the various service load indicators and various resource load indicators listed in Table 1 below.
表1、系统的负荷指标Table 1, system load indicators
Figure PCTCN2014094226-appb-000001
Figure PCTCN2014094226-appb-000001
Figure PCTCN2014094226-appb-000002
Figure PCTCN2014094226-appb-000002
三、系统的性能指标Third, the system's performance indicators
系统的性能指标可包括但不限于表2所列的指标:System performance indicators may include, but are not limited to, the indicators listed in Table 2:
表2、系统的性能指标列表Table 2. List of performance indicators of the system
性能指标Performance
业务建立成功率Business establishment success rate
业务建立时延Service establishment delay
数据包传输时延Packet transmission delay
抖动shake
数据包丢包率Packet loss rate
误块率Block error rate
误比特率Bit error rate
接下来,结合附图对本发明实施例进行详细说明。Next, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
本发明实施例中,确定VM数量调整操作的装置有如下三种:In the embodiment of the present invention, the device for determining the VM number adjustment operation has the following three types:
第一种The first
如图2所示的装置10,包括:The device 10 shown in Figure 2 includes:
数据采集模块201和第一判决模块202;The data acquisition module 201 and the first decision module 202;
其中,第一判决模块202根据数据采集模块201获取的当前时刻系统的负荷指标和系统使用的VM的数量,确定要对系统执行的第一操作;The first decision module 202 determines the first operation to be performed on the system according to the load indicator of the current time system acquired by the data collection module 201 and the number of VMs used by the system;
其中,第一操作包括:Among them, the first operation includes:
增加m个VM、减少n个VM,或保持VM数量不变,其中,m、n为正整数;Add m VMs, reduce n VMs, or keep the number of VMs unchanged, where m and n are positive integers;
并且,上述m和n是第一判决模块202根据当前时刻系统的负荷指标和系统使用的VM的数量确定的。Moreover, the above m and n are determined by the first decision module 202 according to the load index of the current time system and the number of VMs used by the system.
第二种 Second
如图3所示的装置11,包括:The device 11 shown in FIG. 3 includes:
数据采集模块201、第一判决模块202和第二判决模块203,以及VM数量调整方式选择模块204;The data acquisition module 201, the first decision module 202 and the second decision module 203, and the VM number adjustment mode selection module 204;
其中,数据采集模块201和第一判决模块202的实现可参考上面第一种确定VM数量调整操作的装置10;VM数量调整方式选择模块204用于选择VM数量调整方式,即:是通过第一判决模块202判决,还是通过第二判决模块203判决。The implementation of the data collection module 201 and the first decision module 202 may refer to the apparatus 10 for determining the VM number adjustment operation. The VM quantity adjustment mode selection module 204 is configured to select the VM quantity adjustment mode, that is, the first The decision module 202 determines whether the decision is still made by the second decision module 203.
其中,第二判决模块203具体用于:The second decision module 203 is specifically configured to:
将数据采集模块201获取的当前时刻系统的负荷指标与系统的负荷指标上限阈值和系统的负荷指标下限阈值比较,根据比较结果确定要对系统执行的第二操作;Comparing the load index of the current time system acquired by the data collection module 201 with the upper limit threshold of the load index of the system and the lower limit threshold of the load index of the system, and determining a second operation to be performed on the system according to the comparison result;
其中,第二操作包括:增加p个VM、减小q个VM,或保持VM数量不变;p为预设的向上调整步长,q为预设的向下调整步长,p、q为正整数。The second operation includes: adding p VMs, reducing q VMs, or keeping the number of VMs unchanged; p is a preset upward adjustment step, q is a preset downward adjustment step, and p and q are A positive integer.
与第一操作的区别包括:第二操作中VM数量调整的数量是预设的,第一操作中,VM数量调整的数量是根据数据采集模块201获取的当前时刻系统的负荷指标和系统使用的VM的数量确定的。The difference from the first operation includes: the number of VMs in the second operation is preset. In the first operation, the number of VMs is adjusted according to the load index of the current time system acquired by the data collection module 201 and the system used. The number of VMs is determined.
第三种Third
如图4所示的装置12;包括:数据采集模块201和第二判决模块203,其中数据采集模块201和第二判决模块203的实现可参考如图3所示的第二种确定VM数量调整操作的装置11。The device 12 shown in FIG. 4 includes: a data acquisition module 201 and a second decision module 203. The implementation of the data acquisition module 201 and the second decision module 203 can be adjusted by referring to the second determination of the number of VMs as shown in FIG. Operated device 11.
下面,分别对上述三种确定VM数量调整操作的装置进行详细介绍。Hereinafter, the above three devices for determining the VM number adjustment operation will be described in detail.
图2为本发明实施例提供的第一种确定VM数量调整操作的装置10的结构示意图。如图2所示,该装置10包括:2 is a schematic structural diagram of an apparatus 10 for determining a VM number adjustment operation according to an embodiment of the present invention. As shown in FIG. 2, the device 10 includes:
数据采集模块201,用于获取当前时刻系统的负荷指标和系统使用的VM的数量,其中,系统包括一个或多个VM;The data collection module 201 is configured to acquire a load indicator of the current time system and a quantity of VMs used by the system, where the system includes one or more VMs;
第一判决模块202,用于根据数据采集模块201获取的当前时刻系统的负荷指标和系统使用的VM的数量,确定要对系统执行的第一操作; The first decision module 202 is configured to determine, according to the load indicator of the current time system acquired by the data collection module 201 and the number of VMs used by the system, the first operation to be performed on the system;
第一操作包括:增加m个VM、减少n个VM,或保持VM数量不变,其中,m、n为正整数,且m、n是第一判决模块202根据获取的当前时刻系统的负荷指标和系统使用的VM的数量确定的。The first operation includes: adding m VMs, reducing n VMs, or keeping the number of VMs unchanged, where m and n are positive integers, and m and n are load indexes of the first decision module 202 according to the acquired current time system. And the number of VMs used by the system is determined.
其中,数据采集模块201可以预设的周期获取系统的负荷指标和系统使用的VM的数量。比如:1分钟或5分钟等。The data collection module 201 can acquire the load indicator of the system and the number of VMs used by the system in a preset period. For example: 1 minute or 5 minutes.
本发明实施例中,数据采集模块201可采集表1中所列的各种指标中的一种,作为系统的负荷指标,比如:CPU利用率。In the embodiment of the present invention, the data collection module 201 can collect one of the various indicators listed in Table 1 as a load indicator of the system, such as: CPU utilization.
或者,也可采集表1中所列的多种指标,将各种指标进行加权、归一化处理后,综合计算出系统的负荷指标。Alternatively, various indicators listed in Table 1 may be collected, and various indicators are weighted and normalized, and the system load indicators are comprehensively calculated.
比如:采集用户数User_Num和磁盘利用率Disk_occupation_rate,按照下列公式一,计算出系统的负荷指标load:For example, collect the number of users User_Num and the disk utilization Disk_occupation_rate, and calculate the load indicator load of the system according to the following formula 1:
Figure PCTCN2014094226-appb-000003
……公式一
Figure PCTCN2014094226-appb-000003
...Formula one
其中,max_User_num为系统最大用户数,α为加权因子,0≤α≤1,0≤Disk_occupation_rate≤1。Among them, max_User_num is the maximum number of users of the system, α is a weighting factor, 0≤α≤1, 0≤Disk_occupation_rate≤1.
第一判决模块202在根据获取的当前时刻系统的负荷指标和系统使用的VM的数量,确定要对系统执行的第一操作时,可有多种可选方式,这里列举其中的几种加以说明。无论采用何种方式,与图1所示的方式相比,都能够实现灵活设置调整的VM数量的目的。The first decision module 202 may determine a plurality of options for performing the first operation to be performed on the system according to the obtained load index of the system at the current time and the number of VMs used by the system, and several of them are illustrated here. . Regardless of the manner in which it is used, the purpose of flexibly setting the number of adjusted VMs can be achieved as compared with the method shown in FIG.
方式一method one
预存系统的负荷指标与系统使用的VM数量的对应表,如表3所示。该表用于表示在系统的负荷指标所指示的系统负荷下,若保证系统的性能指标,系统应使用的VM数量。The correspondence table between the load index of the pre-stored system and the number of VMs used by the system is shown in Table 3. This table is used to indicate the number of VMs that the system should use if the system performance is guaranteed under the system load indicated by the system's load indicator.
表3、系统负荷和系统应使用的VM的数量的对应表Table 3, the correspondence between the system load and the number of VMs that the system should use.
系统负荷System load VM数量Number of VMs
≥90%,且≤100%≥90%, and ≤100% 10个(系统可使用的VM数量的最大值)10 (the maximum number of VMs the system can use)
≥80%,且≤89%≥80%, and ≤89% 9个9
≥70%,且≤79%≥70%, and ≤79% 8个8
≥60%,且≤69%≥60%, and ≤69% 7个7
≥50%,且≤59%≥50%, and ≤59% 6个6
≥40%,且≤49%≥40%, and ≤49% 5个5
≥30%,且≤39%≥30%, and ≤39% 4个4
≥20%,且≤29%≥20%, and ≤29% 3个3
≥10%,且≤19%≥10%, and ≤19% 2个2
≥0%,且≤9%≥0%, and ≤9% 1个1
与前述的系统的负荷指标类似,系统的性能指标可采用表2中的某个具体的性能指标,比如:业务建立时延来衡量,也可综合各种性能指标,采用与公式一类似的方式进行加权求和来计算。Similar to the load indicator of the foregoing system, the performance index of the system can be measured by a specific performance indicator in Table 2, such as: service establishment delay, or various performance indicators, in a similar manner to formula 1. Perform a weighted summation to calculate.
可将系统的性能指标与预设的性能指标阈值比较,确定是否保证了系统的性能指标。比如:系统的性能指标为丢包率,则确定丢包率在小于预设的丢包率阈值时,保证了系统的性能指标。再比如:系统的性能指标为业务建立成功率,则确定业务建立成功率大于预设的业务建立成功率阈值时,保证了系统的性能指标。The performance metrics of the system can be compared with preset performance metric thresholds to determine whether the performance metrics of the system are guaranteed. For example, if the performance indicator of the system is the packet loss rate, it is determined that the packet loss rate is less than the preset packet loss rate threshold, which ensures the performance index of the system. For example, if the performance index of the system is the success rate of the service establishment, the performance of the system is ensured when the service establishment success rate is greater than the preset service establishment success rate threshold.
第一判决模块202查表3,确定获取的当前时刻系统的负荷指标对应的系统应使用的VM数量,根数据采集模块201获取的当前时刻系统使用的VM数量,确定要对系统执行的第一操作,即:增加还是减少VM的数量,或保持VM的数量不变,以及若增加或减少VM的数量,增加或减少的VM的数量的具体数值,使得对系统执行第一操作后,系统使用的VM数量等于当前时刻系统的负荷指标对应的系统应使用的VM数量。The first decision module 202 checks the table 3, determines the number of VMs that the system corresponding to the load indicator of the current time system of the acquired system, and the number of VMs used by the system at the current time obtained by the root data collection module 201, and determines the first to be executed on the system. Operation, that is, increase or decrease the number of VMs, or keep the number of VMs unchanged, and if the number of VMs is increased or decreased, the specific value of the number of VMs is increased or decreased, so that after the first operation is performed on the system, the system uses The number of VMs is equal to the number of VMs that the system should use for the current load indicator of the system.
比如:第一判决模块202获取当前时刻系统的负荷指标为25%,查表3,确定系统应使用的VM的数量为3个,若获取的当前时刻系统使用的VM的数量为5个,则确定要减少2个VM。 For example, the first decision module 202 obtains the current load index of the system as 25%, and looks up Table 3 to determine that the number of VMs that the system should use is three. If the number of VMs used by the system at the current time is five, Be sure to reduce 2 VMs.
再比如:第一判决模块202获取当前时刻系统的负荷指标为75%,查表3,确定系统应使用的VM的数量为8个,若获取的当前时刻系统使用的VM的数量为4个,则确定要增加4个VM。For example, the first decision module 202 obtains the current load index of the system at 75%, and looks up Table 3 to determine that the number of VMs that the system should use is eight, and if the current time is obtained, the number of VMs used by the system is four. Then determine to add 4 VMs.
可选地,数据采集模块201还可获取前若干时刻系统的负荷指标,第一判决模块202根据数据采集模块201获取的当前时刻,以及前若干时刻系统的负荷指标,确定系统的负荷指标的变化趋势,若确定系统的负荷指标递增,则可使调整后的系统使用的VM的数量,比表3中系统应使用的VM的数量大预设的系统缓冲VM数量。Optionally, the data collection module 201 can also obtain the load indicator of the system at the previous time. The first decision module 202 determines the change of the load indicator of the system according to the current time acquired by the data collection module 201 and the load index of the system at the previous time. Trends, if it is determined that the system's load index is incremented, the number of VMs used by the adjusted system can be larger than the number of VMs that should be used by the system in Table 3, and the number of system buffer VMs is preset.
比如:数据采集模块201获取当前时刻,以及前4个时刻的系统的负荷指标分别为:20%、30%、35%、40%和45%,获取的当前时刻系统使用的VM数量为2,则在增加3个VM的基础上,考虑到系统的负荷指标的递增趋势,再增加预设的系统缓冲VM数量(假设为1),则总共增加4个VM,调整后系统使用的VM的数量为6。For example, the data collection module 201 obtains the current time, and the load indicators of the system in the first four moments are: 20%, 30%, 35%, 40%, and 45%, respectively, and the number of VMs used by the system at the current time is 2, On the basis of adding 3 VMs, taking into account the increasing trend of the system's load indicators, and then increasing the preset system buffer VM number (assumed to be 1), a total of 4 VMs are added, and the number of VMs used by the system is adjusted. Is 6.
该方式一可适用于突发性业务的场景,能够迅速增加或减少VM的数量,以符合系统的负荷情况。This method can be applied to the scenario of sudden business, and can rapidly increase or decrease the number of VMs to meet the load of the system.
方式二Way two
第一判决模块202确定要对系统执行的第一操作,以使在执行第一操作之后系统的性能指标符合预设的性能指标要求,且使用的VM的数量最少;The first decision module 202 determines a first operation to be performed on the system such that the performance metric of the system conforms to the preset performance indicator requirement after the first operation is performed, and the number of VMs used is the least;
其中,在执行第一操作之后系统的性能指标,是第一判决模块202根据当前时刻系统的负荷指标,以及在执行第一操作之后系统使用的VM的数量预测的;在执行第一操作之后系统使用的VM的数量,是第一判决模块202根据当前时刻系统使用的VM的数量,以及确定的要对系统执行的第一操作预测的。The performance indicator of the system after performing the first operation is predicted by the first decision module 202 according to the load indicator of the current time system and the number of VMs used by the system after the first operation is performed; after the first operation is performed, the system The number of VMs used is predicted by the first decision module 202 based on the number of VMs used by the system at the current time, and the determined first operation to be performed on the system.
可选地,该预设的性能指标要求可为预设的服务水平协议(Service Level Agreement,SLA)要求。SLA是指在一定的费用下,为了保障服务的性能和可靠性,运营商与客户签订的双方认可的协议。通常该费用是驱动运营商提供服务质量的主要因素。 Optionally, the preset performance indicator requirement may be a preset Service Level Agreement (SLA) requirement. SLA refers to the agreement between the operator and the customer to ensure the performance and reliability of the service at a certain cost. Often this cost is a major factor driving the quality of service provided by operators.
比如,在SLA中规定了三个性能指标分别为:业务处理时延、业务报文的丢包率、处理业务的带宽。这三个性能指标的基准值分别为时延100毫秒,丢包率为1%,带宽为100Mbps,则当业务处理时延小于100ms、丢包率小于1%,带宽大于100Mbps时称为遵守SLA,若有其中一项指标不满足基准值的要求,则称为违反SLA,运营商会付出相应的惩罚。惩罚的方法可以基于违反SLA的时间设定,比如:单位时间内违反业务处理时延需要付出的惩罚为p_1,违反丢包率需要付出的惩罚为p_2,违反带宽需要付出的惩罚为p_3,则总的惩罚为penalty=p_1*t_1+p_2*t_2+p_3*t_3,其中t_1,t_2,t_3分别为违反相应基准值的时间。For example, three performance indicators are specified in the SLA: service processing delay, packet loss rate of service packets, and bandwidth for processing services. The benchmark values of these three performance indicators are 100 milliseconds delay, 1% packet loss rate, and 100 Mbps bandwidth. When the service processing delay is less than 100 ms and the packet loss rate is less than 1%, the bandwidth is greater than 100 Mbps. If one of the indicators does not meet the requirements of the benchmark value, it is called a violation of the SLA, and the operator will pay the corresponding penalty. The penalty method can be based on the time setting of the violation of the SLA. For example, the penalty for violating the service processing delay per unit time is p_1, the penalty for the violation of the packet loss rate is p_2, and the penalty for violating the bandwidth is p_3. The total penalty is penalty=p_1*t_1+p_2*t_2+p_3*t_3, where t_1, t_2, t_3 are the times when the corresponding reference value is violated.
具体地,数据采集模块201还用于:在第一判决模块202确定要对系统执行的第一操作之前,获取当前时刻系统的性能指标;Specifically, the data collection module 201 is further configured to: before the first decision module 202 determines that the first operation to be performed on the system, obtain a performance indicator of the current time system;
第一判决模块202可采用强化学习(Reinforcement Learning)的方法,确定要对系统执行的第一操作。The first decision module 202 can employ a method of Reinforcement Learning to determine the first operation to be performed on the system.
强化学习的主要思想是通过学习,选择能达到目标的最优动作。如图5所示,当主体在其环境中做出每个动作ai,获得回报值ri,主体从获得的回报值中学习,以便后续动作产生最大的累积的回报值。The main idea of reinforcement learning is to learn and choose the best action that can achieve the goal. 5, when the body of each operation to make a i in its environment, return the value r i, the main return from the learned value obtained in a subsequent operation to produce the maximum value of the cumulative reward.
其中,回报值分为累积的回报值和即时的回报值。累积的回报值为当前时刻以前的若干时刻回报值的累积结果,比如:加和的结果;即时的回报值为当前时刻执行了第一操作ai后得到的回报值。Among them, the return value is divided into the cumulative return value and the immediate return value. The accumulated return value is the cumulative result of the return value at some time before the current time, for example, the result of the summation; the immediate return value is the return value obtained after the first operation a i is performed at the current time.
本发明实施例中,主体为第一判决模块202,环境为上述“系统”,回报值可由系统使用的VM的数量,以及系统在当前时刻系统的负荷指标所指示的负荷下的性能指标确定,系统使用的VM的数量越少,系统的性能指标指示系统的性能越高,回报值越大。比如:即时的回报值r可由下列公式二定义:In the embodiment of the present invention, the main body is the first decision module 202, and the environment is the above “system”, and the reward value may be determined by the number of VMs used by the system and the performance index of the system under the load indicated by the current load indicator of the system. The fewer the number of VMs used by the system, the higher the performance of the system indicates the higher the performance of the system, and the greater the return value. For example, the immediate return value r can be defined by the following formula 2:
Figure PCTCN2014094226-appb-000004
……公式二
Figure PCTCN2014094226-appb-000004
...Formula 2
其中,Performance为系统的性能指标,可为表2中的某个具体的性能指 标,比如:业务建立成功率,业务建立时延的倒数;也可综合各种性能指标,采用与公式一类似的方式进行加权求和来计算,加权的结果满足:加权求和后的性能指标越大,系统的性能越好,其中,诸如表2中的业务建立时延、数据包传输时延、抖动、数据包丢包率、误块率、误比特率的性能指标越小,则加权求和后的性能指标越大;诸如业务建立成功率的性能指标越大,加权求和后的性能指标越大。vm_number为系统使用的VM的数量。Among them, Performance is the performance index of the system, which can be a specific performance indicator in Table 2. Standards, such as: business establishment success rate, reciprocal of business establishment delay; can also integrate various performance indicators, using weighted summation in a similar way to formula 1, to calculate: the weighted results meet: weighted summation performance indicators The larger the performance of the system, the better, such as the service establishment delay, packet transmission delay, jitter, packet loss rate, block error rate, and bit error rate in Table 2, the smaller the performance index, the weighting The performance index after summation is larger; the larger the performance index such as the service establishment success rate, the larger the performance index after the weighted summation. Vm_number is the number of VMs used by the system.
可选地,第一判决模块202通过如下方式确定执行第一操作得到的即时的回报值:Optionally, the first decision module 202 determines an immediate reward value obtained by performing the first operation by:
根据预测的执行该第一操作之后系统使用的VM的数量,以及当前时刻系统的负荷指标,预测执行该第一操作之后系统的性能指标;Determining performance indicators of the system after performing the first operation according to the predicted number of VMs used by the system after performing the first operation, and load indicators of the current time system;
根据预测的执行该第一操作之后系统使用的VM的数量和系统的性能指标,确定对系统执行该第一操作得到的即时的回报值。The instantaneous reward value obtained by performing the first operation on the system is determined according to the predicted number of VMs used by the system after the first operation and performance indicators of the system.
可选地,第一判决模块202可通过如下方式,确定在执行该第一操作后系统所处的下一个状态下,执行可执行的第一操作集合中的每一个第一操作得到的累积的回报值中的最大值:Optionally, the first determining module 202 may determine, according to the manner, performing the cumulative operation of each of the first operations in the executable first operation set in the next state in which the system is located after the performing the first operation The maximum value in the return value:
根据当前时刻系统的负荷指标、在执行该第一操作之后系统使用的VM的数量,预测在执行该第一操作之后系统所处的下一个状态;Determining, according to the load indicator of the current time system, the number of VMs used by the system after performing the first operation, predicting a next state in which the system is after performing the first operation;
确定在该下一个状态下,对系统执行上述可执行的第一操作的集合中的每一个第一操作得到的累积的回报值;Determining, in the next state, an accumulated reward value obtained by each of the first operations of the set of first operations executable by the system;
从确定的各累积的回报值中,选取最大的累积的回报值。From the determined cumulative return values, the largest cumulative return value is selected.
上述对第一判决模块202确定要对系统执行的第一操作的方式二进行了详细说明。后面会通过具体的实施例一举例说明。The foregoing method 2 for determining the first operation to be performed on the system by the first decision module 202 is described in detail. This will be exemplified by the specific embodiment 1 later.
图3为本发明实施例提供的第二种确定VM数量调整操作的装置11的结构示意图。如图3所示,该装置11包括:FIG. 3 is a schematic structural diagram of a second apparatus 11 for determining a VM number adjustment operation according to an embodiment of the present invention. As shown in FIG. 3, the device 11 includes:
数据采集模块201、第一判决模块202和第二判决模块203,以及VM数量调整方式选择模块204;The data acquisition module 201, the first decision module 202 and the second decision module 203, and the VM number adjustment mode selection module 204;
其中,数据采集模块201和第一判决模块202的实现可参考上面第一种 确定VM数量调整操作的装置10中对应模块的实现;VM数量调整方式选择模块204用于选择VM数量调整方式,即:是通过第一判决模块202判决,还是通过第二判决模块203判决。The implementation of the data collection module 201 and the first decision module 202 can refer to the first type above. The implementation of the corresponding module in the device 10 for determining the VM number adjustment operation; the VM number adjustment mode selection module 204 is configured to select the VM number adjustment mode, that is, whether the decision is made by the first decision module 202 or the second decision module 203.
其中,第二判决模块203具体用于:The second decision module 203 is specifically configured to:
将数据采集模块201获取的当前时刻系统的负荷指标与系统的负荷指标上限阈值和系统的负荷指标下限阈值比较,根据比较结果确定要对系统执行的第二操作;Comparing the load index of the current time system acquired by the data collection module 201 with the upper limit threshold of the load index of the system and the lower limit threshold of the load index of the system, and determining a second operation to be performed on the system according to the comparison result;
其中,第二操作包括:增加p个VM、减小q个VM,或保持VM数量不变;p为预设的向上调整步长,q为预设的向下调整步长,p、q为正整数。The second operation includes: adding p VMs, reducing q VMs, or keeping the number of VMs unchanged; p is a preset upward adjustment step, q is a preset downward adjustment step, and p and q are A positive integer.
与第一操作的区别包括:第二操作中VM数量调整的数量是预设的,第一操作中,VM数量调整的数量是根据数据采集模块201获取的当前时刻系统的负荷指标和系统使用的VM的数量确定的。The difference from the first operation includes: the number of VMs in the second operation is preset. In the first operation, the number of VMs is adjusted according to the load index of the current time system acquired by the data collection module 201 and the system used. The number of VMs is determined.
与图1所示的VM数量调整的方案类似之处在于,均是将当前时刻系统的负荷指标与预设的阈值进行比较,根据比较结果确定是否调整VM的数量。区别在于,本发明实施例中,阈值是根据历史时刻系统的负荷指标确定的。The scheme similar to the VM number adjustment shown in FIG. 1 is that the load index of the current time system is compared with a preset threshold, and whether the number of VMs is adjusted is determined according to the comparison result. The difference is that, in the embodiment of the present invention, the threshold is determined according to the load index of the historical time system.
具体地,数据采集模块201还用于:获取当前时刻之前的T个历史时刻中,每一个历史时刻系统的负荷指标,其中,T为正整数;Specifically, the data collection module 201 is further configured to: acquire a load indicator of each of the T historical moments before the current time, where T is a positive integer;
负荷指标上限阈值和负荷指标下限阈值是第二判决模块203根据数据采集模块201获取的当前时刻之前的T个历史时刻中,每一个历史时刻系统的负荷指标确定的,并满足:The load index upper limit threshold and the load index lower limit threshold are determined by the second decision module 203 according to the load index of each historical time system in the T historical moments before the current time acquired by the data collection module 201, and satisfy:
系统在执行第二操作之后的性能指标符合预设的性能指标要求,且使用的VM的数量最少,其中T为正整数。The performance index of the system after performing the second operation meets the preset performance index requirement, and the number of VMs used is the least, where T is a positive integer.
这里,预设的性能指标要求也可为前述的SLA的要求。Here, the preset performance index requirements may also be the requirements of the aforementioned SLA.
可选地,第二判决模块203具体用于按照如下步骤确定负荷指标上限阈值和负荷指标下限阈值:Optionally, the second determining module 203 is specifically configured to determine a load indicator upper limit threshold and a load indicator lower limit threshold according to the following steps:
针对每一个备选的负荷指标上限阈值和负荷指标下限阈值的组合,通过执行如下步骤,确定投入回报比: For each combination of the upper limit threshold of the load indicator and the lower limit of the load indicator, the input return ratio is determined by performing the following steps:
对于数据采集模块201获取的每一个历史时刻系统的负荷指标,预测根据该备选的负荷指标上限阈值和负荷指标下限阈值的组合对系统执行第二操作后,系统使用的VM数量;并根据该历史时刻系统的负荷指标和预测的系统执行第二操作后使用的VM数量,预测子啊执行第二操作之后系统的性能指标;For the load indicator of each historical time system acquired by the data collection module 201, predict the number of VMs used by the system after performing the second operation on the system according to the combination of the candidate load index upper threshold and the lower limit of the load index; The load indicator of the historical time system and the predicted number of VMs used after the second operation of the system, and the performance index of the system after the second operation is predicted by the predictor;
根据每一个历史时刻所对应的、执行第二操作之后系统使用的VM数量和的性能指标,确定投入回报比,其中,各性能指标中符合预设的性能指标要求的性能指标的数量越多,各历史时刻系统使用的VM数量的总和越少,投入回报比越高;The input return ratio is determined according to the number of VMs used by the system after performing the second operation and the performance index corresponding to each of the performance indicators, wherein the number of performance indicators that meet the preset performance index requirements of each performance indicator is larger. The smaller the total number of VMs used by the system at each historical moment, the higher the return on investment ratio;
选择最大投入回报比对应的备选的负荷指标上限阈值和负荷指标下限阈值的组合;将选择的该组合中的负荷指标上限阈值,作为确定的负荷指标上限阈值,将选择的该组合中的负荷指标下限阈值,作为确定的负荷指标下限阈值。Selecting a combination of the corresponding maximum load return ratio and the corresponding load index upper threshold and the lower limit of the load index; selecting the upper limit of the load index in the combination as the determined upper limit threshold of the load index, and selecting the load in the combination The lower limit threshold of the indicator is used as the lower limit threshold of the determined load indicator.
后面的实施例三是第二判决模块203确定负荷指标下限阈值和负荷指标上限阈值的方法举例。The third embodiment is an example of a method for the second decision module 203 to determine the lower limit threshold of the load index and the upper limit threshold of the load indicator.
图4为本发明实施例提供的第三种确定VM数量调整操作的装置12的结构示意图。如图4所示,该装置12包括:FIG. 4 is a schematic structural diagram of a third apparatus 12 for determining a VM number adjustment operation according to an embodiment of the present invention. As shown in Figure 4, the device 12 includes:
数据采集模块201和第二判决模块203,其中数据采集模块201和第二判决模块203的实现可参考如图3所示的第二种确定VM数量调整操作的装置11中对应模块的实现。The data acquisition module 201 and the second decision module 203, wherein the implementation of the data acquisition module 201 and the second decision module 203 can refer to the implementation of the corresponding module in the device 11 for determining the VM number adjustment operation as shown in FIG.
下面,分别介绍实施例一~实施例五。其中,Hereinafter, Embodiments 1 to 5 will be respectively described. among them,
实施例一为第一判决模块202判决VM数量操作的方法的举例; Embodiment 1 is an example of a method for the first decision module 202 to determine the VM number operation;
实施例二为数据分析模块205进行拟合的方法举例;The second embodiment is an example of a method for fitting the data analysis module 205;
实施例三为第二判决模块203判决VM数量调整操作的方法的举例;The third embodiment is an example of a method for the second decision module 203 to determine the VM number adjustment operation;
实施例四说明了本发明实施例提供的确定VM数量调整操作的装置与VNF的关系;The fourth embodiment describes the relationship between the device for determining the VM number adjustment operation and the VNF provided by the embodiment of the present invention;
实施例五给出了本发明实施例应用的业务场景。 The fifth embodiment of the present invention provides a service scenario to which the embodiment of the present invention is applied.
下面,逐一对各实施例加以介绍。Hereinafter, each embodiment will be described one by one.
【实施例一】[Embodiment 1]
实施例一介绍了第一判决模块202调整VM数量的一种方法。 Embodiment 1 describes a method by which the first decision module 202 adjusts the number of VMs.
实施例一中,本发明实施例提供的确定VM数量调整操作的装置还可包括数据分析模块205,该模块用于从数据采集模块201获取历史时刻的系统的负荷指标、性能指标和系统使用的VM的数量,根据获取的上述数据,拟合出系统的性能指标与系统的负荷指标和系统使用的VM的数量的函数关系,供第一判决模块202在计算即时的回报值时使用(见步骤S604)。In the first embodiment, the apparatus for determining the VM number adjustment operation provided by the embodiment of the present invention may further include a data analysis module 205, configured to acquire, from the data collection module 201, a load indicator, a performance indicator, and a system used by the system at a historical time. The number of VMs, based on the obtained data, fits a function of the system's performance metrics to the system's load metrics and the number of VMs used by the system for use by the first decision module 202 in calculating the immediate return value (see steps). S604).
实施例一中,系统可能的状态si组成状态集合(State Set):{si|i=1..M},每个状态下,对系统有N种可执行的动作,即第一操作有N种可能的选择,N种可执行的动作组成动作集合(Action Set):{ai|i=1..N},M、N为正整数。第i个状态si对应的第j个动作aj的即时的回报值为ri,j,累积的回报值为qi,j;系统的负荷指标、系统使用的VM的数量与系统的性能指标之间的函数关系如公式三所示:In the first embodiment, the possible state s i of the system constitutes a state set: {s i |i=1..M}, and in each state, there are N kinds of executable actions for the system, that is, the first operation There are N possible choices, N kinds of executable actions constitute an Action Set: {a i |i=1..N}, M, N are positive integers. The immediate return value of the jth action a j corresponding to the i-th state s i is r i,j , and the accumulated return value is q i,j ; the load index of the system, the number of VMs used by the system, and the performance of the system The functional relationship between the indicators is shown in Equation 3:
performance=f(workload,vm_number)……公式三Performance=f(workload,vm_number)...Form 3
其中,performance为系统的性能指标、workload为系统的负荷指标、vm_number为系统使用的VM的数量。数据分析模块拟合的具体方法可参考后面的实施例二。Among them, performance is the performance index of the system, workload is the load indicator of the system, and vm_number is the number of VMs used by the system. For the specific method of data analysis module fitting, refer to the following second embodiment.
即时的回报值如下面的公式四所示:The immediate return value is shown in Equation 4 below:
r=g(vm_number,performance)……公式四r=g(vm_number,performance)...Formula 4
图6中的Q表,即累积的回报值表,简称“累积回报表”,如图7所示。The Q table in Fig. 6 is the cumulative return value table, referred to as the "cumulative return table", as shown in FIG.
如图6所示,实施例一的方法具体包括如下步骤:As shown in FIG. 6, the method of Embodiment 1 specifically includes the following steps:
S601:对状态集、动作集和累积回报表进行初始化。状态集包含了系统所有可能的状态;动作集为系统可以执行的第一操作的集合;累积回报表用于保存各个状态对应于每个动作的累积的回报值; S601: Initialize the state set, the action set, and the cumulative return table. The state set contains all possible states of the system; the action set is a set of first operations that the system can perform; the cumulative return table is used to store the accumulated reward values of each state corresponding to each action;
S602:第一判决模块202从数据采集模块201处获得当前时刻t系统的负荷指标、性能指标和系统使用的VM的数量;S602: The first decision module 202 obtains the load indicator, the performance indicator, and the number of VMs used by the system at the current time t from the data collection module 201.
S603:第一判决模块202确定进行状态匹配,根据步骤S602中获得的当前时刻t系统的负荷指标、性能指标和系统使用的VM的数量,确定当前时刻系统所处的状态stS603: The first decision module 202 determines to perform state matching, and determines the state s t of the current time system according to the load index, the performance index, and the number of VMs used by the system at the current time t obtained in step S602;
如前所述,状态集中包括有限M个状态,该M个状态可通过如下方式定义:将系统的负荷指标取值分为A个区间,将系统的性能指标的取值分为B个区间,将系统使用的VM的数量的取值分为C个区间,A、B、C为正整数,A*B*C=M。As described above, the state set includes a limited number of M states, and the M states can be defined by dividing the load indicator value of the system into A intervals, and dividing the value of the system performance index into B intervals. The value of the number of VMs used by the system is divided into C intervals, A, B, and C are positive integers, and A*B*C=M.
步骤S603在确定当前时刻系统所处的状态时,可通过分别确定系统的负荷指标、性能指标和系统使用的VM的数量落入的区间,然后根据三者分别落入的区间,从状态集中找出当前时刻系统所处的状态st,简称“当前状态”。Step S603, when determining the current state of the system, can determine the load index, the performance index of the system, and the number of VMs used by the system respectively, and then find the range from the state in which the three belong respectively. The state s t at which the system is currently located, referred to as the "current state".
S604:对于当前状态st,有N种可选动作,即动作集中的N种动作a1,a2,...,aN,对每一个可选动作aj,j=1..N进行如下处理:S604: For the current state s t , there are N kinds of optional actions, that is, N kinds of actions a 1 , a 2 , ..., a N in the action set, for each optional action a j , j=1..N Do the following:
根据当前时刻t系统使用的VM的数量vm_number,以及执行的动作aj,确定执行该动作aj之后,系统使用的VM的数量vm_number’;Determining the number of VMs vm_number' used by the system after performing the action a j according to the number of VMs vm_number used by the system at the current time t, and the action a j performed;
根据从数据分析模块205获得的函数关系r=g(vm_number,performance),计算执行动作aj后系统的新的性能指标:performance'=f(workload,vm_number'),其中,workload为当前时刻系统的负荷指标;According to the function relationship r=g(vm_number, performance) obtained from the data analysis module 205, a new performance indicator of the system after performing the action a j is calculated: performance'=f(workload, vm_number'), wherein the workload is the current time system Load indicator;
按照上述公式四计算即时的回报值:Calculate the immediate return value according to Equation 4 above:
rt,j=g(vm_number',performance')r t,j =g(vm_number',performance')
S605:更新累积回报表;S605: update the cumulative return statement;
根据当前时刻t系统的负荷指标workload、执行动作aj后系统的新的性 能指标performance’,以及执行动作aj后系统使用的VM的数量vm_number’,确定执行动作aj后系统所处的状态,记为st+kThe load index workload current time t of the system, performing an action after a j new performance metrics performance systems ', and performing the operation after a j System number of the VM vm_number', determines the execution state after the operation a j system is located , recorded as s t+k ;
从当前时刻t的累积回报表中,获取状态st+k的所有累积的回报值(即在状态st+k下,每一个动作a1,a2,...,aN对应的累积的回报值qt+k,1,qt+k,2,qt+k,3,...,qt+k,N,并从中选取最大值,记为qt+k,lPress reports from the current accumulation time t, the acquisition state s t + returns all accumulated value of k (i.e., in a state s t + k, each movement a 1, a 2, ..., a N corresponding accumulation The return value q t+k,1 ,q t+k,2 ,q t+k,3 ,...,q t+k,N , and the maximum value is selected from it, denoted as q t+k,l ;
其中,qt+k,j为系统上一次处于状态st+k下,执行动作aj得到的累积的回报值;Where q t+k,j is the cumulative return value obtained by executing the action a j when the system is in the state s t+k last time;
用当前时刻t的累积回报表中,当前状态st与动作aj对应的累积的回报值qt,j、即时的回报值rt,j、执行完动作后的下一状态的最大累积的回报值qt+k,l,计算当前状态st与动作aj对应的新的累积的回报值:q't,j=y(qt,j,rt,j,qt+k,l),比如:按照如下公式五计算累积的回报值:Press reports accumulated with the current time t, the current state S t and the cumulative return value corresponding to the operation of a j q t, j, immediate return value r t, j, the next state after executing the operation after the maximum accumulated The return value q t+k,l , calculates a new cumulative return value corresponding to the action a j of the current state s t : q′ t,j =y(q t,j ,r t,j ,q t+k, l ), for example: Calculate the cumulative return value according to the following formula 5:
q't,j=qt,j+rt,j+qt+k,l……公式五q' t,j =q t,j +r t,j +q t+k,l ......Formula 5
用q't,j取代qt,j填充到累积回报表,即Q表中,完成一个Q表项的更新Use q't ,j instead of q t,j to fill the cumulative return table, that is, the Q table, complete the update of a Q entry
对于当前状态st的所有可选的动作a1,a2,...,aN,均通过步骤S604和步骤S605更新累积的回报值。For all optional actions a 1 , a 2 , . . . , a N of the current state s t , the accumulated reward values are updated by steps S604 and S605.
其中,累积的回报值与即时的回报值区别在于,累积的回报值不仅考虑了当前时刻的即时的回报值,还考虑了历史运行过程中,该状态的所有回报值的累积,以及可能的下一状态最大的累积的回报值。即:累积的回报值不仅考虑历史状态对当前状态的影响,还包括可能的下一状态对当前状态的影响。Among them, the difference between the accumulated return value and the immediate return value is that the accumulated return value not only considers the immediate return value of the current moment, but also considers the accumulation of all the return values of the state during the historical running process, and possible The maximum cumulative return value for a state. That is, the cumulative return value not only considers the impact of the historical state on the current state, but also the impact of the possible next state on the current state.
S606:依次更新完qt+k,1,qt+k,2,qt+k,3,...,qt+k,N之后,选择其中最大值对应的动作,作为要对系统执行的动作,即要对系统执行的第一操作。 S606: After sequentially updating q t+k,1 , q t+k, 2 , q t+k, 3 , . . . , q t+k, N , selecting an action corresponding to the maximum value as the system to be The action performed, that is, the first action to be performed on the system.
上述步骤S604~步骤S605也可参考图8所示的示意图。对于动作集中的动作aj,计算执行该动作后系统的性能指标performance’,根据执行该动作后的系统的新的VM的数量vm_number’,以及performance’计算即时的回报值rt,j;根据即时的回报值rt,j、执行动作后下一状态St+k下Q表中各动作对应的最大累积的回报值qt+k,l,以及当前状态t的Q表中,当前状态t下执行动作aj得到的累积的回报值qt,j,计算得到更新后的q't,j,用该值更新Q表中状态t对应的执行动作aj的累积的回报值。The above steps S604 to S605 can also refer to the schematic diagram shown in FIG. 8. For the action a j in the action set, calculate the performance index performance' of the system after executing the action, calculate the immediate return value r t,j according to the number of new VMs vm_number' of the system after performing the action, and performance'; The immediate return value r t,j , the maximum cumulative return value q t+k,l corresponding to each action in the Q table in the next state S t+k after the action is performed, and the current state in the Q table of the current state t The accumulated return value q t, j obtained by performing the action a j is calculated, and the updated q′ t,j is calculated , and the accumulated return value of the execution action a j corresponding to the state t in the Q table is updated with the value.
S607:确定冷却时间,在冷却时间内,系统不再增加或减少VM的数量。S607: Determine the cooling time. During the cooling time, the system no longer increases or decreases the number of VMs.
步骤S607为可选的步骤,通过冷却时间保证系统的可靠性,冷却时间可以包括:扩容冷却时间、缩容冷却时间、防震荡冷却时间。Step S607 is an optional step of ensuring the reliability of the system by the cooling time. The cooling time may include: expansion cooling time, shrinkage cooling time, and anti-oscillation cooling time.
其中,扩容冷却时间指两次扩容动作(即增加VM的数量)之间的间隔时间,每进行一次扩容/缩容决策,扩容冷却时间定时器就会减1,若定时器取值大于零,则能不允许实施新的扩容动作(即保持当前VM数量不变),若定时器小于或等于零,则允许执行扩容决策,一旦做出实施扩容的决策,扩容冷却时间定时器就会被复位。The capacity expansion cooling time is the interval between the two expansion operations (that is, the number of VMs is increased). Each time the capacity expansion/reduction capacity is determined, the expansion cooling time timer is decremented by 1. If the timer value is greater than zero, The new capacity expansion action (that is, the current number of VMs is not changed) is allowed. If the timer is less than or equal to zero, the capacity expansion decision is allowed. Once the decision to implement the capacity expansion is made, the expansion cooling time timer is reset.
缩容冷却时间的实施过程与扩容冷却时间类似,只不过针对的是缩容动作。The implementation of the reduction cooling time is similar to the expansion cooling time, but only for the shrinking action.
防震荡冷却时间是指做出扩容决策后到允许再次做出缩容决策之间间隔的时间。每次作出扩容决策后,该定时器会被复位,之后每进行一次扩容/缩容决策,定时器就会减1,如果定时器取值大于零,即使作出的决策是缩容,也不允许执行该动作(即保持当前VM的数量不变),若定时器取值小于或等于零,则允许执行缩容决策。Anti-oscillation cooling time refers to the time between the decision to expand the capacity and the time to allow the refinement decision to be made again. After each expansion decision, the timer will be reset. After each expansion/reduction decision, the timer will be decremented by 1. If the timer value is greater than zero, even if the decision is reduced, it is not allowed. This action is performed (ie, the number of current VMs is kept constant), and if the timer value is less than or equal to zero, the shrinkage decision is allowed to be performed.
步骤S607为可选步骤,若不执行步骤S607,则在执行步骤S606之后,直接执行步骤S608:调整系统使用的VM的数量。Step S607 is an optional step. If step S607 is not performed, after step S606 is performed, step S608 is directly executed: adjusting the number of VMs used by the system.
实施例一中,不仅对当前状态下采取不同动作的即时的回报值判断,还 考虑了当前状态之前的历史的累积的回报值,以及下一状态下的回报值对当前状态的影响。通过实施例一调整VM数量时,增加或减少的VM数量可依据当前时刻系统的负荷指标和当前时刻系统使用的VM的数量动态改变,可选地,可实现系统的性能指标符合预设的性能指标的要求下,系统使用的VM的数量最少,进而提高了VM的利用效率。In the first embodiment, not only the immediate return value judgment of taking different actions in the current state, but also Consider the cumulative return value of the history before the current state, and the impact of the return value in the next state on the current state. When the number of VMs is adjusted by the first embodiment, the number of VMs that are increased or decreased may be dynamically changed according to the load indicator of the current time system and the number of VMs used by the system at the current time. Optionally, the performance indicators of the system may be consistent with the preset performance. Under the requirements of the index, the number of VMs used by the system is the least, which improves the utilization efficiency of the VM.
与图1所示的方案相比,实施例一中,VM调整的数量可动态变化。图1中,与扩容上限阈值或扩容下限阈值对应的扩容或缩容的VM的数量是确定的,无法根据系统的负荷指标实时调整。而实施例一中会对增加或删除不同VM数量的回报值进行量化评估,选取回报值最大的动作作为要对系统执行的扩容或缩容的动作。Compared with the solution shown in FIG. 1, in the first embodiment, the number of VM adjustments can be dynamically changed. In FIG. 1 , the number of VMs that are expanded or contracted corresponding to the upper expansion threshold or the lower expansion threshold is determined, and cannot be adjusted in real time according to the load index of the system. In the first embodiment, the reward value of adding or deleting different VM numbers is quantitatively evaluated, and the action with the largest return value is selected as the action to be expanded or contracted to the system.
由于第一判决模块202在确定第一操作时,不仅可以确定是增加、减少还是保持VM的数量不变,而且还能够准确确定出VM数量的调整的数值,实现了根据系统的负荷指标来确定VM数量调整的数值,在确定调整的数值时,考虑了当前时刻之前的历史时刻的累积的回报值,而且还考虑了下一时刻可能的回报值,从而不必再像图1所示的方法中,设置冷却时间,进而提高了VM数量调整的实时性。利用实施例一的强化学习的特性,能够减少不必要的扩容和缩容的操作,减缓了乒乓效应。Since the first decision module 202 determines the first operation, it can be determined not only whether to increase, decrease or maintain the number of VMs, but also accurately determine the adjusted value of the number of VMs, and realize the determination according to the load index of the system. The value of the VM quantity adjustment, when determining the adjusted value, considers the cumulative return value of the historical moment before the current time, and also considers the possible return value at the next moment, so that it is no longer necessary to be in the method shown in FIG. , set the cooling time, which improves the real-time performance of the VM quantity adjustment. By utilizing the characteristics of the reinforcement learning of the first embodiment, unnecessary expansion and shrinkage operations can be reduced, and the ping-pong effect is slowed down.
此外,实施例一中,由于第一操作是根据系统的负荷指标和当前时刻系统使用的VM的数量确定的,VM调整的数量能够适应不同的系统负荷和系统资源占用情况。In addition, in the first embodiment, since the first operation is determined according to the load index of the system and the number of VMs used by the system at the current time, the number of VM adjustments can be adapted to different system loads and system resource occupations.
【实施例二】[Embodiment 2]
实施例二介绍了数据分析模块205进行数据拟合的一种方法。该方法可应用于本发明实施例提供的任意一种确定VM数量调整操作的装置中,用于拟合出系统的性能指标与系统的负荷指标和系统使用的VM的数量之间的函数关系。The second embodiment introduces a method for data fitting by the data analysis module 205. The method can be applied to any device for determining the VM number adjustment operation provided by the embodiment of the present invention, and is used for fitting a functional relationship between the performance index of the system and the load index of the system and the number of VMs used by the system.
参考图9,数据采集模块201采集当前时刻之前的历史时间段内的系统的负荷指标、系统使用的VM的数量,系统的性能指标。可选地,数据采集模 块201可将采集到的上述数据存储于历史数据库中,该历史数据库可位于数据采集模块201内,或独立于数据采集模块201。Referring to FIG. 9, the data collection module 201 collects the load index of the system, the number of VMs used by the system, and the performance index of the system in the historical time period before the current time. Optionally, the data acquisition module The block 201 may store the collected data in a history database, which may be located in the data collection module 201 or independent of the data collection module 201.
可选地,该历史时间段可以是过去的若干天,若干周、若干个月,或者其他更长或者更短的时间周期,其长度可以根据系统运行的实际需求而定。Alternatively, the historical time period may be several days in the past, several weeks, several months, or other longer or shorter time periods, the length of which may be determined according to the actual needs of the system operation.
可选地,数据采集模块201可周期性地采集上述数据,上述数据可以是一个采样周期内定额平均值、最大值或采样时刻的瞬时值。Optionally, the data collection module 201 may periodically collect the foregoing data, where the data may be an instantaneous value of a fixed average value, a maximum value, or a sampling time within a sampling period.
可选地,数据采集模块201可以向用于监控上述数据的监控模块发起数据查询请求,这些监控模块在收到查询请求后,将请求的数据发给数据采集模块201;或者,这些监控模块周期性地主动将这些数据上报给数据采集模块201。Optionally, the data collection module 201 may initiate a data query request to the monitoring module for monitoring the foregoing data. After receiving the query request, the monitoring module sends the requested data to the data collection module 201; or, the monitoring module cycle The data is actively reported to the data collection module 201.
数据分析模块205从历史数据库中提取某一历史时间段内的系统的负荷指标、性能指标和系统使用的VM的数量,利用拟合算法计算性能指标performance与负荷指标workload和系统使用的VM的数量之间vm_number的函数关系:The data analysis module 205 extracts the load index, the performance index, and the number of VMs used by the system in a historical time period from the historical database, and uses the fitting algorithm to calculate the performance index performance and the load indicator workload and the number of VMs used by the system. The functional relationship between vm_number:
performance=f(workload,vm_number)Performance=f(workload,vm_number)
可选地,可采用线性拟合、多项式拟合等机器学习算法。Alternatively, machine learning algorithms such as linear fitting, polynomial fitting, etc. may be employed.
实施例二中,根据采集的历史时刻的数据,得出性能指标与负荷指标和系统使用的VM的数量之间的关系,使得第一判决模块202和第二判决模块203可根据实施例二提供的函数关系,预测不同操作的回报值,并选择回报最高的操作。根据不同精确度和复杂度的需求,本实施例在实施过程中可以选择不同的拟合算法。In the second embodiment, the relationship between the performance indicator and the load indicator and the number of VMs used by the system is obtained according to the collected historical time data, so that the first decision module 202 and the second decision module 203 can be provided according to the second embodiment. The functional relationship predicts the return value of different operations and selects the operation with the highest return. According to the requirements of different precisions and complexity, different fitting algorithms can be selected in this embodiment during the implementation.
【实施例三】[Embodiment 3]
实施例三给出了上述第二种确定VM数量调整操作的装置11和第三种确定VM数量调整操作的装置12中,第二判决模块203确定负荷指标上限阈值和负荷指标下限阈值的可选方案。In the third embodiment, in the apparatus 11 for determining the VM number adjustment operation and the apparatus 12 for determining the VM number adjustment operation, the second decision module 203 determines the upper limit threshold of the load index and the lower limit threshold of the load indicator. Program.
实施例三中,数据采集模块201还用于获取当前时刻之前的T个历史时 刻中,每一个历史时刻系统的负荷指标,其中T为正整数。数据采集模块201可以预设的数据采集周期Period为周期,周期性地采集系统的负荷指标。上述T个负荷指标可以为当前时刻的前T*Period之内的T个历史时刻采集的负荷指标,也可为当前时刻之前的任何T个采集周期内采集的负荷指标。该T个历史时刻可以为过去的若干天、若干周或若干个月内的历史时刻。In the third embodiment, the data collection module 201 is further configured to acquire T historical times before the current time. Inscribed, the load indicator of the system at each historical moment, where T is a positive integer. The data collection module 201 can periodically collect the load index of the system by using a preset data collection period Period. The T load indicators may be load indicators collected at T historical moments within the pre-T*Period of the current time, or may be load indicators collected during any T acquisition periods before the current time. The T historical moments may be historical moments in the past several days, weeks, or months.
可选地,数据采集模块201可将采集的T个历史时刻的系统的负荷指标存储在历史数据库中,可选地,该历史数据库可位于数据采集模块201内,或独立于数据采集模块201。Optionally, the data collection module 201 may store the collected load indicators of the system at the T historical moments in a historical database. Optionally, the historical database may be located in the data collection module 201 or independent of the data collection module 201.
可选地,该T个历史时刻的负荷指标可为过去一天的所有采集周期采集到的负荷指标:w1,w2,...,wT,则实施例三的基本思路是:认为系统负荷指标的变化基本以天为单位,根据前一天的系统负荷指标变化可基本预测当前的系统的负荷指标的变化。根据前一天系统的负荷指标的变化,选择最佳的负荷指标上限阈值和负荷指标下限阈值,以使当前的系统的VM的数量的调整适应系统的负荷指标的变化,实现以最少的VM的数量,达到预设的性能指标的要求。Optionally, the load indicator of the T historical moments may be a load indicator collected in all collection periods of the past day: w 1 , w 2 , . . . , w T , and the basic idea of the third embodiment is: The change of the load index is basically in units of days. According to the change of the system load index of the previous day, the change of the current system's load index can be basically predicted. According to the change of the load index of the previous day, the optimal load index upper threshold and the lower limit of the load index are selected, so that the adjustment of the number of VMs of the current system is adapted to the change of the load index of the system, and the number of VMs is minimized. , to meet the requirements of the default performance indicators.
类似地,该T个历史时刻的负荷指标可为过去一周所有采集周期采集到的负荷指标,则认为系统负荷指标的变化基本以周为单位;或者,该T个历史时刻的负荷指标可为过去一个月所有采集周期采集到的负荷指标,则认为系统负荷指标的变化基本以月为单位。Similarly, the load index of the T historical moments may be the load index collected in all the collection periods in the past week, and it is considered that the change of the system load indicator is basically in units of weeks; or, the load indicators of the T historical moments may be past For the load indicators collected in all collection periods of one month, it is considered that the changes in the system load indicators are basically in units of months.
设负荷指标上限阈值的可能取值有th1,th2,...,thU,负荷指标下限阈值的可能取值有tl1,tl2,...,tlL,阈值更新流程就是以历史的负荷指标为参考,从所有可能的阈值对(tli,thj)中选择一对最佳阈值,所采用的评价标准为投入回报比,各性能指标中符合所述预设的性能指标要求的性能指标的数量越多,各历史时刻使用的VM数量的总和越少,投入回报比越高。具体计算过程如图10所示,包括如下步骤:The possible values of the upper limit threshold of the load index are th 1 , th 2 ,...,th U , and the possible values of the lower limit of the load index are tl 1 , tl 2 ,..., tl L , and the threshold update process is The historical load indicator is a reference, and a pair of optimal thresholds are selected from all possible threshold pairs (tl i , th j ), and the evaluation criterion adopted is the input return ratio, and each performance indicator meets the preset performance index. The more the required performance indicators, the smaller the total number of VMs used in each historical moment, and the higher the return on investment ratio. The specific calculation process is shown in Figure 10 and includes the following steps:
S1001:第二判决模块203从数据采集模块201中获取T个历史时刻的系 统的负荷指标w1,w2,...,wTS1001: The second decision module 203 acquires the load indicators w 1 , w 2 , . . . , w T of the T historical time system from the data collection module 201.
其中,数据采集模块201将采集的负荷指标存储在自身的历史数据库中;The data collection module 201 stores the collected load indicators in their own historical database;
S1002:第二判决模块203从备选阈值对中选择一组阈值对(tli,thj),用该阈值对作为负荷指标阈值下限与负荷指标阈值上限,针对T个历史时刻的系统的负荷指标w1,w2,...,wT,确定要对系统执行的第二操作;S1002: The second decision module 203 selects a set of threshold pairs (tl i , th j ) from the candidate pair of thresholds, and uses the threshold pair as the lower limit of the load index threshold and the upper limit of the load index, and the load of the system for the T historical moments. The indicators w 1 , w 2 , . . . , w T , determine the second operation to be performed on the system;
对第t个负荷指标wt,用选定的阈值对(tli,thj)确定要对系统执行的第二操作,预测在执行第二操作之后,系统使用的VM的数量为为vt;利用数据分析模块205输出的performance=f(workload,vm_number),按照下列公式六计算得到性能指标ptFor the t-th load indicator w t , the second operation to be performed on the system is determined with the selected threshold pair (tl i , th j ), and the number of VMs used by the system is predicted to be v t after performing the second operation. Using the performance=f(workload, vm_number) output by the data analysis module 205, the performance index p t is calculated according to the following formula 6:
pt=f(wt,vt)……公式六p t =f(w t ,v t )...Formula 6
依次处理w1,w2,...,wT后,得到VM数量(v1,v2,...,vT)和性能数据(p1,p2,...,pT)。After processing w 1 , w 2 , . . . , w T in sequence, the number of VMs (v 1 , v 2 , . . . , v T ) and performance data (p 1 , p 2 , . . . , p T ) are obtained. .
S1003:针对每一个阈值对(tli,thj),按照下面的公式七,计算得到该阈值对所对应的投入回报比ROIi,jS1003: For each threshold pair (tl i , th j ), according to the following formula VII, the input return ratio ROI i,j corresponding to the threshold pair is calculated:
ROIi,j=h((v1,v2,...,vT),(p1,p2,...,pT))……公式七ROI i,j =h((v 1 ,v 2 ,...,v T ),(p 1 ,p 2 ,...,p T ))...Formula 7
可选地,ROIi,j可定义为:T个历史时刻中,系统的性能指标符合预设的性能指标阈值的总时间,与VM运行的总时间的比值。Optionally, the ROI i,j may be defined as a ratio of the total time of the system performance indicator to the preset performance indicator threshold in the T historical moments, and the total time of the VM running.
比如:T个历史时刻中,符合预设的性能指标阈值的性能指标数量为X,数据采集模块201的采集周期为Period,则ROIi,j可由下面的公式八计算得到: For example, in the T historical moments, the number of performance indicators that meet the preset performance indicator threshold is X, and the collection period of the data collection module 201 is Period, then the ROI i, j can be calculated by the following formula 8:
Figure PCTCN2014094226-appb-000005
……公式八
Figure PCTCN2014094226-appb-000005
...Form eight
S1004:从步骤S1003计算得到的U×L个ROI中,选择最大的ROI对应的阈值对,作为最佳阈值对,将最佳阈值对中的负荷指标上限阈值作为最佳的负荷指标上限阈值,负荷指标下限阈值作为最佳的负荷指标下限阈值;S1004: selecting, from the U×L ROIs calculated in step S1003, a threshold pair corresponding to the largest ROI as the optimal threshold pair, and using the upper limit threshold of the load index in the optimal threshold pair as the optimal upper limit threshold of the load index. The lower limit of the load index is used as the optimal lower limit threshold of the load indicator;
S1005:根据选择的最佳的负荷指标下限阈值和最佳的负荷指标上限阈值,对系统使用的VM的数量进行调整。S1005: Adjust the number of VMs used by the system according to the selected optimal load index lower threshold and the optimal load index upper threshold.
实施例三本实施例提供了一种确定负荷指标上限阈值和负荷指标下限阈值的方法。采用该方法可以解决阈值难以确定的问题。第二判决模块203可定期运行本实施例中提到的步骤S1001~步骤S1003,调整负荷指标上限阈值和负荷指标下限阈值,使得其在调整系统使用的VM的数量时,采用最佳的阈值进行调整,提高VM的利用效率。 Embodiment 3 This embodiment provides a method for determining a load index upper limit threshold and a load indicator lower limit threshold. This method can solve the problem that the threshold is difficult to determine. The second decision module 203 can periodically run the steps S1001 to S1003 mentioned in this embodiment to adjust the upper limit threshold of the load index and the lower limit of the load index, so that when the number of VMs used by the system is adjusted, the optimal threshold is used. Adjust to improve the utilization efficiency of VM.
与图1所示的VM数量调整方案中,负荷指标上限阈值和负荷指标下限阈值是人为指定,预先配置好的,用户调用云服务供应商的应用程序接口(Application Programming Interface,API)对阈值进行配置,配置的阈值无法适应当前系统负荷的变化,盲目地设置可能导致资源浪费或者性能指标无法满足要求。采用实施例三提供的方法,阈值可适应系统负荷的变化,提高了VM的利用效率。In the VM number adjustment scheme shown in FIG. 1, the load index upper threshold and the load index lower threshold are manually specified, and the user is instructed to invoke the cloud service provider's Application Programming Interface (API) to threshold. The configured threshold cannot be adapted to the current system load. Blind settings may result in wasted resources or performance indicators cannot meet the requirements. By adopting the method provided in the third embodiment, the threshold can adapt to the change of the system load, and the utilization efficiency of the VM is improved.
【实施例四】[Embodiment 4]
实施例四说明了本发明实施例提供的确定VM数量调整操作的装置与VNF的关系。The fourth embodiment describes the relationship between the device for determining the VM number adjustment operation and the VNF provided by the embodiment of the present invention.
根据不同的应用策略,本发明实施例提供的确定VM数量调整操作的装置可部署在各VNF的内部,如图11所示;也可以部署在VNF之外的负责对VNF进行管理和编排的的网元内,比如:VNF管理器(VNF Manager,VNFM)内,如图12所示。According to different application strategies, the apparatus for determining the VM number adjustment operation provided by the embodiment of the present invention may be deployed inside each VNF, as shown in FIG. 11; or may be deployed outside the VNF to manage and arrange the VNF. Within the network element, for example, the VNF Manager (VNFM), as shown in Figure 12.
如图11所示,若部署在VNF内部,则本发明实施例提供的确定VM数 量调整操作的装置可以位于该VNF内的用于进行业务控制的业务控制单元或用于进行资源控制的资源控制单元中,其中用于进行业务控制的单元用于建立业务、释放业务以及调整业务,用于进行资源控制的单元用于对包括VM在内的资源进行调整、增加、删除等控制。图11中,VNF-1、VNF-2和VNF3中各有一个确定VM数量调整操作的装置。As shown in FIG. 11, if the VNF is deployed, the number of VMs provided by the embodiment of the present invention is determined. The device for adjusting the operation may be located in a service control unit for performing service control or a resource control unit for performing resource control in the VNF, where the unit for performing service control is used to establish a service, release a service, and adjust a service. The unit for resource control is used to control, add, delete, etc. resources including the VM. In Fig. 11, each of VNF-1, VNF-2, and VNF3 has a means for determining the VM number adjustment operation.
如12所示,若本发明实施例提供的确定VM数量调整操作的装置部署在VNF之外的负责对VNF进行管理和编排的网元内,比如:VNF管理器中。由于一个VNF由一个VNF管理器进行管理,所以,对于不同的VNF,需要分别在其对应的VNF管理器中部署本发明实施例提供的确定VM数量调整操作的装置,以实现对不同的VNF的VM数量调整。As shown in FIG. 12, if the apparatus for determining the VM number adjustment operation provided by the embodiment of the present invention is deployed in a network element other than the VNF that is responsible for managing and orchestrating the VNF, for example, in the VNF manager. Since a VNF is managed by a VNF manager, for different VNFs, the apparatus for determining the VM number adjustment operation provided by the embodiment of the present invention needs to be deployed in its corresponding VNF manager to implement different VNFs. The number of VMs is adjusted.
【实施例五】[Embodiment 5]
本发明实施例可应用的业务场景可包括如图13所示的两种基本的业务场景(基本场景1和基本场景2),以及图14所示的综合场景。The service scenarios applicable to the embodiments of the present invention may include two basic service scenarios (Basic Scenario 1 and Basic Scenario 2) as shown in FIG. 13, and the integrated scenario shown in FIG.
其中,图13示出的基本场景1是一种日常忙时闲时特征的业务场景,该场景的主要特征是系统负载会随着时间呈现出明显的波峰与波谷,并且波峰与波谷的持续时间较长。比如:每天上午8点到下午10点为忙时,其他时间段为闲时;The basic scenario 1 shown in FIG. 13 is a daily busy hour idle feature. The main feature of the scenario is that the system load will show obvious peaks and troughs with time, and the duration of the peaks and troughs. Longer. For example: every day from 8 am to 10 pm is busy, other time periods are idle;
图13示出的基本场景2是一种突发性业务场景。该场景的主要特征是:也包括波峰和波谷,但波峰和波谷的持续时间较短。比如:在中午12点30到12点45之间出现了短时的业务波峰。The basic scenario 2 shown in FIG. 13 is a bursty business scenario. The main feature of the scene is that it also includes peaks and troughs, but the duration of the peaks and troughs is shorter. For example, a short-term business peak occurred between 12:30 and 12:45.
图14示出的综合场景,该场景是图13示出的两个基本的业务场景的组合。Figure 14 shows an integrated scenario, which is a combination of the two basic business scenarios shown in Figure 13.
本发明实施例适用于上述任何一种业务场景,均可实现准确实时地调整VM的数量。The embodiments of the present invention are applicable to any of the foregoing service scenarios, and can implement accurate and real-time adjustment of the number of VMs.
以上,介绍了本发明实施例提供的三种确定VM数量调整操作的装置,下面,介绍本发明实施例提供的第四种确定VM数量调整操作的装置。The device for determining the VM number adjustment operation provided by the embodiment of the present invention is described. The following describes the fourth device for determining the VM number adjustment operation provided by the embodiment of the present invention.
如图15所示,本发明实施例提供的第四种确定VM数量调整操作的装置 包括:As shown in FIG. 15, a fourth apparatus for determining a VM number adjustment operation according to an embodiment of the present invention is provided. include:
存储器1501,用于存储VM数量调整操作的程序;a memory 1501, configured to store a program for adjusting the number of VMs;
处理器1502,用于调用存储器1501中的所述程序,确定对系统执行的VM数量调整的操作。The processor 1502 is configured to call the program in the memory 1501 to determine an operation of adjusting the number of VMs performed by the system.
处理器1502执行的处理可具体参见本发明实施例提供的第一种、第二种和第三种确定VM数量调整操作的装置中的处理,重复之处不再赘述。The processing performed by the processor 1502 may be specifically referred to the processing in the apparatus for determining the VM number adjustment operations of the first, second, and third types provided by the embodiments of the present invention, and the repeated description is omitted.
其中,可选地,处理器1502进行如下处理:Optionally, the processor 1502 performs the following processing:
获取当前时刻系统的负荷指标和系统使用的VM的数量,其中,系统使用一个或多个VM;Obtaining the load indicator of the current time system and the number of VMs used by the system, wherein the system uses one or more VMs;
根据当前时刻系统的负荷指标和系统使用的VM的数量,确定要对系统执行的第一操作;Determining a first operation to be performed on the system according to the load indicator of the current time system and the number of VMs used by the system;
第一操作包括:增加m个VM、减少n个VM,或保持VM数量不变,其中,m、n为正整数,且m、n是根据当前时刻系统的负荷指标和系统使用的VM的数量确定的。The first operation includes: adding m VMs, reducing n VMs, or keeping the number of VMs unchanged, where m and n are positive integers, and m and n are load indicators of the system according to the current time and the number of VMs used by the system. definite.
其中,在图15中,总线架构可以包括任意数量的互联的总线和桥,具体由处理器1502代表的一个或多个处理器和存储器1501代表的存储器的各种电路链接在一起。总线架构还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口提供接口。用户接口1503还可以是能够外接内接需要设备的接口,连接的设备包括但不限于小键盘、显示器、扬声器、麦克风、操纵杆等。In FIG. 15, the bus architecture may include any number of interconnected buses and bridges, specifically linked by one or more processors represented by processor 1502 and various circuits of memory represented by memory 1501. The bus architecture can also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and, therefore, will not be further described herein. The bus interface provides an interface. The user interface 1503 may also be an interface capable of externally connecting the required devices, including but not limited to a keypad, a display, a speaker, a microphone, a joystick, and the like.
以上,介绍了本发明实施例提供的确定VM数量调整操作的装置,基于与该装置相同的发明构思,本发明实施例还提供了一种确定VM数量调整操作的方法,其实施可参照装置的实施,重复之处不再赘述。In the above, the device for determining the VM number adjustment operation provided by the embodiment of the present invention is introduced. Based on the same inventive concept as the device, the embodiment of the present invention further provides a method for determining the VM number adjustment operation, which can be implemented by referring to the device. Implementation, repetition will not be repeated.
图16为本发明实施例提供的确定VM数量调整操作的方法的流程图。如图16所示,该方法包括:FIG. 16 is a flowchart of a method for determining a VM number adjustment operation according to an embodiment of the present invention. As shown in FIG. 16, the method includes:
S1601:获取当前时刻系统的负荷指标和系统使用的VM的数量,其中, 系统包括一个或多个VM;S1601: Obtain the load indicator of the current time system and the number of VMs used by the system, where The system includes one or more VMs;
S1603:根据当前时刻系统的负荷指标和系统使用的VM的数量,确定要对系统执行的第一操作;S1603: Determine, according to the current load indicator of the system and the number of VMs used by the system, the first operation to be performed on the system;
第一操作包括:增加m个VM、减少n个VM,或保持VM数量不变,其中,m、n为正整数,且m、n是根据当前时刻系统的负荷指标和系统使用的VM的数量确定的。The first operation includes: adding m VMs, reducing n VMs, or keeping the number of VMs unchanged, where m and n are positive integers, and m and n are load indicators of the system according to the current time and the number of VMs used by the system. definite.
可选地,确定要对系统执行的第一操作,包括:Optionally, determining a first operation to be performed on the system, including:
确定第一操作,以使执行第一操作之后系统的性能指标符合预设的性能指标要求,且使用的VM的数量最少;Determining the first operation, so that the performance index of the system after performing the first operation meets the preset performance index requirement, and the number of VMs used is the least;
其中,执行第一操作之后系统的性能指标,是根据当前时刻系统的负荷指标,以及执行第一操作之后系统使用的VM的数量预测的;执行第一操作之后系统使用的VM的数量,是根据当前时刻系统使用的VM的数量,以及确定的第一操作预测的。The performance indicator of the system after performing the first operation is predicted according to the load indicator of the current time system and the number of VMs used by the system after the first operation is performed; the number of VMs used by the system after performing the first operation is based on The number of VMs used by the system at the current time, as well as the determined first operation predicted.
可选地,在确定要对系统执行的第一操作之前,还包括:获取当前时刻系统的性能指标;Optionally, before determining the first operation to be performed on the system, the method further includes: acquiring a performance indicator of the current time system;
确定要对系统执行的第一操作,包括:Determine the first action to perform on the system, including:
根据当前时刻系统的负荷指标、性能指标和系统使用的VM的数量,确定在当前时刻系统所处的当前状态;Determining the current state of the system at the current time according to the current load index of the system, the performance indicator, and the number of VMs used by the system;
对于可执行的第一操作的集合中的每一个第一操作,确定如下三项数值,并根据确定的如下三项数值,更新在当前状态下,对系统执行该第一操作得到的累积的回报值:For each of the first operations in the set of executable first operations, the following three values are determined, and according to the determined three values, the cumulative return obtained by performing the first operation on the system in the current state is updated. value:
上一次系统处于当前状态下对系统执行该第一操作得到的累积的回报值、在当前时刻对系统执行该第一操作得到的即时的回报值,以及上一次系统处于下一个状态下,对系统执行可执行的第一操作的集合中的每一个第一操作得到的累积的回报值中的最大值,其中,下一个状态为执行该第一操作之后系统所处的状态;The cumulative return value obtained by performing the first operation on the system in the current state in the current state, the immediate return value obtained by performing the first operation on the system at the current time, and the last time the system is in the next state, the system Performing a maximum of the accumulated reward values obtained by each of the first operations of the set of executable first operations, wherein the next state is a state in which the system is after performing the first operation;
从更新后的每一个第一操作对应的、对系统执行该第一操作得到的累积 的回报值中,选择最大的累积的回报值对应的第一操作,作为要对系统执行的第一操作;The accumulation of the first operation performed on the system corresponding to each of the first operations after the update Among the return values, the first operation corresponding to the largest cumulative return value is selected as the first operation to be performed on the system;
其中,回报值是根据系统使用的VM的数量,以及系统在当前时刻系统的负荷指标所指示的负荷下的性能指标确定的,系统使用的VM的数量越少,系统的性能指标指示系统的性能越高,回报值越大。The return value is determined according to the number of VMs used by the system and the performance index of the system under the load indicated by the current load indicator of the system. The smaller the number of VMs used by the system, the performance index of the system indicates the performance of the system. The higher the value, the higher the return value.
可选地,确定在当前时刻对系统执行该第一操作得到的即时的回报值,包括:Optionally, determining an immediate reward value obtained by performing the first operation on the system at the current moment, including:
根据预测的执行该第一操作之后系统使用的VM的数量,以及当前时刻系统的负荷指标,预测执行该第一操作之后系统的性能指标;Determining performance indicators of the system after performing the first operation according to the predicted number of VMs used by the system after performing the first operation, and load indicators of the current time system;
根据预测的执行该第一操作之后系统使用的VM的数量和系统的性能指标,确定在当前时刻对系统执行该第一操作得到的即时的回报值。The instantaneous reward value obtained by performing the first operation on the system at the current time is determined according to the predicted number of VMs used by the system after the first operation and the performance index of the system.
可选地,确定在执行该第一操作之后系统所处的下一个状态下,对系统执行可执行的第一操作的集合中的每一个第一操作得到的累积的回报值中的最大值,包括:Optionally, determining a maximum value of the accumulated reward values obtained by performing each of the first operations of the set of executable first operations on the system in the next state in which the system is located after performing the first operation, include:
根据当前时刻系统的负荷指标、执行该第一操作之后系统使用的VM的数量,预测在执行该第一操作之后系统所处的下一个状态;Determining, according to the load indicator of the current time system, the number of VMs used by the system after performing the first operation, predicting a next state in which the system is after performing the first operation;
确定在下一个状态下,对系统执行可执行的第一操作的集合中的每一个第一操作得到的累积的回报值;Determining, in the next state, a cumulative reward value obtained for each of the first operations of the set of executable first operations performed on the system;
从确定的各累积的回报值中,选取最大的累积的回报值。From the determined cumulative return values, the largest cumulative return value is selected.
可选地,在确定要对系统执行的第一操作之前,还包括:选择VM数量调整的方式;Optionally, before determining the first operation to be performed on the system, the method further includes: selecting a manner of adjusting the number of VMs;
确定要对系统执行的第一操作,包括:Determine the first action to perform on the system, including:
若选择的VM数量调整的方式为:根据获取的当前时刻系统的负荷指标和系统使用的VM的数量,调整系统使用的VM的数量,则If the number of selected VMs is adjusted, the number of VMs used by the system is adjusted according to the current load index of the system and the number of VMs used by the system.
根据获取的当前时刻系统的负荷指标和系统使用的VM的数量,确定要对系统执行的第一操作。The first operation to be performed on the system is determined according to the acquired load indicator of the current time system and the number of VMs used by the system.
可选地,若选择的VM数量调整的方式为:按照系统的负荷指标上限阈 值和系统的负荷指标下限阈值,判断是否需要调整VM数量,则在选择VM数量调整的方式之后,还包括:Optionally, if the selected number of VMs is adjusted according to the upper limit threshold of the system load index The value and the lower threshold of the load indicator of the system, to determine whether the number of VMs needs to be adjusted, after selecting the method of adjusting the number of VMs, the method further includes:
将获取的当前时刻系统的负荷指标与系统的负荷指标上限阈值和系统的负荷指标下限阈值比较,根据比较结果确定要对系统执行的第二操作,第二操作包括:增加p个VM、减小q个VM,或保持VM数量不变,p为预设的向上调整步长,q为预设的向下调整步长,p、q为正整数。Comparing the obtained current time system load index with the system load index upper limit threshold and the system load indicator lower limit threshold, and determining a second operation to be performed on the system according to the comparison result, where the second operation includes: adding p VMs, reducing q VMs, or keep the number of VMs unchanged, p is the preset upward adjustment step size, q is the preset downward adjustment step size, and p and q are positive integers.
可选地,负荷指标上限阈值和负荷指标下限阈值是根据获取的当前时刻之前的T个历史时刻中,每一个历史时刻系统的负荷指标,按照如下条件确定的:Optionally, the load indicator upper limit threshold and the load indicator lower limit threshold are determined according to the following conditions according to the load index of each historical time system among the T historical moments before the acquired current time:
在对系统执行第二操作之后,系统的性能指标符合预设的性能指标要求,且使用的VM的数量最少,其中T为正整数。After performing the second operation on the system, the performance indicators of the system meet the preset performance index requirements, and the number of VMs used is the least, where T is a positive integer.
可选地,负荷指标上限阈值和负荷指标下限阈值具体是根据如下步骤确定的:Optionally, the upper limit threshold of the load indicator and the lower limit of the load indicator are specifically determined according to the following steps:
针对每一个备选的负荷指标上限阈值和负荷指标下限阈值的组合,通过执行如下步骤,确定投入回报比:For each combination of the upper limit threshold of the load indicator and the lower limit of the load indicator, the input return ratio is determined by performing the following steps:
对于获取的每一个历史时刻系统的负荷指标,预测根据该备选的负荷指标上限阈值和负荷指标下限阈值的组合对系统执行第二操作后,系统使用的VM数量;并根据该历史时刻系统的负荷指标和预测的系统执行第二操作后使用的VM数量,预测在执行第二操作之后系统的性能指标;For the load indicator of each historical time system acquired, predict the number of VMs used by the system after performing the second operation on the system according to the combination of the candidate load index upper threshold and the lower limit of the load index; and according to the historical time The load indicator and the predicted number of VMs used by the system after performing the second operation, predicting performance indicators of the system after performing the second operation;
根据每一个历史时刻所对应的、执行第二操作之后系统使用的VM数量和的性能指标,确定投入回报比,其中,各性能指标中符合预设的性能指标要求的性能指标的数量越多,各历史时刻系统使用的VM数量的总和越少,投入回报比越高;The input return ratio is determined according to the number of VMs used by the system after performing the second operation and the performance index corresponding to each of the performance indicators, wherein the number of performance indicators that meet the preset performance index requirements of each performance indicator is larger. The smaller the total number of VMs used by the system at each historical moment, the higher the return on investment ratio;
选择最大投入回报比对应的备选的负荷指标上限阈值和负荷指标下限阈值的组合;将选择的该组合中的负荷指标上限阈值,作为确定的负荷指标上限阈值,将选择的该组合中的负荷指标下限阈值,作为确定的负荷指标下限阈值。 Selecting a combination of the corresponding maximum load return ratio and the corresponding load index upper threshold and the lower limit of the load index; selecting the upper limit of the load index in the combination as the determined upper limit threshold of the load index, and selecting the load in the combination The lower limit threshold of the indicator is used as the lower limit threshold of the determined load indicator.
综上,本发明实施例提供一种确定VM数量调整操作的装置和方法。其中,若根据系统的负荷指标和系统使用的VM的数量调整VM的数量,则在调整时,不仅可确定是增加、减少还是保持VM的数量不变,而且还能准确确定VM数量调整的数值,使得能够根据系统的负荷变化和当前时刻使用的VM的数量实时确定VM调整的数量,提高了VM调整的实时性。In summary, an embodiment of the present invention provides an apparatus and method for determining a VM number adjustment operation. If the number of VMs is adjusted according to the load index of the system and the number of VMs used by the system, it is not only determined whether to increase, decrease, or keep the number of VMs, but also accurately determine the value of the VM number adjustment. The number of VM adjustments can be determined in real time according to the load change of the system and the number of VMs currently used, and the real-time performance of the VM adjustment is improved.
其中,若根据系统的历史负荷调整负荷指标上限阈值和负荷指标下限阈值,可根据系统的负荷灵活设置VM数量调整的阈值,对不同阈值进行评估,以选择最佳阈值,提高了系统VM利用率,保证了系统的性能指标要求。If the upper limit threshold of the load index and the lower limit of the load index are adjusted according to the historical load of the system, the threshold of the VM number adjustment can be flexibly set according to the load of the system, and the different thresholds are evaluated to select the optimal threshold, thereby improving the system VM utilization. , to ensure the performance requirements of the system.
可选地,在根据系统的负荷指标和系统使用的VM的数量调整VM的数量时,使得在VM数量调整后,系统的性能指标符合预设的性能指标要求,且系统使用的VM的数量最少,能够兼顾系统的性能指标和系统的VM数量的要求,在保证系统的性能指标的要求前提下,提高VM利用率。Optionally, when the number of VMs is adjusted according to the load indicator of the system and the number of VMs used by the system, after the VM number is adjusted, the performance indicators of the system meet the preset performance index requirements, and the number of VMs used by the system is the minimum. It can balance the performance of the system and the number of VMs of the system, and improve the VM utilization while ensuring the performance requirements of the system.
可选地,在根据系统的负荷指标和系统使用的VM的数量调整VM的数量时,采用强化学习的方法,在确定调整的数值时,考虑了当前时刻前的历史时刻的累积的回报值,而且还考虑了下一时刻可能的回报值,从而不必再如图1所示的方法中,设置冷却时间,进而提高了VM数量调整的实时性。利用实施例一的强化学习的特性,能够减少不必要的扩容和缩容的操作,减缓了乒乓效应。Optionally, when the number of VMs is adjusted according to the load indicator of the system and the number of VMs used by the system, the method of reinforcement learning is adopted, and when the adjusted value is determined, the accumulated return value of the historical moment before the current moment is considered. Moreover, the possible return value at the next moment is also considered, so that it is no longer necessary to set the cooling time in the method shown in FIG. 1, thereby improving the real-time performance of the VM number adjustment. By utilizing the characteristics of the reinforcement learning of the first embodiment, unnecessary expansion and shrinkage operations can be reduced, and the ping-pong effect is slowed down.
可选地,在根据系统的历史负荷调整负荷指标上限阈值和负荷指标下限阈值时,使得在调整VM数量后,系统的性能指标符合预设的性能指标要求,且使用的VM数量最少,能够兼顾系统的性能指标和系统的VM数量的要求。Optionally, when the load indicator upper limit threshold and the load indicator lower limit threshold are adjusted according to the historical load of the system, after the VM number is adjusted, the performance index of the system meets the preset performance index requirement, and the number of VMs used is the least, and both can be taken into consideration. The performance metrics of the system and the number of VMs in the system.
可选地,在根据系统的历史负荷调整负荷指标上限阈值和负荷指标下限阈值时,对不同的系统负荷情况,分别对各可用的阈值进行评估,选择最佳阈值,使得其在调整系统使用的VM的数量时,根据选择的最佳阈值进行调整,提高了VM的利用效率。Optionally, when the load indicator upper limit threshold and the load indicator lower limit threshold are adjusted according to the historical load of the system, the available thresholds are respectively evaluated for different system load conditions, and the optimal threshold is selected, so that the adjustment system is used. When the number of VMs is adjusted according to the selected optimal threshold, the utilization efficiency of the VM is improved.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、 或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may employ an entirely hardware embodiment, an entirely software embodiment, Or in the form of an embodiment of the software and hardware aspects. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。While the preferred embodiment of the invention has been described, it will be understood that Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and the modifications and
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。 It is apparent that those skilled in the art can make various modifications and variations to the invention without departing from the spirit and scope of the invention. Thus, it is intended that the present invention cover the modifications and modifications of the invention

Claims (18)

  1. 一种确定虚拟机VM数量调整操作的装置,其特征在于,包括:An apparatus for determining a virtual machine VM quantity adjustment operation, comprising:
    数据采集模块,用于获取当前时刻系统的负荷指标和所述系统使用的VM的数量,其中,所述系统包括一个或多个VM;a data acquisition module, configured to acquire a load indicator of a current time system and a number of VMs used by the system, where the system includes one or more VMs;
    第一判决模块,用于根据当前时刻所述系统的负荷指标和所述系统使用的VM的数量,确定要对所述系统执行的第一操作;a first determining module, configured to determine, according to a load indicator of the system at the current time and a number of VMs used by the system, a first operation to be performed on the system;
    所述第一操作包括:增加m个VM、减少n个VM,或保持VM数量不变,其中,m、n为正整数,且m、n是所述第一判决模块根据当前时刻所述系统的负荷指标和所述系统使用的VM的数量确定的。The first operation includes: adding m VMs, reducing n VMs, or keeping the number of VMs unchanged, where m, n are positive integers, and m, n are systems of the first decision module according to current time The load indicator and the number of VMs used by the system are determined.
  2. 如权利要求1所述的装置,其特征在于,所述第一判决模块具体用于:The apparatus according to claim 1, wherein said first decision module is specifically configured to:
    确定第一操作,以使在执行第一操作之后,所述系统的性能指标符合预设的性能指标要求,且使用的VM的数量最少;Determining the first operation, so that after performing the first operation, the performance indicators of the system meet the preset performance index requirements, and the number of VMs used is the least;
    其中,执行第一操作之后所述系统的性能指标,是所述第一判决模块根据当前时刻所述系统的负荷指标,以及执行所述第一操作之后所述系统使用的VM的数量预测的;执行第一操作之后所述系统使用的VM的数量,是所述第一判决模块根据当前时刻所述系统使用的VM的数量,以及确定的第一操作预测的。The performance indicator of the system after performing the first operation is predicted by the first decision module according to the load indicator of the system at the current time, and the number of VMs used by the system after performing the first operation; The number of VMs used by the system after performing the first operation is predicted by the first decision module according to the number of VMs used by the system at the current time and the determined first operation.
  3. 如权利要求2所述的装置,其特征在于,所述数据采集模块还用于:在所述第一判决模块确定第一操作之前,获取当前时刻所述系统的性能指标;The device of claim 2, wherein the data collection module is further configured to: obtain a performance indicator of the system at a current time before the first decision module determines the first operation;
    所述第一判决模块具体用于:The first decision module is specifically configured to:
    根据当前时刻所述系统的负荷指标、性能指标和所述系统使用的VM的数量,确定当前时刻所述系统所处的当前状态;Determining a current state of the system at the current moment according to the load indicator, the performance indicator, and the number of VMs used by the system in the current moment;
    对于可执行的第一操作的集合中的每一个第一操作,确定如下三项数值,并根据确定的如下三项数值,更新在所述当前状态下,对所述系统执行该第一操作得到的累积的回报值:For each of the first operations of the set of executable first operations, determining the following three values, and updating according to the determined three values, in the current state, performing the first operation on the system Cumulative return value:
    上一次所述系统处于所述当前状态下,对所述系统执行该第一操作得到的 累积的回报值、在当前时刻对所述系统执行该第一操作得到的即时的回报值,以及上一次所述系统处于下一个状态下,对所述系统执行所述可执行的第一操作的集合中的每一个第一操作得到的累积的回报值中的最大值,其中,所述下一个状态为执行该第一操作之后所述系统所处的状态;The last time the system is in the current state, and the first operation is performed on the system. The cumulative reward value, the immediate reward value obtained by performing the first operation on the system at the current time, and the last time the system is in the next state, performing the executable first operation on the system a maximum of the accumulated reward values obtained by each of the first operations in the set, wherein the next state is a state in which the system is after performing the first operation;
    从更新后的每一个第一操作对应的、对所述系统执行该第一操作得到的累积的回报值中,选择最大的累积的回报值对应的第一操作,作为要对所述系统执行的第一操作;Selecting, from the accumulated reward value obtained by performing the first operation on the system corresponding to each of the updated first operations, a first operation corresponding to the largest accumulated reward value, as being performed on the system First operation
    其中,所述回报值是所述第一判决模块根据所述系统使用的VM的数量,以及所述系统在当前时刻所述系统的负荷指标所指示的负荷下的性能指标确定的,所述系统使用的VM的数量越少,所述系统的性能指标指示所述系统的性能越高,所述回报值越大。The reward value is determined by the first decision module according to the number of VMs used by the system, and the performance index of the system under the load indicated by the load indicator of the system at the current time, the system The fewer the number of VMs used, the higher the performance metric of the system indicates the higher the performance of the system, the greater the reward value.
  4. 如权利要求3所述的装置,其特征在于,所述第一判决模块具体用于:The apparatus according to claim 3, wherein said first decision module is specifically configured to:
    根据预测的执行该第一操作之后所述系统使用的VM的数量,以及当前时刻所述系统的负荷指标,预测执行该第一操作之后所述系统的性能指标;Predicting performance indicators of the system after performing the first operation according to the predicted number of VMs used by the system after performing the first operation, and load indicators of the system at the current time;
    根据预测的执行该第一操作之后所述系统使用的VM的数量和所述系统的性能指标,确定对所述系统执行该第一操作得到的即时的回报值。And determining an immediate reward value obtained by performing the first operation on the system according to the predicted number of VMs used by the system after performing the first operation and performance indicators of the system.
  5. 如权利要求3所述的装置,其特征在于,所述第一判决模块具体用于:The apparatus according to claim 3, wherein said first decision module is specifically configured to:
    根据当前时刻所述系统的负荷指标、执行该第一操作之后所述系统使用的VM的数量,预测在执行该第一操作之后所述系统所处的下一个状态;Determining, according to the load indicator of the system at the current moment, the number of VMs used by the system after performing the first operation, the next state in which the system is located after performing the first operation;
    确定在所述下一个状态下,对所述系统执行所述可执行的第一操作的集合中的每一个第一操作得到的累积的回报值;Determining, in the next state, performing, for the system, a cumulative reward value obtained for each of the first operations of the set of executable first operations;
    从确定的各累积的回报值中,选取最大的累积的回报值。From the determined cumulative return values, the largest cumulative return value is selected.
  6. 如权利要求1所述的装置,其特征在于,The device of claim 1 wherein:
    所述装置还包括:VM数量调整方式选择模块,用于选择VM数量调整的方式;The device further includes: a VM quantity adjustment mode selection module, configured to select a mode for adjusting the number of VMs;
    所述第一判决模块具体用于: The first decision module is specifically configured to:
    若所述VM数量调整方式选择模块选择的VM数量调整的方式为:根据当前时刻所述系统的负荷指标和所述系统使用的VM的数量,调整所述系统使用的VM的数量,则The method for adjusting the number of VMs selected by the VM quantity adjustment mode selection module is: adjusting the number of VMs used by the system according to the load indicator of the system at the current time and the number of VMs used by the system,
    根据当前时刻所述系统的负荷指标和所述系统使用的VM的数量,确定要对所述系统执行的第一操作。The first operation to be performed on the system is determined based on the load indicator of the system at the current time and the number of VMs used by the system.
  7. 如权利要求6所述的装置,其特征在于,所述装置还包括第二判决模块,用于:The apparatus of claim 6 wherein said apparatus further comprises a second decision module for:
    在所述VM数量调整方式选择模块选择的VM数量调整的方式为:按照所述系统的负荷指标上限阈值和系统的负荷指标下限阈值,判断是否需要调整VM数量之后,The method for adjusting the number of VMs selected by the VM quantity adjustment mode selection module is: determining whether the number of VMs needs to be adjusted according to the upper limit threshold of the load index of the system and the lower limit threshold of the load indicator of the system,
    将所述数据采集模块获取的当前时刻所述系统的负荷指标与所述系统的负荷指标上限阈值和所述系统的负荷指标下限阈值比较,根据比较结果确定要对所述系统执行的第二操作,所述第二操作包括:增加p个VM、减小q个VM,或保持VM数量不变,所述p为预设的向上调整步长,所述q为预设的向下调整步长,p、q为正整数。Comparing the load indicator of the system at the current time acquired by the data collection module with the upper limit threshold of the load indicator of the system and the lower limit threshold of the load indicator of the system, and determining a second operation to be performed on the system according to the comparison result The second operation includes: adding p VMs, reducing q VMs, or keeping the number of VMs unchanged, the p being a preset upward adjustment step, and the q being a preset downward adjustment step , p, q are positive integers.
  8. 如权利要求7所述的装置,其特征在于,所述数据采集模块还用于:获取当前时刻之前的T个历史时刻中,每一个历史时刻所述系统的负荷指标,其中T为正整数;The device according to claim 7, wherein the data collection module is further configured to: acquire a load indicator of the system in each of the T historical moments before the current time, where T is a positive integer;
    所述负荷指标上限阈值和所述负荷指标下限阈值是所述第二判决模块根据当前时刻之前的T个历史时刻中,每一个历史时刻所述系统的负荷指标,按照如下条件确定的:The load indicator upper limit threshold and the load indicator lower limit threshold are determined by the second decision module according to the following conditions according to the load index of the system in each of the T historical moments before the current time:
    在对所述系统执行所述第二操作之后,所述系统的性能指标符合所述预设的性能指标要求,且使用的VM的数量最少。After performing the second operation on the system, the performance indicators of the system meet the preset performance index requirements, and the number of VMs used is the least.
  9. 如权利要求8所述的装置,其特征在于,所述第二判决模块具体用于按照如下步骤确定所述负荷指标上限阈值和所述负荷指标下限阈值:The apparatus according to claim 8, wherein the second decision module is specifically configured to determine the load index upper limit threshold and the load indicator lower limit threshold according to the following steps:
    针对每一个备选的负荷指标上限阈值和负荷指标下限阈值的组合,通过执 行如下步骤,确定投入回报比:For each combination of the upper limit threshold of the load indicator and the lower limit of the load indicator, Take the following steps to determine the return on investment ratio:
    对于所述数据采集模块获取的每一个历史时刻所述系统的负荷指标,预测根据该备选的负荷指标上限阈值和负荷指标下限阈值的组合对所述系统执行第二操作后,所述系统使用的VM数量;并根据该历史时刻所述系统的负荷指标和预测的执行第二操作后所述系统使用的VM数量,预测执行第二操作之后所述系统的性能指标;For the load indicator of the system at each historical time acquired by the data collection module, predicting that the system performs the second operation after performing the second operation on the system according to the combination of the candidate load index upper threshold and the lower limit of the load indicator The number of VMs; and predicting performance indicators of the system after performing the second operation according to the load indicator of the system at the historical moment and the predicted number of VMs used by the system after performing the second operation;
    根据每一个历史时刻所对应的、执行所述第二操作之后所述系统使用的VM数量和的性能指标,确定投入回报比,其中,各性能指标中符合所述预设的性能指标要求的性能指标的数量越多,各历史时刻所述系统使用的VM数量的总和越少,所述投入回报比越高;Determining an input return ratio according to a performance index of the number of VMs used by the system after performing the second operation corresponding to each historical moment, wherein performance of each performance indicator meeting the preset performance index requirement The greater the number of indicators, the less the sum of the number of VMs used by the system at each historical moment, and the higher the return on investment ratio;
    选择最大投入回报比对应的备选的负荷指标上限阈值和负荷指标下限阈值的组合;将选择的该组合中的负荷指标上限阈值,作为确定的所述负荷指标上限阈值,将选择的该组合中的负荷指标下限阈值,作为确定的所述负荷指标下限阈值。Selecting a combination of the corresponding maximum load return ratio and the corresponding load indicator upper limit threshold and the load indicator lower limit threshold; selecting the selected load indicator upper limit threshold as the determined load indicator upper limit threshold, the selected combination is selected The lower limit threshold of the load index is determined as the lower limit threshold of the load indicator.
  10. 一种确定虚拟机VM数量调整操作的方法,其特征在于,包括:A method for determining a virtual machine VM number adjustment operation, comprising:
    获取当前时刻系统的负荷指标和所述系统使用的VM的数量,其中,所述系统使用一个或多个VM;Obtaining a load indicator of the current time system and a number of VMs used by the system, wherein the system uses one or more VMs;
    根据当前时刻所述系统的负荷指标和所述系统使用的VM的数量,确定要对所述系统执行的第一操作;Determining a first operation to be performed on the system according to a load indicator of the system at the current time and a number of VMs used by the system;
    所述第一操作包括:增加m个VM、减少n个VM,或保持VM数量不变,其中,m、n为正整数,且m、n是根据当前时刻所述系统的负荷指标和所述系统使用的VM的数量确定的。The first operation includes: adding m VMs, reducing n VMs, or keeping the number of VMs unchanged, where m and n are positive integers, and m and n are load indicators of the system according to the current time and the The number of VMs used by the system is determined.
  11. 如权利要求10所述的方法,其特征在于,确定要对所述系统执行的第一操作,包括:The method of claim 10 wherein determining the first operation to be performed on the system comprises:
    确定第一操作,以使执行第一操作之后所述系统的性能指标符合预设的性能指标要求,且使用的VM的数量最少; Determining the first operation, so that the performance indicator of the system after performing the first operation meets the preset performance index requirement, and the number of VMs used is the least;
    其中,执行所述第一操作之后所述系统的性能指标,是根据当前时刻所述系统的负荷指标,以及执行所述第一操作之后所述系统使用的VM的数量预测的;执行所述第一操作之后所述系统使用的VM的数量,是根据当前时刻所述系统使用的VM的数量,以及确定的第一操作预测的。The performance indicator of the system after performing the first operation is predicted according to the load indicator of the system at the current time, and the number of VMs used by the system after performing the first operation; The number of VMs used by the system after an operation is predicted based on the number of VMs used by the system at the current time, and the determined first operation.
  12. 如权利要求11所述的方法,其特征在于,在确定要对所述系统执行的第一操作之前,还包括:获取当前时刻所述系统的性能指标;The method according to claim 11, wherein before determining the first operation to be performed on the system, the method further comprises: acquiring a performance indicator of the system at the current time;
    确定要对所述系统执行的第一操作,包括:Determining the first action to be performed on the system, including:
    根据当前时刻所述系统的负荷指标、性能指标和所述系统使用的VM的数量,确定在当前时刻所述系统所处的当前状态;Determining a current state of the system at a current time according to a load indicator, a performance indicator, and a number of VMs used by the system at the current time;
    对于可执行的第一操作的集合中的每一个第一操作,确定如下三项数值,并根据确定的如下三项数值,更新在所述当前状态下,对所述系统执行该第一操作得到的累积的回报值:For each of the first operations of the set of executable first operations, determining the following three values, and updating according to the determined three values, in the current state, performing the first operation on the system Cumulative return value:
    上一次所述系统处于所述当前状态下对所述系统执行该第一操作得到的累积的回报值、在当前时刻对所述系统执行该第一操作得到的即时的回报值,以及上一次所述系统处于下一个状态下,对所述系统执行所述可执行的第一操作的集合中的每一个第一操作得到的累积的回报值中的最大值,其中,所述下一个状态为执行该第一操作之后所述系统所处的状态;The cumulative reward value obtained by the system in the current state for performing the first operation on the system, the immediate reward value obtained by performing the first operation on the system at the current time, and the last time The system is in a next state, performing a maximum of the accumulated reward values obtained by each of the first set of executable first operations on the system, wherein the next state is execution The state in which the system is located after the first operation;
    从更新后的每一个第一操作对应的、对所述系统执行该第一操作得到的累积的回报值中,选择最大的累积的回报值对应的第一操作,作为要对所述系统执行的第一操作;Selecting, from the accumulated reward value obtained by performing the first operation on the system corresponding to each of the updated first operations, a first operation corresponding to the largest accumulated reward value, as being performed on the system First operation
    其中,所述回报值是根据所述系统使用的VM的数量,以及所述系统在当前时刻所述系统的负荷指标所指示的负荷下的性能指标确定的,所述系统使用的VM的数量越少,所述系统的性能指标指示所述系统的性能越高,所述回报值越大。The reward value is determined according to the number of VMs used by the system, and the performance index of the system under the load indicated by the load indicator of the system at the current time, and the number of VMs used by the system is increased. Less, the performance metric of the system indicates that the higher the performance of the system, the greater the reward value.
  13. 如权利要求12所述的方法,其特征在于,确定在当前时刻对所述系统执行该第一操作得到的即时的回报值,包括: The method of claim 12, wherein determining an immediate reward value obtained by performing the first operation on the system at a current time comprises:
    根据预测的执行该第一操作之后所述系统使用的VM的数量,以及当前时刻所述系统的负荷指标,预测执行该第一操作之后所述系统的性能指标;Predicting performance indicators of the system after performing the first operation according to the predicted number of VMs used by the system after performing the first operation, and load indicators of the system at the current time;
    根据预测的执行该第一操作之后所述系统使用的VM的数量和所述系统的性能指标,确定在当前时刻对所述系统执行该第一操作得到的即时的回报值。And determining, according to the predicted number of VMs used by the system after the first operation and performance indicators of the system, an immediate reward value obtained by performing the first operation on the system at a current time.
  14. 如权利要求12所述的方法,其特征在于,确定在执行该第一操作之后所述系统所处的下一个状态下,对所述系统执行所述可执行的第一操作的集合中的每一个第一操作得到的累积的回报值中的最大值,包括:The method of claim 12, wherein each of the set of executable first operations is performed on the system in a next state in which the system is located after performing the first operation The maximum of the cumulative return values obtained by a first operation, including:
    根据当前时刻所述系统的负荷指标、执行该第一操作之后所述系统使用的VM的数量,预测在执行该第一操作之后所述系统所处的下一个状态;Determining, according to the load indicator of the system at the current moment, the number of VMs used by the system after performing the first operation, the next state in which the system is located after performing the first operation;
    确定在所述下一个状态下,对所述系统执行所述可执行的第一操作的集合中的每一个第一操作得到的累积的回报值;Determining, in the next state, performing, for the system, a cumulative reward value obtained for each of the first operations of the set of executable first operations;
    从确定的各累积的回报值中,选取最大的累积的回报值。From the determined cumulative return values, the largest cumulative return value is selected.
  15. 如权利要求10所述的方法,其特征在于,The method of claim 10 wherein:
    在确定要对所述系统执行的第一操作之前,还包括:选择VM数量调整的方式;Before determining the first operation to be performed on the system, the method further includes: selecting a manner of adjusting the number of VMs;
    确定要对所述系统执行的第一操作,包括:Determining the first action to be performed on the system, including:
    若选择的VM数量调整的方式为:根据获取的当前时刻所述系统的负荷指标和所述系统使用的VM的数量,调整所述系统使用的VM的数量,则If the number of selected VMs is adjusted, the number of VMs used by the system is adjusted according to the load indicator of the system and the number of VMs used by the system.
    根据获取的当前时刻所述系统的负荷指标和所述系统使用的VM的数量,确定要对所述系统执行的第一操作。Determining a first operation to be performed on the system according to the obtained load indicator of the system at the current time and the number of VMs used by the system.
  16. 如权利要求15所述的方法,其特征在于,若选择的VM数量调整的方式为:按照所述系统的负荷指标上限阈值和系统的负荷指标下限阈值,判断是否需要调整VM数量,则在选择VM数量调整的方式之后,还包括:The method according to claim 15, wherein if the selected number of VMs is adjusted, according to the upper limit threshold of the load index of the system and the lower limit threshold of the load index of the system, whether the number of VMs needs to be adjusted is selected. After the method of adjusting the number of VMs, it also includes:
    将获取的当前时刻所述系统的负荷指标与所述系统的负荷指标上限阈值和所述系统的负荷指标下限阈值比较,根据比较结果确定要对所述系统执行的 第二操作,所述第二操作包括:增加p个VM、减小q个VM,或保持VM数量不变,所述p为预设的向上调整步长,所述q为预设的向下调整步长,p、q为正整数。Comparing the acquired load index of the system at the current time with the upper limit threshold of the load indicator of the system and the lower limit threshold of the load indicator of the system, and determining, according to the comparison result, that the system is to be executed on the system In a second operation, the second operation includes: adding p VMs, reducing q VMs, or keeping the number of VMs unchanged, wherein p is a preset upward adjustment step, and the q is a preset downward direction Adjust the step size, p, q are positive integers.
  17. 如权利要求16所述的方法,其特征在于,所述负荷指标上限阈值和所述负荷指标下限阈值是根据获取的当前时刻之前的T个历史时刻中,每一个历史时刻所述系统的负荷指标,按照如下条件确定的:The method according to claim 16, wherein the load index upper limit threshold and the load index lower limit threshold are load indicators of the system according to each of the T historical moments before the acquired current time. , determined according to the following conditions:
    在对所述系统执行所述第二操作之后,所述系统的性能指标符合所述预设的性能指标要求,且使用的VM的数量最少,其中T为正整数。After performing the second operation on the system, the performance indicator of the system meets the preset performance index requirement, and the number of VMs used is the least, where T is a positive integer.
  18. 如权利要求17所述的方法,其特征在于,所述负荷指标上限阈值和所述负荷指标下限阈值具体是根据如下步骤确定的:The method according to claim 17, wherein the load index upper limit threshold and the load index lower limit threshold are specifically determined according to the following steps:
    针对每一个备选的负荷指标上限阈值和负荷指标下限阈值的组合,通过执行如下步骤,确定投入回报比:For each combination of the upper limit threshold of the load indicator and the lower limit of the load indicator, the input return ratio is determined by performing the following steps:
    对于获取的每一个历史时刻所述系统的负荷指标,预测根据该备选的负荷指标上限阈值和负荷指标下限阈值的组合对所述系统执行第二操作后,所述系统使用的VM数量;并根据该历史时刻所述系统的负荷指标和预测的所述系统执行第二操作后使用的VM数量,预测在执行所述第二操作之后所述系统的性能指标;For the load indicator of the system at each historical time obtained, predicting the number of VMs used by the system after performing the second operation on the system according to the combination of the candidate load index upper threshold and the lower limit of the load index; Determining a performance indicator of the system after performing the second operation according to the load indicator of the system at the historical moment and the predicted number of VMs used by the system after performing the second operation;
    根据每一个历史时刻所对应的、执行第二操作之后所述系统使用的VM数量和的性能指标,确定投入回报比,其中,各性能指标中符合所述预设的性能指标要求的性能指标的数量越多,各历史时刻所述系统使用的VM数量的总和越少,所述投入回报比越高;Determining an input return ratio according to a performance index of the number of VMs used by the system after performing the second operation corresponding to each historical moment, wherein each performance indicator meets the performance index required by the preset performance indicator The greater the number, the less the sum of the number of VMs used by the system at each historical moment, and the higher the return on investment ratio;
    选择最大投入回报比对应的备选的负荷指标上限阈值和负荷指标下限阈值的组合;将选择的该组合中的负荷指标上限阈值,作为确定的所述负荷指标上限阈值,将选择的该组合中的负荷指标下限阈值,作为确定的所述负荷指标下限阈值。 Selecting a combination of the corresponding maximum load return ratio and the corresponding load indicator upper limit threshold and the load indicator lower limit threshold; selecting the selected load indicator upper limit threshold as the determined load indicator upper limit threshold, the selected combination is selected The lower limit threshold of the load index is determined as the lower limit threshold of the load indicator.
PCT/CN2014/094226 2014-12-18 2014-12-18 Device and method for determining operation for adjusting number of virtual machines WO2016095162A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201480028886.9A CN106170767B (en) 2014-12-18 2014-12-18 Device and method for determining number adjustment operation of virtual machines
PCT/CN2014/094226 WO2016095162A1 (en) 2014-12-18 2014-12-18 Device and method for determining operation for adjusting number of virtual machines

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/094226 WO2016095162A1 (en) 2014-12-18 2014-12-18 Device and method for determining operation for adjusting number of virtual machines

Publications (1)

Publication Number Publication Date
WO2016095162A1 true WO2016095162A1 (en) 2016-06-23

Family

ID=56125624

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/094226 WO2016095162A1 (en) 2014-12-18 2014-12-18 Device and method for determining operation for adjusting number of virtual machines

Country Status (2)

Country Link
CN (1) CN106170767B (en)
WO (1) WO2016095162A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109783221A (en) * 2017-11-14 2019-05-21 中国移动通信有限公司研究院 A kind of resources of virtual machine distribution method, device and Resource Server
CN113381873A (en) * 2020-03-10 2021-09-10 华为技术有限公司 Capacity expansion method and related device for network equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214117A (en) * 2010-04-07 2011-10-12 中兴通讯股份有限公司 Virtual machine management method, system and server
CN103793278A (en) * 2013-09-30 2014-05-14 中国电子设备系统工程公司研究所 Automatic resource adjusting method on basis of operation and maintenance rules of virtual device
CN103870341A (en) * 2014-03-12 2014-06-18 汉柏科技有限公司 Method and system of adjusting resources of virtual machine

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8671294B2 (en) * 2008-03-07 2014-03-11 Raritan Americas, Inc. Environmentally cognizant power management
CN101694633A (en) * 2009-09-30 2010-04-14 曙光信息产业(北京)有限公司 Equipment, method and system for dispatching of computer operation
US8276139B2 (en) * 2009-09-30 2012-09-25 International Business Machines Corporation Provisioning virtual machine placement
CN101894050B (en) * 2010-07-28 2014-04-16 山东中创软件工程股份有限公司 Method, device and system for flexibly scheduling JEE application resources of cloud resource pool
CN102291390B (en) * 2011-07-14 2014-06-04 南京邮电大学 Method for defending against denial of service attack based on cloud computation platform
CN102508693A (en) * 2011-09-29 2012-06-20 华中科技大学 Web server capacity expansion system based on virtual machine
CN103294552A (en) * 2012-02-22 2013-09-11 鸿富锦精密工业(深圳)有限公司 Method for increasing configuration quantity of virtual machines of server
EP2775399A4 (en) * 2012-12-26 2015-04-29 Huawei Tech Co Ltd Resource management method of virtual machine system, virtual machine system, and apparatus
US9665154B2 (en) * 2013-05-31 2017-05-30 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Subsystem-level power management in a multi-node virtual machine environment
CN103533063A (en) * 2013-10-18 2014-01-22 北京华胜天成科技股份有限公司 Method and device capable of realizing dynamic expansion of WEB (World Wide Web) application resource
CN103595780B (en) * 2013-11-08 2017-01-04 中国人民解放军理工大学 Cloud computing resource scheduling method based on the weight that disappears
CN103984602A (en) * 2014-05-20 2014-08-13 华为技术有限公司 VM (virtual machine) resource scheduling method, device and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214117A (en) * 2010-04-07 2011-10-12 中兴通讯股份有限公司 Virtual machine management method, system and server
CN103793278A (en) * 2013-09-30 2014-05-14 中国电子设备系统工程公司研究所 Automatic resource adjusting method on basis of operation and maintenance rules of virtual device
CN103870341A (en) * 2014-03-12 2014-06-18 汉柏科技有限公司 Method and system of adjusting resources of virtual machine

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109783221A (en) * 2017-11-14 2019-05-21 中国移动通信有限公司研究院 A kind of resources of virtual machine distribution method, device and Resource Server
CN109783221B (en) * 2017-11-14 2020-12-29 中国移动通信有限公司研究院 Virtual machine resource allocation method and device and resource server
CN113381873A (en) * 2020-03-10 2021-09-10 华为技术有限公司 Capacity expansion method and related device for network equipment
CN113381873B (en) * 2020-03-10 2023-02-03 华为技术有限公司 Capacity expansion method and related device for network equipment

Also Published As

Publication number Publication date
CN106170767A (en) 2016-11-30
CN106170767B (en) 2020-05-15

Similar Documents

Publication Publication Date Title
US20220191602A1 (en) Out-of-band platform tuning and configuration
WO2020258920A1 (en) Network slice resource management method and apparatus
US7552152B2 (en) Risk-modulated proactive data migration for maximizing utility in storage systems
US10200446B2 (en) Method and system to estimate user desired delay for resource allocation for mobile cloud applications
JP6493400B2 (en) Service chain management device, service chain management system, service chain management method, and program
LaCurts et al. Cicada: Introducing predictive guarantees for cloud networks
Yazdanov et al. VScaler: Autonomic virtual machine scaling
WO2017128980A1 (en) Method and device for managing resources in cloud platform
US20120221730A1 (en) Resource control system and resource control method
CN103916396A (en) Method for automatic expansion of application examples of cloud platform based on load self-adaption
JP2008519322A (en) Method for managing resources in a platform for telecommunications services and / or network management, supported platforms, and computer program products thereof
US20200012602A1 (en) Cache allocation method, and apparatus
CN108366082A (en) Expansion method and flash chamber
US20220407914A1 (en) Method, system and device for cdn scheduling, and storage medium
Shen et al. Goodbye to fixed bandwidth reservation: Job scheduling with elastic bandwidth reservation in clouds
KR101448413B1 (en) Method and apparatus for scheduling communication traffic in atca-based equipment
WO2016095162A1 (en) Device and method for determining operation for adjusting number of virtual machines
CN116743669A (en) Deep reinforcement learning packet scheduling method, system, terminal and medium
Ali et al. Proactive vnf scaling and placement in 5g o-ran using ml
Rachkidi et al. Towards efficient automatic scaling and adaptive cost-optimized ehealth services in cloud
EP4013087A1 (en) System and method for 5g mobile network management
CN113254191A (en) Method, electronic device and computer program product for running applications
WO2017214986A1 (en) Cloud application scaling method and apparatus
Ren et al. Design and analysis of dynamic auto scaling algorithm (DASA) for 5G mobile networks
CN106533730B (en) Hadoop cluster component index acquisition method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14908197

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14908197

Country of ref document: EP

Kind code of ref document: A1