CPU super-fraction updating method and device and electronic equipment
By dynamically adjusting the CPU overscore ratio of the computing node cluster, calculating multiple CPU overscore values based on key data indicators and smoothing them, the problem of low resource utilization in cloud computing environment is solved, and resource utilization and cost-effectiveness is improved , adapts to the needs of a multi-tenant environment.
Patent Information
- Application Number
- CN202410987285.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-12
AI Technical Summary
In the cloud computing environment, the existing CPU overscore calculation solution leads to low resource utilization and is unable to effectively adapt to the workload and demand differences of different users in a multi-tenant environment.
By obtaining the key data indicators of the computing node cluster, dynamically adjusting the CPU overscore ratio, including CPU utilization, number of virtual machines, number of virtual ports, maximum number of CPU cores available, etc., and calculate the values of multiple CPU overscore ratios based on these indicators. And smoothing is performed to determine the appropriate CPU over-score calculation value, and update the over-score configuration value of the computing node cluster.
Improve the resource utilization rate of the computing node cluster and meet the performance requirements of different virtual machine instances. Specifically, the amount of available resources available for idle nodes is increased by about 40%, reducing the CPU overscore of computing-intensive nodes and reducing the busyness of virtual machines. performance degradation and resource competition risk in stages.
Smart Images

Figure CN118939369A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a CPU over-resolution updating method, device and electronic equipment. Background Art
[0002] In cloud computing environments, CPU over-resolution technology allows virtual machine instances to be allocated computing power that exceeds their actual physical CPU resources. Existing CPU over-resolution measurement solutions mainly assume that under ideal load conditions, the CPU over-resolution ratio value is determined based on the performance difference of a single computing node under different numbers of virtual machines under different loads. This solution can test the appropriate over-resolution ratio value in advance based on the stable operating performance range of the virtual machine computing type.
[0003] However, cloud computing is usually a multi-tenant environment, where multiple users share the same set of hardware resources. Different users often have different resource requirements due to their workloads, needs, and behavior patterns. When applying existing CPU super-resolution measurement solutions to cloud computing environments, there is a problem of low resource utilization. Summary of the invention
[0004] The purpose of the present invention is to provide a CPU over-resolution updating method, device and electronic equipment, which can dynamically adjust the CPU over-resolution of a computing node cluster, improve resource utilization, and is suitable for a cloud computing environment.
[0005] In a first aspect, in order to achieve the above-mentioned object, an embodiment of the present invention provides a method for updating a CPU over-resolution ratio, comprising:
[0006] Obtain key data indicators of computing node clusters;
[0007] According to the key data indicator, n CPU over-allocation ratio values are obtained, each of which is related to an over-allocation ratio influencing factor, and n is a positive integer;
[0008] Determine a CPU over-allocation ratio measurement value of the computing node cluster at the measurement time according to the n CPU over-allocation ratio values;
[0009] The over-resolution configuration value corresponding to the computing node cluster at the measurement time is updated to the CPU over-resolution measurement value.
[0010] Optionally, the key data indicator includes at least one of the following:
[0011] The CPU utilization of the computing node cluster;
[0012] The number of computing nodes in the computing node cluster;
[0013] The number of virtual machines in the computing node cluster;
[0014] The number of virtual ports of the computing node cluster;
[0015] The maximum number of CPU cores available for sale in the computing node cluster;
[0016] The CPU sales rate of the computing node cluster;
[0017] The maximum sellable amount of memory of the computing node cluster;
[0018] The CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time.
[0019] Optionally, when the over-resolution ratio influencing factor is the number of virtual ports, obtaining the CPU over-resolution ratio value according to the key data indicator includes:
[0020] According to the first data in the key data indicator, obtaining the CPU over-resolution ratio value;
[0021] Wherein, the first data includes:
[0022] The number of computing nodes in the computing node cluster;
[0023] The number of virtual machines in the computing node cluster;
[0024] The CPU sales rate of the computing node cluster;
[0025] The number of virtual ports of the computing node cluster;
[0026] The CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time.
[0027] Optionally, obtaining the CPU over-resolution ratio value according to the first data in the key data indicator includes:
[0028] According to the formula: Determine the CPU over-allocation ratio value;
[0029] Among them, AllocRation1 is the CPU over-allocation ratio value, R_sold is the CPU selling rate of the computing node cluster, Ralloc is the CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time, N_vport is the number of virtual ports of the computing node cluster, N_vm is the number of virtual machines of the computing node cluster, N_pm is the number of computing nodes of the computing node cluster, N_vport is the number of virtual machines of the computing node cluster, N_pm is the number of computing nodes of the computing node cluster, max The upper limit of the number of virtual ports for each computing node.
[0030] Optionally, when the over-resolution ratio influencing factor is the CPU utilization, obtaining the CPU over-resolution ratio value according to the key data indicator includes:
[0031] According to the second data in the key data indicator, obtaining the CPU over-resolution ratio value;
[0032] Wherein, the second data includes:
[0033] The CPU utilization of the computing node cluster;
[0034] The CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time.
[0035] Optionally, obtaining the CPU over-resolution ratio value according to the second data in the key data indicator includes:
[0036] According to the formula: Determine the CPU over-allocation ratio value;
[0037] Among them, AllocRation2 is the CPU over-allocation ratio value, R_cpu is the CPU utilization of the computing node cluster, Ralloc is the CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time, and R max Indicates the preset CPU usage threshold.
[0038] Optionally, when the over-resolution ratio influencing factor is the CPU to memory ratio, obtaining the CPU over-resolution ratio value according to the key data indicator includes:
[0039] According to the third data in the key data indicator, obtaining the CPU over-resolution ratio value;
[0040] Wherein, the third data includes:
[0041] The maximum number of CPU cores available for sale in the computing node cluster;
[0042] The maximum sellable amount of memory of the computing node cluster;
[0043] The CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time.
[0044] Optionally, obtaining the CPU over-resolution ratio value according to the third data in the key data indicator includes:
[0045] According to the formula: Determine the CPU over-allocation ratio value;
[0046] Among them, AllocRation3 is the CPU over-allocation ratio value, Ralloc is the CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time, and R rate is the preset CPU and memory ratio threshold, M max is the maximum amount of memory available for sale in the computing node cluster, C max The maximum number of CPU cores available for sale in the computing node cluster.
[0047] Optionally, determining a CPU over-allocation ratio measurement value of the computing node cluster at a measurement time according to the n CPU over-allocation ratio values includes:
[0048] Determine, according to the n CPU over-allocation ratio values, a first CPU over-allocation ratio value corresponding to the computing node cluster at the measurement time;
[0049] The first CPU over-allocation ratio value and the CPU over-allocation ratio calculated value of the computing node cluster corresponding to the previous moment of the calculation moment are smoothed to obtain the CPU over-allocation ratio calculated value of the computing node cluster at the calculation moment.
[0050] Optionally, the smoothing of the first CPU over-resolution ratio value and the CPU over-resolution ratio calculated value corresponding to the computing node cluster at the previous moment of the calculation moment to obtain the CPU over-resolution ratio calculated value of the computing node cluster at the calculation moment includes:
[0051] According to the formula S(t)=α×X(t)+(1-α)×S(t-1), determine the CPU over-resolution ratio measurement value of the computing node cluster at the measurement time;
[0052] Among them, S(t) is the calculated value of the CPU over-allocation ratio of the computing node cluster at the calculation time t, X(t) is the first CPU over-allocation ratio value of the computing node cluster at the calculation time t, S(t-1) is the calculated value of the CPU over-allocation ratio of the computing node cluster at the previous moment of the calculation time, t-1 is the previous moment of the calculation time, and α is the smoothing parameter.
[0053] In a second aspect, in order to achieve the above-mentioned object, an embodiment of the present invention provides a CPU over-resolution updating device, comprising:
[0054] The acquisition module is used to obtain key data indicators of the computing node cluster;
[0055] A first processing module is used to obtain n CPU over-allocation ratio values according to the key data indicator, each of the CPU over-allocation ratio values is related to an over-allocation ratio influencing factor, and n is a positive integer;
[0056] A second processing module is used to determine a CPU over-allocation ratio measurement value of the computing node cluster at a measurement time according to the n CPU over-allocation ratio values;
[0057] The third processing module is used to update the over-resolution configuration value corresponding to the computing node cluster at the measurement time to the CPU over-resolution measurement value.
[0058] In the third aspect, in order to achieve the above-mentioned purpose, an embodiment of the present invention provides an electronic device, including a transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; when the processor executes the program or instruction, the CPU over-resolution ratio update method as described in the first aspect above is implemented.
[0059] In a fourth aspect, in order to achieve the above-mentioned purpose, an embodiment of the present invention provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the CPU over-resolution ratio update method as described in the first aspect above is implemented.
[0060] In a fifth aspect, in order to achieve the above-mentioned purpose, an embodiment of the present invention provides a computer program product, including computer instructions, which, when executed by a processor, implement the CPU over-resolution ratio update method as described in the first aspect above.
[0061] The beneficial effects of the above technical solution of the present invention are as follows:
[0062] The method of the embodiment of the present invention obtains the key data indicators of the computing node cluster; obtains n CPU over-resolution ratio values according to the key data indicators, each of the CPU over-resolution ratio values is related to an over-resolution ratio influencing factor, and n is a positive integer; determines the CPU over-resolution ratio measured value of the computing node cluster at the measurement time according to the n CPU over-resolution ratio values; updates the over-resolution ratio configuration value corresponding to the computing node cluster at the measurement time to the CPU over-resolution ratio measured value. The scheme of the present invention calculates the key data indicators from the dimension of the computing node cluster. Compared with the existing solution that only considers a single computing node under different load conditions, the embodiment of the present application has stronger adaptability and higher accuracy in the cloud computing environment; further, according to the key data indicators, multiple CPU over-resolution ratio values under different over-resolution ratio influencing factors are calculated; according to multiple CPU over-resolution ratio values, the CPU over-resolution ratio of the computing node cluster is dynamically adjusted. It can improve the resource utilization of the computing node cluster and meet the performance requirements of different virtual machine instances. Specifically, for computing node clusters with idle computing resources, the amount of saleable resources increases by about 40%, greatly improving cost-effectiveness; for computing node clusters with intensive computing, the CPU over-resolution ratio can be reduced in a timely manner to reduce the risk of performance degradation and resource competition of virtual machines during busy periods. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 A flowchart of a method for updating a CPU over-resolution ratio according to an embodiment of the present invention;
[0064] Figure 2 A flowchart of a method for updating a CPU over-resolution ratio according to another embodiment of the present invention;
[0065] Figure 3 A structural diagram of a CPU over-resolution updating device according to an embodiment of the present invention;
[0066] Figure 4 4 is a structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0067] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0068] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present invention. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0069] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0070] Additionally, the terms "system" and "network" are often used interchangeably herein.
[0071] In the embodiments provided in the present application, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.
[0072] like Figure 1 As shown, a method for updating a CPU over-resolution ratio according to an embodiment of the present invention comprises the following steps:
[0073] Step 101: Obtain key data indicators of the computing node cluster.
[0074] Optionally, the key data indicator includes at least one of the following:
[0075] The CPU utilization of the computing node cluster;
[0076] The number of computing nodes in the computing node cluster;
[0077] The number of virtual machines in the computing node cluster;
[0078] The number of virtual ports of the computing node cluster;
[0079] The maximum number of CPU cores available for sale in the computing node cluster;
[0080] The CPU sales rate of the computing node cluster;
[0081] The maximum sellable amount of memory of the computing node cluster;
[0082] The CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time.
[0083] Step 102: According to the key data indicator, n CPU over-allocation ratio values are obtained, each of the CPU over-allocation ratio values is associated with an over-allocation ratio influencing factor, and n is a positive integer.
[0084] Optionally, factors affecting the over-resolution ratio include, but are not limited to: the number of virtual ports, CPU utilization, and CPU to memory ratio.
[0085] In this step, under each over-resolution ratio influencing factor, a suitable algorithm is selected according to key data indicators to accurately associate the key data indicators with the CPU over-resolution ratio value.
[0086] Step 103: Determine a CPU over-allocation ratio measurement value of the computing node cluster at the measurement time according to the n CPU over-allocation ratio values.
[0087] In specific implementation, at the moment of CPU over-resolution ratio measurement, the over-resolution ratio configuration value corresponding to the computing node cluster is obtained; based on the over-resolution ratio configuration value, the CPU over-resolution ratio values are calculated respectively under n over-resolution ratio influencing factors of the computing node cluster to obtain n CPU over-resolution ratio values; further, based on the n CPU over-resolution ratio values, the CPU over-resolution ratio measurement value of the computing node cluster at the measurement moment is obtained.
[0088] Step 104: Update the over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time to the CPU over-allocation ratio measurement value.
[0089] In specific implementation, the computing node cluster can be measured continuously at fixed time intervals to obtain a series of time series data of CPU over-allocation ratio measurement values: K1, K2, ..., Kt; where K1 is the initial value of the measurement, and Kt is the CPU over-allocation ratio measurement value corresponding to the latest t-th measurement moment. In this way, the CPU over-allocation ratio of the computing node cluster can be dynamically updated at fixed time intervals.
[0090] For example, Figure 2 As shown, the method for updating the CPU over-resolution ratio may include the following steps: step 21, data collection; step 22, obtaining key data indicators of the computing node cluster based on the collected data; step 23, using n algorithms under n over-resolution ratio influencing factors to calculate n CPU over-resolution ratio values; step 24, determining the CPU over-resolution ratio measurement value of the computing node cluster at the measurement time based on the n CPU over-resolution ratio values; step 25, updating the CPU over-resolution ratio measurement value to the configuration of the computing node cluster.
[0091] In the above embodiment, the key data indicators are calculated from the dimension of the computing node cluster. Compared with the existing solution that only considers a single computing node under different load conditions, the embodiment of the present application has stronger adaptability and higher accuracy in the cloud computing environment; further, according to the key data indicators, multiple CPU over-resolution ratio values under different over-resolution influencing factors are calculated; according to the multiple CPU over-resolution ratio values, the CPU over-resolution ratio of the computing node cluster is dynamically adjusted. In this way, the resource utilization of the computing node cluster can be improved to meet the performance requirements of different virtual machine instances. Specifically, for computing idle computing node clusters, the amount of saleable resources is increased by about 40%, which greatly improves cost-effectiveness; for computing intensive computing node clusters, the CPU over-resolution ratio can be reduced in time to reduce the risk of performance degradation and resource competition of virtual machines during busy stages.
[0092] Moreover, the above-mentioned embodiment can improve resource utilization while bringing better multi-tenant support and cost-effectiveness by reasonably performing CPU over-allocation, thereby meeting the growing demand for cloud computing.
[0093] In some optional embodiments, in the above step 101, obtaining key data indicators of the computing node cluster includes:
[0094] Obtain configuration data and performance data of the computing node cluster through at least one of the configuration agent software installed on the computing node, the computing node management module API interface, and the log file generated by the computing node;
[0095] The key data indicator is obtained according to the configuration data and / or the performance data.
[0096] Optionally, the performance data includes but is not limited to: CPU utilization of the computing node, memory utilization of the computing node; the configuration data includes but is not limited to: data related to the number of devices in the computing node cluster, data related to the CPU sales situation of the computing node cluster.
[0097] Exemplarily, obtaining the CPU utilization of a computing node cluster is introduced below.
[0098] Take computing node cluster C as an example. The cluster C includes m computing nodes, denoted as: M1, M2, M3, ..., M m ; Divide the natural time slices according to the time interval i, and obtain the regular periodic moments, which are recorded as T1, T2, T3, ..., T n ; For time Tn, calculate node M m The CPU utilization is denoted as U mn ; At the corresponding time, sample the CPU utilization of all computing nodes in cluster C and obtain the CPU utilization of time T n The corresponding cluster CPU utilization values are recorded as R1, R2, R3, ..., R n The details are shown in Table 1 below.
[0099] Table 1
[0100] Node\Time <![CDATA[T1]]> <![CDATA[T2]]> <![CDATA[T3]]> ... <![CDATA[T n ]]> <![CDATA[M1]]> 50% 11% 20% ... 10% <![CDATA[M2]]> 2% 6% 36% ... 16% ... ... ... ... ... ... <![CDATA[M m ]]> 9% 16% 46% ... 66%
[0101] Furthermore, T n The CPU utilization of cluster C at this moment is R n The calculation formula is:
[0102]
[0103] Where n is the number of time slices, m is the number of computing nodes in cluster C, and U mn is the computing node M m At time T n For example, the CPU utilization U of computing node M1 at time T2 is 12 =11%, computing the CPU utilization U of node M2 at time T3 23 =36%.
[0104] Change T1 to T n The peak CPU utilization of cluster C during the period is taken as the CPU utilization of cluster C, that is:
[0105] R cpu =Max(R1, R2, R3, ..., R n );
[0106] Among them, R cpu is the CPU utilization of cluster C, R1 is the utilization of cluster C at time T1, R2 is the utilization of cluster C at time T2, R3 is the utilization of cluster C at time T3, and R n T n Utilization of cluster C at a certain moment.
[0107] It should be noted that CPU utilization is the most important metric for a virtual machine. The above example describes the calculation formula for cluster CPU utilization to characterize the fluctuation of the CPU utilization of the cluster within a natural time range.
[0108] The following introduces how to obtain the maximum number of CPU cores available for sale of a computing node cluster, the CPU sales rate of the computing node cluster, and the maximum number of memories available for sale of the computing node cluster.
[0109] Specifically, for a computing node in a cluster, the CPU over-allocation ratio configuration value of the computing node is taken as Ralloc, the CPU sold quantity of the computing node is taken as Nsold, the total memory quantity of the computing node is taken as Mavail, the number of available physical cores Cavail = the number of logical CPU cores - the number of reserved CPU cores for operation, and the number of virtualized cores that can be sold Csal = the number of available physical cores Cavail × the CPU over-allocation ratio Ralloc. Based on the above definition, we can get:
[0110] 1. The calculation formula for the maximum number of CPU cores available for sale in a computing node cluster is:
[0111]
[0112] Among them, C max The maximum number of CPU cores available for sale in the computing node cluster. n Ralloc is the number of available physical cores corresponding to the computing node n. n is the CPU over-allocation ratio configuration value corresponding to computing node n, where n is the number of computing nodes in the computing node cluster and is a positive integer.
[0113] 2. The calculation formula for the CPU sales rate of the computing node cluster is:
[0114]
[0115] Among them, R sold Nsold is the CPU sales rate of the computing node cluster. n is the number of CPUs sold corresponding to computing node n, C max is the maximum number of CPU cores available for sale in the computing node cluster, n is the number of computing nodes in the computing node cluster, and n is a positive integer.
[0116] 3. The calculation formula for the maximum amount of memory that can be sold in a computing node cluster is:
[0117]
[0118] Among them, M maxThe maximum amount of memory available for sale in the computing node cluster. n is the total amount of memory corresponding to computing node n, where n is the number of computing nodes in the computing node cluster and n is a positive integer.
[0119] It should be noted that when the CPU over-allocation ratio configuration values of the computing nodes in the cluster are different, the CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time is the average value of the CPU over-allocation ratio configuration values of the computing nodes in the cluster.
[0120] In the above embodiment, a stream processing engine such as SQL syntax can be used to perform mathematical modeling calculations on the collected performance data to produce key indicator values.
[0121] In some optional embodiments, when the over-resolution ratio influencing factor is the number of virtual ports, obtaining the CPU over-resolution ratio value according to the key data indicator includes:
[0122] According to the first data in the key data indicator, obtaining the CPU over-resolution ratio value;
[0123] Wherein, the first data includes:
[0124] The number of computing nodes in the computing node cluster;
[0125] The number of virtual machines in the computing node cluster;
[0126] The CPU sales rate of the computing node cluster;
[0127] The number of virtual ports of the computing node cluster;
[0128] The CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time.
[0129] It should be pointed out that for a computing node, each virtual port used by a virtual machine needs to occupy the node's CPU, memory, network and other resources to forward and process network traffic. For each computing node, there is an upper limit on the number of virtual ports, denoted as N_vport. max When the number of ports exceeds the limit, the network performance of the virtual machine will be seriously affected. The above embodiment can obtain the corresponding CPU over-resolution ratio value when the over-resolution ratio influencing factor is the number of virtual ports. The CPU over-resolution ratio value can ensure that the network performance of the virtual machine will not be affected by the number of virtual ports.
[0130] In some optional embodiments, obtaining the CPU over-resolution ratio value according to the first data in the key data indicator includes:
[0131] According to the formula: Determine the CPU over-allocation ratio value;
[0132] Among them, AllocRation1 is the CPU over-allocation ratio value, R_sold is the CPU selling rate of the computing node cluster, Ralloc is the CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time, N_vport is the number of virtual ports of the computing node cluster, N_vm is the number of virtual machines of the computing node cluster, N_pm is the number of computing nodes of the computing node cluster, N_vport is the number of virtual machines of the computing node cluster, N_pm is the number of computing nodes of the computing node cluster, max The upper limit of the number of virtual ports for each computing node.
[0133] It needs to be explained that N_vm perpm N_vm is the average number of virtual machines on the computing node. perpm_max Calculate the number of node virtual machines when the cluster sales rate approaches the safety threshold.
[0134] Through the above embodiment, the CPU over-allocation ratio value when the number of virtual ports approaches the safety threshold can be calculated, ensuring that the network performance of the virtual machine will not be affected by the number of virtual ports.
[0135] In some optional embodiments, when the over-resolution ratio influencing factor is the CPU utilization, obtaining the CPU over-resolution ratio value according to the key data indicator includes:
[0136] According to the second data in the key data indicator, obtaining the CPU over-resolution ratio value;
[0137] Wherein, the second data includes:
[0138] The CPU utilization of the computing node cluster;
[0139] The CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time.
[0140] It should be noted that for a computing node, when the CPU utilization of the computing node rises to a certain threshold, the virtual machine may experience performance degradation, resource competition, unstable performance, and other fault phenomena. The above embodiment can derive a corresponding CPU over-resolution ratio value when the over-resolution ratio influencing factor is the CPU utilization, and the CPU over-resolution ratio value can ensure that the network performance of the virtual machine does not experience performance degradation, resource competition, unstable performance, and other fault phenomena due to the influence of CPU utilization.
[0141] In some optional embodiments, obtaining the CPU over-resolution ratio value according to the second data in the key data indicator includes:
[0142] According to the formula: Determine the CPU over-allocation ratio value;
[0143] Among them, AllocRation2 is the CPU over-allocation ratio value, R_cpu is the CPU utilization of the computing node cluster, Ralloc is the CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time, and R max Indicates the preset CPU usage threshold.
[0144] Through the above embodiments, the CPU over-allocation ratio value when the CPU utilization rate approaches the safety threshold can be calculated, thereby ensuring that the network performance of the virtual machine will not be affected by the CPU utilization rate.
[0145] In some optional embodiments, when the over-resolution ratio influencing factor is the CPU to memory ratio, obtaining the CPU over-resolution ratio value according to the key data indicator includes:
[0146] According to the third data in the key data indicator, obtaining the CPU over-resolution ratio value;
[0147] Wherein, the third data includes:
[0148] The maximum number of CPU cores available for sale in the computing node cluster;
[0149] The maximum sellable amount of memory of the computing node cluster;
[0150] The CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time.
[0151] It should be pointed out that for computing nodes, CPU-intensive programs, memory-intensive programs and ordinary programs have different requirements for resources. If the CPU and memory ratio is seriously unbalanced, it may cause resource waste or performance bottlenecks. In the above embodiment, the corresponding CPU over-resolution ratio value can be obtained when the over-resolution ratio influencing factor is the CPU and memory ratio. The CPU over-resolution ratio value can ensure that the network performance and resource utilization of the virtual machine will not be affected by the CPU and memory ratio.
[0152] In some optional embodiments, obtaining the CPU over-resolution ratio value according to the third data in the key data indicator includes:
[0153] According to the formula: Determine the CPU over-allocation ratio value;
[0154] Among them, AllocRation3 is the CPU over-allocation ratio value, Ralloc is the CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time, and R rateis the preset CPU and memory ratio threshold, M max is the maximum amount of memory available for sale in the computing node cluster, C max The maximum number of CPU cores available for sale in the computing node cluster.
[0155] Through the above embodiments, the CPU over-allocation ratio value when the CPU to memory ratio approaches the safety threshold can be calculated, ensuring that the network performance and resource utilization of the virtual machine will not be affected by the CPU to memory ratio.
[0156] In some optional embodiments, determining the CPU over-allocation ratio calculated value of the computing node cluster at the measurement time according to the n CPU over-allocation ratio values includes:
[0157] Determine, according to the n CPU over-allocation ratio values, a first CPU over-allocation ratio value corresponding to the computing node cluster at the measurement time;
[0158] The first CPU over-allocation ratio value and the CPU over-allocation ratio calculated value of the computing node cluster corresponding to the previous moment of the calculation moment are smoothed to obtain the CPU over-allocation ratio calculated value of the computing node cluster at the calculation moment.
[0159] In specific implementation, the minimum value of the n CPU over-allocation ratio values obtained at the measurement time t can be used to determine the first CPU over-allocation ratio value corresponding to the computing node cluster at the measurement time. That is, the first CPU over-allocation ratio value AllocRatio=Min{AllocRatio1, AllocRatio2, AllocRatio3, ..., AllocRation} calculated at the measurement time t, AllocRation is the CPU over-allocation ratio value obtained under the nth over-allocation ratio influencing factor. In this way, the first CPU over-allocation ratio value obtained is the optimal CPU over-allocation ratio value that can ensure the performance security of the virtual machine resources of the computing node cluster. Further, by continuously analyzing and calculating the key data indicators of the cluster at fixed time intervals, the time series data corresponding to the first CPU over-allocation ratio value can be obtained. It can be understood that since the key data indicators at different measurement times may be different, the first CPU over-allocation ratio value corresponding to each measurement time in the time series data may be different.
[0160] In the above embodiment, the first CPU over-resolution ratio value obtained according to the n CPU over-resolution ratio values obtained under n over-resolution ratio influencing factors can ensure the security of the virtual machine resource performance of the computing node cluster. Furthermore, by smoothing the first CPU over-resolution ratio value and the CPU over-resolution ratio measurement value corresponding to the computing node cluster at the previous moment of the measurement, the influence of random noise can be reduced, and at the same time, the potential change trend of the CPU over-resolution measurement value can be reflected, thereby improving the accuracy of the CPU over-resolution measurement value, ensuring that the computing node cluster can obtain a more appropriate CPU over-resolution ratio, and improving the resource utilization of the computing node cluster.
[0161] In some optional embodiments, the smoothing of the first CPU over-resolution ratio value and the CPU over-resolution ratio calculated value corresponding to the computing node cluster at the previous moment of the calculation moment to obtain the CPU over-resolution ratio calculated value of the computing node cluster at the calculation moment includes:
[0162] According to the formula S(t)=α×X(t)+(1-α)×S(t-1), determine the CPU over-resolution ratio measurement value of the computing node cluster at the measurement time;
[0163] Among them, S(t) is the calculated value of the CPU over-allocation ratio of the computing node cluster at the calculation time t, X(t) is the first CPU over-allocation ratio value of the computing node cluster at the calculation time t, S(t-1) is the calculated value of the CPU over-allocation ratio of the computing node cluster at the previous moment of the calculation time, t-1 is the previous moment of the calculation time, and α is the smoothing parameter.
[0164] Optionally, when S(t) tends to be stable, the possible value of the smoothing parameter α is 0.6 to 0.4.
[0165] It can be understood that since the formula S(t) = α × X(t) + (1-α) × S(t-1) can reflect the continuous iteration process of the CPU over-resolution ratio test value, the formula can be expanded to obtain: S(t) = α × X(t) + α(1-α) × X(t-1) + … + (1-α) t S(1). From this formula, we can see that the weight corresponding to the older measured data is smaller, and the weight corresponding to the more recent measured data is larger.
[0166] In the above embodiment, by applying the exponential smoothing method to smooth the first CPU over-resolution ratio value and the CPU over-resolution ratio measurement value corresponding to the computing node cluster at the previous moment of the measurement moment, on the one hand, the influence of random noise can be reduced, and at the same time, the potential change trend of the CPU over-resolution ratio measurement value can be reflected; on the other hand, because in the exponential smoothing method, the weight corresponding to the older measurement data is smaller, and the weight corresponding to the more recent measurement data is larger, it can more sensitively reflect the latest changes in the CPU over-resolution ratio measurement value. In this way, with the real-time collection of related performance indicators, it is possible to continuously iterate and update the CPU over-resolution ratio of the computing node cluster, improve the accuracy of the CPU over-resolution ratio measurement value, and the CPU over-resolution ratio measurement obtained by this embodiment is more adaptable, more accurate and more competitive in the cloud computing environment.
[0167] In the above scheme, it is possible to monitor the use of virtual machines by users in the computing node cluster and collect performance data, and then analyze the performance data to obtain key data indicators; further, based on the key data indicators, obtain n CPU over-resolution ratio values under different over-resolution influencing factors; according to the n CPU over-resolution ratio values, obtain the optimal CPU over-resolution ratio measurement value within a certain time range, and update and optimize the CPU over-resolution ratio measurement value in real time. Compared with the existing assumption that under ideal load conditions, the CPU over-resolution ratio value is determined according to the performance difference of a single computing node under different numbers of virtual machines under different loads. The scheme of the present application can obtain a suitable over-resolution ratio measurement value in advance based on the key data indicators of the computing node cluster, and can be applicable to cloud computing environments.
[0168] like Figure 3 As shown, a CPU over-resolution updating device 300 according to an embodiment of the present invention includes:
[0169] An acquisition module 301 is used to acquire key data indicators of a computing node cluster;
[0170] A first processing module 302 is used to obtain n CPU over-allocation ratio values according to the key data indicator, each of the CPU over-allocation ratio values is related to an over-allocation ratio influencing factor, and n is a positive integer;
[0171] The second processing module 303 is used to determine the CPU over-allocation ratio measurement value of the computing node cluster at the measurement time according to the n CPU over-allocation ratio values;
[0172] The third processing module 304 is used to update the over-resolution ratio configuration value corresponding to the computing node cluster at the measurement time to the CPU over-resolution ratio measurement value.
[0173] Optionally, the key data indicator includes at least one of the following:
[0174] The CPU utilization of the computing node cluster;
[0175] The number of computing nodes in the computing node cluster;
[0176] The number of virtual machines in the computing node cluster;
[0177] The number of virtual ports of the computing node cluster;
[0178] The maximum number of CPU cores available for sale in the computing node cluster;
[0179] The CPU sales rate of the computing node cluster;
[0180] The maximum sellable amount of memory of the computing node cluster;
[0181] The CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time.
[0182] Optionally, when the over-resolution ratio influencing factor is the number of virtual ports, the first processing module 302 is used to:
[0183] According to the first data in the key data indicator, obtaining the CPU over-resolution ratio value;
[0184] Wherein, the first data includes:
[0185] The number of computing nodes in the computing node cluster;
[0186] The number of virtual machines in the computing node cluster;
[0187] The CPU sales rate of the computing node cluster;
[0188] The number of virtual ports of the computing node cluster;
[0189] The CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time.
[0190] Optionally, the first processing module 302 is specifically configured to:
[0191] According to the formula: Determine the CPU over-allocation ratio value;
[0192] Among them, AllocRation1 is the CPU over-allocation ratio value, R_sold is the CPU selling rate of the computing node cluster, Ralloc is the CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time, N_vport is the number of virtual ports of the computing node cluster, N_vm is the number of virtual machines of the computing node cluster, N_pm is the number of computing nodes of the computing node cluster, N_vport is the number of virtual machines of the computing node cluster, N_pm is the number of computing nodes of the computing node cluster, max The upper limit of the number of virtual ports for each computing node.
[0193] Optionally, when the over-resolution ratio influencing factor is the CPU utilization, the first processing module 302 is used to:
[0194] According to the second data in the key data indicator, obtaining the CPU over-resolution ratio value;
[0195] Wherein, the second data includes:
[0196] The CPU utilization of the computing node cluster;
[0197] The CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time.
[0198] Optionally, the first processing module 302 is specifically configured to:
[0199] According to the formula: Determine the CPU over-allocation ratio value;
[0200] Among them, AllocRation2 is the CPU over-allocation ratio value, R_cpu is the CPU utilization of the computing node cluster, Ralloc is the CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time, and R max Indicates the preset CPU usage threshold.
[0201] Optionally, when the over-resolution influencing factor is the CPU-memory ratio, the first processing module 302 is used to:
[0202] According to the third data in the key data indicator, obtaining the CPU over-resolution ratio value;
[0203] Wherein, the third data includes:
[0204] The maximum number of CPU cores available for sale in the computing node cluster;
[0205] The maximum sellable amount of memory of the computing node cluster;
[0206] The CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time.
[0207] Optionally, the first processing module 302 is specifically configured to:
[0208] According to the formula: Determine the CPU over-allocation ratio value;
[0209] Among them, AllocRation3 is the CPU over-allocation ratio value, Ralloc is the CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time, and R rate is the preset CPU and memory ratio threshold, M max is the maximum amount of memory available for sale in the computing node cluster, C max The maximum number of CPU cores available for sale in the computing node cluster.
[0210] Optionally, the second processing module 303 includes:
[0211] A first processing submodule is used to determine a first CPU over-allocation ratio value corresponding to the computing node cluster at the measurement time according to the n CPU over-allocation ratio values;
[0212] The second processing submodule is used to smooth the first CPU over-allocation ratio value and the CPU over-allocation ratio calculated value corresponding to the computing node cluster at the previous moment of the calculation moment, so as to obtain the CPU over-allocation ratio calculated value of the computing node cluster at the calculation moment.
[0213] Optionally, the second processing submodule is specifically used for:
[0214] According to the formula S(t)=α×X(t)+(1-α)×S(t-1), determine the CPU over-resolution ratio measurement value of the computing node cluster at the measurement time;
[0215] Among them, S(t) is the calculated value of the CPU over-allocation ratio of the computing node cluster at the calculation time t, X(t) is the first CPU over-allocation ratio value of the computing node cluster at the calculation time t, S(t-1) is the calculated value of the CPU over-allocation ratio of the computing node cluster at the previous moment of the calculation time, t-1 is the previous moment of the calculation time, and α is the smoothing parameter.
[0216] The CPU over-resolution updating device 300 provided in the embodiment of the present application can implement each process implemented in the above method embodiment, and will not be described again here to avoid repetition.
[0217] The embodiment of the present invention further provides an electronic device, such as Figure 4 As shown, it includes a transceiver 410, a processor 400, a memory 420, and a program or instruction stored in the memory 420 and executable on the processor 400; when the processor 400 executes the program or instruction, the above-mentioned update method applied to the CPU over-resolution ratio is implemented.
[0218] The transceiver 410 is used to receive and send data under the control of the processor 400 .
[0219] Among them, Figure 4 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 400 and various circuits of memory represented by memory 420 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 410 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. For different user devices, the user interface 430 may also be an interface capable of externally and internally connecting required devices, and the connected devices include but are not limited to a keypad, a display, a speaker, a microphone, a joystick, and the like.
[0220] The processor 400 is responsible for managing the bus architecture and general processing, and the memory 420 can store data used by the processor 400 when performing operations.
[0221] A computer-readable storage medium according to an embodiment of the present invention stores a program or instruction thereon, and when the program or instruction is executed by a processor, the steps in the method for updating the CPU over-resolution ratio described above are implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0222] The embodiment of the present application also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, the various processes of the above-mentioned method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0223] It should be further explained that the terminals described in this specification include but are not limited to smart phones, tablet computers, etc., and many of the functional components described are called modules in order to more particularly emphasize the independence of their implementation methods.
[0224] In the embodiment of the present invention, module can be implemented with software so that it can be executed by various types of processors. For example, an executable code module of an identification can include one or more physical or logical blocks of computer instructions, for example, it can be constructed as an object, process or function. Nevertheless, the executable code of the identified module does not need to be physically located together, but can include different instructions stored in different positions, and when these instructions are logically combined together, it constitutes a module and realizes the specified purpose of the module.
[0225] In fact, executable code module can be a single instruction or many instructions, and can even be distributed on a plurality of different code segments, distributed among different programs, and distributed across a plurality of memory devices. Similarly, operating data can be identified in the module, and can be implemented and organized in the data structure of any appropriate type according to any appropriate form. The operating data can be collected as a single data set, or can be distributed in different locations (including on different storage devices), and can only be present on a system or network as an electronic signal at least in part.
[0226] When a module can be implemented by software, considering the level of existing hardware technology, a person skilled in the art can build a corresponding hardware circuit to implement the corresponding function of the module that can be implemented by software without considering the cost. The hardware circuit includes a conventional very large scale integration (VLSI) circuit or gate array and existing semiconductors such as logic chips, transistors, or other discrete components. The module can also be implemented by a programmable hardware device, such as a field programmable gate array, a programmable array logic, a programmable logic device, etc.
[0227] The above exemplary embodiments are described with reference to the accompanying drawings, and many different forms and embodiments are feasible without departing from the spirit and teachings of the present invention. Therefore, the present invention should not be constructed as a limitation of the exemplary embodiments proposed herein. More specifically, these exemplary embodiments are provided so that the present invention will be perfect and complete, and the scope of the present invention will be conveyed to those who are familiar with the technology. In these figures, the component sizes and relative sizes may be exaggerated for clarity. The terms used here are only based on the purpose of describing specific exemplary embodiments and are not intended to be limiting. As used herein, unless the text clearly indicates otherwise, the singular forms "one", "an" and "the" are intended to include these multiple forms. It will be further understood that the terms "including" and / or "comprising" when used in this specification indicate the presence of the features, integers, steps, operations, components and / or components, but do not exclude the presence or increase of one or more other features, integers, steps, operations, components, components and / or their groups. Unless otherwise indicated, when stated, a range of values includes the upper and lower limits of that range and any subranges therebetween.
[0228] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for updating a CPU over-resolution ratio, characterized in that: include: Obtain key data indicators of computing node clusters; According to the key data indicator, n CPU over-allocation ratio values are obtained, each of which is related to an over-allocation ratio influencing factor, and n is a positive integer; Determine a CPU over-allocation ratio measurement value of the computing node cluster at the measurement time according to the n CPU over-allocation ratio values; The over-resolution configuration value corresponding to the computing node cluster at the measurement time is updated to the CPU over-resolution measurement value.
2. The CPU over-resolution updating method according to claim 1, characterized in that: The key data indicators include at least one of the following: The CPU utilization of the computing node cluster; The number of computing nodes in the computing node cluster; The number of virtual machines in the computing node cluster; The number of virtual ports of the computing node cluster; The maximum number of CPU cores available for sale in the computing node cluster; The CPU sales rate of the computing node cluster; The maximum sellable amount of memory of the computing node cluster; The CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time.
3. The CPU over-resolution updating method according to claim 2, characterized in that: In the case where the over-resolution ratio influencing factor is the number of virtual ports, obtaining the CPU over-resolution ratio value according to the key data indicator includes: According to the first data in the key data indicator, obtaining the CPU over-resolution ratio value; Wherein, the first data includes: The number of computing nodes in the computing node cluster; The number of virtual machines in the computing node cluster; The CPU sales rate of the computing node cluster; The number of virtual ports of the computing node cluster; The CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time.
4. The CPU over-resolution updating method according to claim 3, characterized in that: The obtaining the CPU over-resolution ratio value according to the first data in the key data indicator includes: According to the formula: Determine the CPU over-allocation ratio value; Among them, AllocRation1 is the CPU over-allocation ratio value, R_sold is the CPU selling rate of the computing node cluster, Ralloc is the CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time, N_vport is the number of virtual ports of the computing node cluster, N_vm is the number of virtual machines of the computing node cluster, N_pm is the number of computing nodes of the computing node cluster, N_vport is the number of virtual machines of the computing node cluster, N_pm is the number of computing nodes of the computing node cluster, max The upper limit of the number of virtual ports for each computing node.
5. The CPU over-resolution updating method according to claim 2, characterized in that: In the case where the over-resolution ratio influencing factor is the CPU utilization, obtaining the CPU over-resolution ratio value according to the key data indicator includes: According to the second data in the key data indicator, obtaining the CPU over-resolution ratio value; Wherein, the second data includes: The CPU utilization of the computing node cluster; The CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time.
6. The CPU over-resolution updating method according to claim 5, characterized in that: The obtaining the CPU over-resolution ratio value according to the second data in the key data indicator includes: According to the formula: Determine the CPU over-allocation ratio value; Among them, AllocRation2 is the CPU over-allocation ratio value, R_cpu is the CPU utilization of the computing node cluster, Ralloc is the CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time, and R max Indicates the preset CPU usage threshold.
7. The CPU over-resolution updating method according to claim 2, characterized in that: In the case where the over-resolution ratio influencing factor is the CPU to memory ratio, obtaining the CPU over-resolution ratio value according to the key data indicator includes: According to the third data in the key data indicator, obtaining the CPU over-resolution ratio value; Wherein, the third data includes: The maximum number of CPU cores available for sale in the computing node cluster; The maximum sellable amount of memory of the computing node cluster; The CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time.
8. The CPU over-resolution updating method according to claim 7, characterized in that: The obtaining the CPU over-resolution ratio value according to the third data in the key data indicator includes: According to the formula: Determine the CPU over-allocation ratio value; Among them, AllocRation3 is the CPU over-allocation ratio value, Ralloc is the CPU over-allocation ratio configuration value corresponding to the computing node cluster at the measurement time, and R rate is the preset CPU and memory ratio threshold, M max is the maximum amount of memory available for sale in the computing node cluster, C max The maximum number of CPU cores available for sale in the computing node cluster.
9. The CPU over-resolution updating method according to claim 1, characterized in that: The determining, according to the n CPU over-allocation ratio values, a CPU over-allocation ratio measurement value of the computing node cluster at the measurement time includes: Determine, according to the n CPU over-allocation ratio values, a first CPU over-allocation ratio value corresponding to the computing node cluster at the measurement time; The first CPU over-allocation ratio value and the CPU over-allocation ratio calculated value of the computing node cluster corresponding to the previous moment of the calculation moment are smoothed to obtain the CPU over-allocation ratio calculated value of the computing node cluster at the calculation moment.
10. The CPU over-resolution updating method according to claim 9, characterized in that: The step of smoothing the first CPU over-resolution ratio value and the CPU over-resolution ratio calculated value corresponding to the computing node cluster at the previous moment of the calculation moment to obtain the CPU over-resolution ratio calculated value of the computing node cluster at the calculation moment includes: According to the formula S(t)=α×X(t)+(1-α)×S(t-1), determine the CPU over-resolution ratio measurement value of the computing node cluster at the measurement time; Among them, S(t) is the calculated value of the CPU over-allocation ratio of the computing node cluster at the calculation time t, X(t) is the first CPU over-allocation ratio value of the computing node cluster at the calculation time t, S(t-1) is the calculated value of the CPU over-allocation ratio of the computing node cluster at the previous moment of the calculation time, t-1 is the previous moment of the calculation time, and α is the smoothing parameter.
11. A CPU over-resolution updating device, characterized in that: include: The acquisition module is used to obtain key data indicators of the computing node cluster; A first processing module is used to obtain n CPU over-allocation ratio values according to the key data indicator, each of the CPU over-allocation ratio values is related to an over-allocation ratio influencing factor, and n is a positive integer; A second processing module is used to determine a CPU over-allocation ratio measurement value of the computing node cluster at a measurement time according to the n CPU over-allocation ratio values; The third processing module is used to update the over-resolution configuration value corresponding to the computing node cluster at the measurement time to the CPU over-resolution measurement value.
12. An electronic device comprising: A transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; characterized in that when the processor executes the program or instruction, the method for updating the CPU over-resolution ratio as described in any one of claims 1-10 is implemented.
13. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by the processor, the steps in the method for updating the CPU over-resolution ratio as described in any one of claims 1-10 are implemented.
14. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by the processor, the steps of the method for updating the CPU over-resolution ratio as described in any one of claims 1-10 are implemented.
