Resource specification adjustment method, device and storage medium
Through successive approximation of target resource specifications and service quality sensing technology, virtual instance resource specifications in the computing cluster are dynamically adjusted, solving the problems of resource waste and stability risks, achieving high efficiency in resource specification adjustment and ensuring service quality.
Patent Information
- Application Number
- CN202310356850.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2043-03-30
AI Technical Summary
In a computing cluster, if the resource specifications declared by the user are too high, resources will be wasted, while if the resource specifications declared are too low, it will affect the stability and service quality of the application, leading to potential stability risks.
The resource specifications of virtual instances are dynamically adjusted by successively approaching the target resource specifications, and service quality sensing technology is introduced to adjust resource specifications based on the service quality of virtual instances to ensure service quality while reducing resource waste.
By gradually adjusting the resource specifications of virtual instances, service quality jitter is reduced, resource waste is avoided, the service quality of virtual instances is guaranteed during the adjustment process, and the stability of the computing cluster is improved.
Smart Images

Figure CN116431341B
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a resource specification adjustment method, device and storage medium. Background Art
[0002] To improve the resource utilization of servers and reduce the cost of use, a computing cluster combines multiple virtual machines or physical machines into an organic whole for unified management. Through virtualization technology, physical resources are abstracted into a resource pool consisting of storage, computing, network and other resources, and provided to users through on-demand resource application.
[0003] In actual applications, the container resource management system provides a resource semantic description of "resource request". When the container specifies a resource request, the scheduler matches it with the node's "resource capacity" to determine which node it should be allocated to.
[0004] Generally, users can declare resource specifications based on the actual needs of the container, which effectively improves the management efficiency of cluster resources. However, if the declared resource specifications are too high, a large amount of resources will be wasted, while if the declared resource specifications are too low, it will bring potential stability risks to the application. Therefore, it is necessary to dynamically adjust the resource specifications of the containers in the computing cluster. Summary of the invention
[0005] Multiple aspects of the present application provide a resource specification adjustment method, device and storage medium for dynamically adjusting the resource specifications of virtual instances in a computing cluster based on the service quality of the virtual instances, which helps to ensure the service quality of the virtual instances.
[0006] The present application provides a resource specification adjustment method, including:
[0007] Get the target resource specifications of the virtual instances in the computing cluster;
[0008] By gradually approaching the target resource specification, the resource specification of the virtual instance is gradually adjusted;
[0009] In the process of gradually adjusting the resource specifications of the virtual instance, obtaining the service quality of the virtual instance;
[0010] When the service quality of the virtual instance meets the set requirement or the resource specification of the virtual instance is adjusted to the target resource specification, the operation of gradually adjusting the resource specification of the virtual instance is exited.
[0011] The embodiment of the present application further provides a computing device, comprising: a memory and a processor; wherein the memory is used to store a computer program;
[0012] The processor is coupled to the memory and is configured to execute the computer program to perform the steps in the resource specification adjustment method.
[0013] An embodiment of the present application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the above-mentioned resource specification adjustment method.
[0014] The embodiment of the present application proposes a scheme for dynamically adjusting the resource specifications of virtual instances in a computing cluster. On the one hand, the resource specifications of virtual instances in a computing cluster are gradually adjusted by approaching the target resource specifications one by one. Compared with adjusting the resource specifications of virtual instances to the target resource specifications at one time, the jitter of the quality of service (QoS) of virtual instances during the adjustment process can be reduced. On the other hand, in the process of gradually adjusting the resource specifications of virtual instances, QoS perception technology for virtual instances is introduced. Based on the QoS of virtual instances, the resource specifications of virtual instances are adjusted. While adjusting the resource specifications of virtual instances, the QoS of virtual instances after the resource specifications are adjusted can be guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0016] Figure 1 Schematic diagram of the process of container resource management for cluster management systems provided by traditional solutions;
[0017] Figure 2 A schematic diagram of the structure of a computing system provided in an embodiment of the present application;
[0018] Figure 3 A schematic diagram of the principle of a sample compression algorithm based on a statistical histogram provided in an embodiment of the present application;
[0019] Figure 4 A schematic diagram of a target resource specification determination process and a resource specification adjustment process provided in an embodiment of the present application;
[0020] Figure 5 A schematic diagram of the half-life time window provided in the embodiments of the present application;
[0021] Figure 6 A schematic diagram of a resource specification adjustment process provided in an embodiment of the present application;
[0022] Figure 7A schematic diagram of a process for adjusting resource specifications provided in an embodiment of the present application;
[0023] Figure 8 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0025] Figure 1 A schematic diagram of the process of container resource management for the cluster management system provided by the traditional solution. Figure 1 As shown, the user can submit a workload request, which includes the resource description information of the workload, including but not limited to: resource request (Request) and the number of instances to be deployed. The scheduler in the cluster management system can match the resource description information with the resource capacity (Capacity) of the computing node, determine the target computing node in the computing cluster whose resource capacity can meet the resource request; and deploy the corresponding instance on the target computing node to provide services to the user.
[0026] In this process, if the resource request declared by the user is too high, a large amount of resources will be wasted. If the resource request declared is too low, it will bring potential stability risks to the application. If the application has burst traffic, the resource specification of the instance is too low, which will affect the service quality and the stability of the computing cluster.
[0027] In an embodiment of the present application, in order to solve the above technical problems, a scheme for dynamically adjusting the resource specifications of virtual instances in a computing cluster is proposed in an embodiment of the present application. On the one hand, the resource specifications of virtual instances in a computing cluster are gradually adjusted by gradually approaching the target resource specifications. Compared with adjusting the resource specifications of virtual instances to the target resource specifications at one time, the jitter of the quality of service (QoS) of virtual instances during the adjustment process can be reduced. On the other hand, in the process of gradually adjusting the resource specifications of virtual instances, a QoS perception technology for virtual instances is introduced. Based on the QoS of virtual instances, the resource specifications of virtual instances are adjusted. While adjusting the resource specifications of virtual instances, the QoS of virtual instances after the resource specifications are adjusted can be guaranteed.
[0028] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0029] It should be noted that the same reference numerals denote the same objects in the following drawings and embodiments, and therefore, once an object is defined in one drawing or embodiment, it does not need to be further discussed in the subsequent drawings and embodiments.
[0030] Figure 2 A schematic diagram of the structure of a computing system provided in an embodiment of the present application. Figure 2 As shown, the computing system includes: a management and control node 10 and a computing cluster 20. The computing cluster 20 includes: a plurality of computing nodes (Workers) 201. A plurality refers to two or more.
[0031] The control node 10 refers to a computer device that can manage computing nodes, respond to service requests from the user end 30, and provide computing services to users by scheduling computing nodes 201. It generally has the ability to undertake and guarantee services. The control node 10 can be a single server device, or a cloud-based server array, or a virtual machine (VM), container, etc. running in a cloud-based server array. In addition, the server-side device can also refer to other computing devices with corresponding service capabilities, such as computers and other terminal devices (running service programs), etc. In this embodiment, the control node 10 can be deployed in the cloud, such as in the central cloud of the edge cloud system.
[0032] The computing node 201 refers to a computer device that provides computing resources. For the specific implementation form of the computing node 201, please refer to the implementation form of the control node 10, which will not be repeated here. In this embodiment, in addition to providing computing resources, the computing node 201 can also provide other hardware resources and software resources. Among them, hardware resources may include: computing resources such as processors, storage resources such as memory and disks, and input / output (IO) resources, etc. Among them, the processor can be a central processing unit (CPU), a graphics processing unit (GPU) and / or a field programmable gate array (FPGA), etc. The computing node 201 can be deployed in the central cloud, or it can be implemented as an edge node in an edge cloud network, etc.
[0033] The connection between the management and control node 10 and the computing node 201 may be wireless or wired. Optionally, the service computing node 201 can be connected to the computing node 201 through a mobile network. Accordingly, the network standard of the mobile network can be 2G (such as Global System for Mobile Communications (GSM)), 2.5G (such as General Packet Radio Service (GPRS)), 3G (such as Wideband Code Division Multiple Access (WCDMA), Time Division-Synchronous Code Division Multiple Access (TD-SCDMA), Code Division Multiple Access 2000 (CDMA2000), Universal Mobile Telecommunications System (UTMS)), 4G (such as Long Term Evolution (LTE), 4G+ (such as upgraded version of Long Term Evolution (LTE-Advanced, LTE-A)), 5G, World Interoperability for Microwave Access (WiMax), etc. Optionally, the computing node 201 may also be connected to the control node 10 through Bluetooth, WiFi, infrared, etc.
[0034] In this embodiment, when requesting a workload, the user terminal 30 may initiate a virtual instance scheduling request for the workload. In this embodiment, a virtual instance refers to a computing entity that can provide computing resources, which may be a virtual machine (VM), a container group (such as a Pod), or a container. A container group includes one or more containers, and multiple refers to 2 or more. Multiple containers share a namespace.
[0035] Accordingly, the virtual instance scheduling request may include: a declaration of the workload. The declaration of the workload includes: the number of copies of the instance to be deployed (such as the number of Pod copies) and the resource specifications of the instance to be deployed (i.e., the resource request amount), etc. In some embodiments, the workload declaration may also include: scheduling affinity rules, tolerance rules, labels (Labels), and scheduling priorities, etc. Among them, the resource specifications of the virtual instance are used to indicate the resource request amount of the virtual instance, and can be measured using at least one of the following hardware resources: the number of physical cores of the processor and the size of the memory, etc. In the following embodiments, the resource specifications including physical cores and memory are used as examples for explanation. For example, the resource specification of the virtual instance is 2 cores and 1G memory, that is, the virtual instance occupies the hardware resources of 2 processors and 1G of memory.
[0036] In this embodiment, the management and control node 10 can obtain the user's workload declaration, perform resource scheduling on the computing node 201, select a target computing node that meets the workload declaration requirements, and use the resources that meet the workload declaration to deploy a virtual instance on the target computing node to provide relevant services to the user using the virtual instance.
[0037] If the resource specifications declared by the user are too high, a large amount of resources will be wasted, while if the resource specifications declared are too low, it will bring potential stability risks to the application. Therefore, under the premise of ensuring the QoS of the virtual instance, reducing the resource specifications of the virtual instance as much as possible, that is, providing services with as few resources as possible under the premise of ensuring the QoS of the virtual instance, is a technical problem that needs to be continuously studied in this field. This requires reasonable adjustment of the resource specifications of the virtual instances in the computing cluster. Among them, QoS is used to describe the quality of the physical resources used by the workload. The higher the QoS level, the higher the quality of the physical resources used.
[0038] The above adjustment of resource specifications can be called vertical Pod Autoscaler (VPA), that is, the purpose of optimizing resource allocation is achieved by adjusting the resource specifications of the container group (Pod). This requires accurately and reasonably determining the target resource specifications of the virtual instance of the computing node. The target resource specifications refer to the resource specifications to which the virtual instance is to be adjusted.
[0039] In order to determine reasonable target resource specifications, the resource profile of the virtual instance is introduced. By analyzing the historical resource usage data of the virtual instance, the resource profile of the virtual instance is realized. Resource profile refers to the characteristics of determining the resource consumption of the virtual instance, including both cluster physical resources such as CPU and memory, as well as relatively abstract types such as network bandwidth and disk IO. The resource profile of the virtual instance can provide a basis for determining the target resource specifications of the virtual instance, so that the setting of the target resource specifications of the virtual instance can be targeted.
[0040] Specifically, the management and control node 10 may obtain resource usage data of virtual instances in the computing cluster 20 in a historical time period. The historical time period may be a set time period closest to the current time, such as the last week or weeks, the last month or months, etc. Of course, the historical time period may also be historical resource usage data from the startup of the virtual instance of the computing node to the current time.
[0041] Resource profiling relies on the historical resource usage data of virtual instances. The sampling granularity of these data is often at the minute level or even the second level. Resource profiling requires a large amount of historical data accumulation. If all data is saved for regular iterative analysis by the profiling algorithm, the storage and computing overhead will be very high. Based on this, in this embodiment, the resource usage data of virtual instances in the collected computing cluster can be compressed and stored.
[0042] In the embodiments of the present application, the specific compression algorithm for compressing and storing resource usage data is not limited. In some embodiments, a sample compression algorithm based on a statistical histogram can be used to compress the collected resource usage data of the virtual instance to obtain compressed resource usage data; and the compressed resource usage data is stored, which can reduce the storage space occupied by the resource usage data and help save storage resources.
[0043] Specifically, multiple sampling points can be set based on the resource usage of each dimension, and the resource interval between two adjacent sampling points can be the set resource interval. For example, the sampling points increase by 5%, that is, the resource interval between two adjacent sampling points is 5%. Furthermore, the number of times each sampling point appears in the resource usage data of the collected virtual instance can be counted, and the sampling points and the corresponding number of times can be stored, so as to implement a sample compression algorithm based on a statistical histogram and compress the resource usage data of the collected virtual instance.
[0044] For example, Figure 3 As shown in the figure, the horizontal axis of the histogram represents the amount of resources, the vertical axis is defined as the number of counts of sampling points, and the statistical interval increases by 5%. The resource usage data of thousands of virtual instances (such as container groups) of the same workload can be compressed into a histogram to complete spatial dimension data compression, reduce the amount of stored data, and help save storage resources.
[0045] Based on the above-mentioned compressed and stored resource usage data, the management and control node 10 can obtain the compressed and stored resource usage data corresponding to the virtual instances in the computing cluster in the historical time period when profiling resources; and decompress the compressed and stored resource usage data corresponding to the virtual instances in the historical time period to obtain the resource usage data of the virtual instances in the computing cluster in the historical time period.
[0046] Further, combined with Figure 2 Steps 1 and 2 and Figure 4 In steps 1-4, the management and control node 10 may perform resource profiling on the virtual instance according to the resource usage data of the virtual instance in the computing cluster in the historical time period to obtain the resource profile of the virtual instance.
[0047] Specifically, Figure 4 As shown, the QoS management component 101 in the control node 10 can obtain the QoS operation index of the virtual instance (corresponding to Figure 4 Step 2). QoS operation indicators refer to indicators that can measure the quality of QoS, which may include: CPU throttling, L3 cache misses, memory latency, and the number of clock cycles required for each instruction to execute (Cycle Per Instruction, CPI).
[0048] Furthermore, the QoS management component 101 may perform anomaly detection on the QoS operation indicators of the virtual instance according to the historical distribution of the QoS operation indicators.
[0049] Optionally, it is possible to determine whether the distribution of the operating indicators of the QoS of the virtual instance is consistent with the historical distribution according to the historical distribution; if it is consistent, it is determined that the operating indicators of the QoS of the virtual instance are normal. If it is not consistent, it is determined that the operating indicators of the QoS of the virtual instance are abnormal. Further, if the operating indicators of the QoS of the virtual instance are abnormal, it is determined that the QoS of the virtual instance is abnormal. If the operating indicators of the QoS of the virtual instance are normal, it is determined that the QoS of the virtual instance is normal.
[0050] Furthermore, the resource usage data with normal QoS can be selected from the resource usage data of the virtual instances in the computing cluster in the historical time period, and used as the resource usage data for profiling, that is, the resource usage data of the virtual instances in the computing cluster in the historical time period (corresponding to Figure 4 Step 3).
[0051] In the embodiments of the present application, the specific implementation method of performing resource profiling on the virtual instance is not limited. In some embodiments, the resource profiling of the virtual instance can be performed according to a sampling peak algorithm, a weighted average algorithm, or a quantile value algorithm.
[0052] In the time dimension, considering the resource usage of the application workload, which usually has periodic characteristics, resource profiling requires the historical resource usage data of the application's virtual instance, but the reference value of historical data when profiling the virtual instance's resources is different. Among them, the resource usage data closer to the current time can better reflect the resource usage characteristics of the virtual instance. Based on this, the confidence of the resource usage data is determined according to the time information of the resource usage data in the historical time period; among them, the confidence corresponding to the resource usage data with earlier time information is smaller.
[0053] In some embodiments, a confidence decay strategy may be preset, in which the confidence of resource usage data within the same portrait period T1 is the same, and the confidence of resource usage data in the earlier portrait period is smaller. The above-mentioned historical time period may include: multiple portrait periods, and multiple refers to 2 or more. Based on this, the resource usage data corresponding to each of the multiple portrait periods can be determined according to the time information of the resource usage data of the virtual instances in the computing cluster in the historical time period; for any portrait period T1, the confidence of the resource usage data of the portrait period T1 can be determined according to the time information of the resource usage data of the portrait period T1 and the preset confidence decay strategy.
[0054] In some embodiments, the confidence decay strategy may be a half-life sliding window algorithm. The half-life sliding window algorithm may be expressed as:
[0055]
[0056] In formula (1), τ is the time information of resource usage data, t 1 / 2 is the half-life, which means that every time t 1 / 2 Time interval, the previous t 1 / 2 The confidence of resource usage data within the time window is reduced by half. Figure 5 In the example, the horizontal axis represents time and the vertical axis represents resource usage data. Then the previous t 1 / 2 The confidence of resource usage data within the time window is higher than that of the next t 1 / 2 The confidence level of resource usage data within the time window is reduced by half.
[0057] After determining the confidence of the resource usage data of the virtual instances in the computing cluster in the historical time period, the resource profile of the virtual instances in the computing cluster can be performed according to the confidence of the resource usage data of the virtual instances in the computing cluster in the historical time period and the resource usage data of the virtual instances in the computing cluster in the historical time period to obtain the resource profile of the virtual instances (corresponding to Figure 4 Step 4: Use the half-life sliding window algorithm to perform resource profiling).
[0058] Optionally, a portrait cycle T1 may include: multiple statistical cycles T2. Accordingly, the resource usage peaks and / or resource usage means corresponding to the multiple statistical cycles may be determined based on the resource usage data of the multiple statistical cycles, and then the resource usage peak sequence and / or resource usage peak sequence corresponding to the portrait cycle T1 may be obtained; further, the resource portrait of the virtual instance may be performed based on the confidence of the resource usage data of the multiple portrait cycles and the resource usage peak sequence and / or resource usage mean sequence corresponding to the multiple portrait cycles, so as to obtain the resource portrait of the virtual instance.
[0059] For example, in some embodiments, resource profiling of a virtual instance may be performed based on the confidence of resource usage data of multiple profiling periods and the resource usage peak sequences corresponding to each of the multiple profiling periods. Specifically, the resource profile of the virtual instance in each profiling period may be obtained by multiplying the confidence of resource usage data of each profiling period by the resource usage peak sequence corresponding to the profiling period; and the resource profile of the virtual instance in each profiling period is used as the resource profile of the virtual instance.
[0060] In other embodiments, resource profiling of a virtual instance may be performed based on the confidence of resource usage data of multiple profiling periods and the resource usage mean value sequences corresponding to each of the multiple profiling periods. Specifically, the resource profile of the virtual instance in each profiling period may be obtained by multiplying the confidence of resource usage data of each profiling period by the resource usage mean value sequence corresponding to the profiling period; and the resource profile of the virtual instance in each profiling period may be used as the resource profile of the virtual instance.
[0061] In some other embodiments, resource portraits of virtual instances can be performed based on the confidence of resource usage data of multiple portrait cycles and the resource usage peak sequences and resource usage mean sequences corresponding to the multiple portrait cycles. Specifically, the confidence of the resource usage data of each portrait cycle can be multiplied by the resource usage peak sequence corresponding to the portrait cycle, and the confidence of the resource usage data of the portrait cycle can be multiplied by the resource usage mean sequence corresponding to the portrait cycle to obtain the resource portrait of the virtual instance in the portrait cycle, and the resource portrait includes: a weighted resource usage peak sequence and a weighted resource usage mean sequence. Furthermore, the resource portrait of the virtual instance in each portrait cycle can be used as the resource portrait of the virtual instance.
[0062] After obtaining the resource profile of the virtual instance, the target resource specifications of the virtual instance (corresponding to Figure 4 "Specification recommendation"). For example, the resource usage peak value can be taken from the resource profiles of the virtual instance in multiple profile cycles as the target resource specification of the virtual instance.
[0063] The process of the method for determining the target resource specification shown in the above embodiment is only an exemplary description, but does not constitute a limitation. In this embodiment, the resource profile of the virtual instance is performed through the historical resource usage data of the virtual instance; and the target resource specification is determined based on the resource profile of the virtual instance, so that the target resource specification is determined based on the actual historical resource usage of the virtual instance, so that the target resource specification has a basis to rely on, which can improve the accuracy and rationality of the determined target resource specification.
[0064] After determining the target resource specifications, the management and control node 10 can host the target resource specifications to a Platform as a Service (PaaS) platform (corresponding to Figure 4 Step 5). Accordingly, when adjusting the resource specifications of the virtual instances in the computing cluster, the management and control node 10 may obtain the target resource specifications of the virtual instances from the PaaS platform (corresponding to Figure 4 Step 6 and Figure 6 Step 1). Of course, when adjusting the resource specifications of the virtual instances in the computing cluster, the management and control node 10 may also use the target resource specification determination method provided in the above embodiment to perform real-time calculation to obtain the target resource specifications.
[0065] Furthermore, the management and control node 10 may adjust the resource specifications of the virtual instances in the computing cluster based on the target resource specifications, that is, perform automatic scaling (VPA) of the resource specifications of the computing cluster based on the target resource specifications.
[0066] In order to reduce the QoS jitter of the virtual instance during the resource specification adjustment process, the control node 10 can gradually adjust the resource specifications of the virtual instances in the computing cluster by gradually approaching the target resource specifications. This resource specification adjustment method can also be called progressive adjustment of resource specifications (corresponding to Figure 2 Step 4 Figure 4 Step 7 and Figure 6 Steps 2-5). In this way, it is possible to prevent the resource specifications of the virtual instances in the computing cluster from being adjusted to the target resource specifications at one time, which may cause a large-scale jitter in QoS.
[0067] To further reduce the large-scale jitter of the QoS of virtual instances caused by resource specification adjustments, when adjusting the resource specifications of virtual instances in the computing cluster, you can also control the grayscale ratio of virtual instances in the computing cluster and adjust the resource specifications of virtual instances in the computing cluster in batches, that is, adjust the resource specifications of virtual instances in a set ratio in each batch.
[0068] Specifically, the management and control node 10 can determine the proportion of virtual instances to be adjusted, and determine the target virtual instances to be adjusted according to the proportion of virtual instances to be adjusted; and gradually adjust the resource specifications of the target virtual instances by approaching the target resource specifications one by one. The proportion of virtual instances to be adjusted refers to the proportion of virtual instances to be adjusted to the total virtual instances in the computing cluster, and the proportion is greater than 0 and less than 1. For example, the proportion of virtual instances to be adjusted can be 10%, that is, the target virtual instances are 10% of the total virtual instances in the computing cluster.
[0069] In an embodiment of the present application, the resource specifications of the target virtual instance can be adjusted locally on the source computing node where the target virtual instance is located, so as to avoid the impact of virtual instance migration on the application. Specifically, the management and control node 10 can determine the source computing node where the target virtual instance is located; and determine whether to support the resource specifications of the target virtual instance in the source computing node based on the target resource specifications, the resource capacity of the source computing node and the resource usage of the source computing node. For example, the remaining resources of the source computing node can be calculated based on the resource capacity and resource usage of the source computing node; if the remaining resources of the source computing node are less than (target resource specifications-original resource specifications of the virtual instance), it is determined that the resource specifications of the target virtual instance in the source computing node are not supported. The target computing node to which the target virtual instance is to be migrated can be determined from the computing cluster based on the target resource specifications.
[0070] Optionally, the management and control node 10 may select a computing node whose remaining resources are greater than or equal to the target resource specification from the computing cluster as the target computing node.
[0071] Furthermore, the management and control node 10 may migrate the target virtual instance to the target computing node; thereafter, by gradually approaching the target resource specification, the resource specification of the target virtual instance is gradually adjusted on the target computing node.
[0072] Accordingly, if the remaining resources of the source computing node are greater than or equal to (target resource specifications - original resource specifications of the virtual instance), it is determined that the resource specifications of the target virtual instance can be adjusted within the source computing node. The resource specifications of the target virtual instance can be gradually adjusted on the source computing node by successively approaching the target resource specifications.
[0073] Specifically, Figure 6 As shown, the VPA controller in the management node 10 can generate an adjustment plan (corresponding to Figure 6Step 2 "Adjustment Plan"). Among them, in this embodiment, the adjustment plan is a progressive adjustment plan, which may include: the gradient of each adjustment and the grayscale ratio of the virtual instance to be adjusted, etc. Further, the VPA controller may send the adjustment plan to the scheduler in the management and control node 10 through the API service component. Based on the adjustment plan, the scheduler may execute the above-mentioned step of determining whether it supports adjusting the resource specifications of the target virtual instance in the source computing node. Further, if it supports adjusting the resource specifications of the target virtual instance in the source computing node, the scheduler triggers the VPA controller to adjust the resource specifications of the target virtual instance in the source computing node. If adjusting the resource specifications of the target virtual instance in the source computing node is not supported, the scheduler may execute the step of determining the target computing node and schedule the target virtual instance to the target computing node; then trigger the VPA controller to adjust the resource specifications of the target virtual instance in the target computing node. This part corresponds to Figure 6 Step 3 "Triggering adjustment of resource specifications").
[0074] Furthermore, the VPA controller can gradually adjust the resource specifications of the virtual instances in the computing cluster by approaching the target resource specifications one by one ( Figure 6 Step 4 (“gradual adjustment”). The virtual instance adjusted here can be the target virtual instance mentioned above. The target virtual instance is on the source computing node or the target computing node.
[0075] Accordingly, the node agent component in the computing node (source computing node or target computing node) can adjust the resource specifications of the virtual instance under the control of the VPA controller ( Figure 6 Step 5 "Adjust resource specifications").
[0076] In the embodiment of the present application, in order to prevent blindly adjusting the resource specifications of the virtual instance, resulting in large QoS jitter, the QoS of the virtual instance can be obtained in the process of gradually adjusting the resource specifications of the virtual instance (corresponding to Figure 2 Step 5 and Figure 6 Step 6).
[0077] Specifically, the management and control node 10 may obtain the QoS operation index of the virtual instance after the resource specification is adjusted each time after the resource specification is adjusted. Figure 6Step 6). The QoS proxy component in the computing node 201 can collect the QoS operating indicators of the virtual instance after the current resource specification adjustment, and upload them to the QoS management component in the control node 10. Among them, the QoS proxy component can guarantee the QoS of the virtual instance to a certain extent. When a QoS anomaly occurs in the virtual instance (such as CPU throttling), the QoS proxy component can automatically adjust the resource configuration of the virtual instance according to the resource idleness of the computing node where the virtual instance is located, allowing the use of short-term resource peaks to meet sudden resource demands, thereby avoiding damage to the service of the virtual instance, that is, Figure 6 "QoS-aware automatic burst" in the QoS-aware automatic burst. Short time refers to a time that is less than or equal to a set time threshold, and the time threshold can be in the order of seconds, such as 1 second, 2 seconds, or 30 seconds, but is not limited thereto.
[0078] Based on the QoS operating indicators of the above-mentioned virtual instance after the current adjustment of resource specifications, the management and control node 10 can determine the QoS of the virtual instance after the current adjustment of resource specifications according to the QoS operating indicators of the virtual instance after the current adjustment of resource specifications.
[0079] In some embodiments, the management and control node 10 may obtain the historical distribution of the operating indicators of the virtual instance when the QoS is normal; and based on the historical distribution, perform anomaly detection on the QoS operating indicators of the virtual instance after the current resource specification adjustment.
[0080] Optionally, it can be determined whether the distribution of the QoS operating indicators of the virtual instance after the current resource specification adjustment is consistent with the historical distribution according to the historical distribution; if it is consistent, it is determined that the QoS operating indicators of the virtual instance after the current resource specification adjustment are normal. If it is not consistent, it is determined that the QoS operating indicators of the virtual instance after the current resource specification adjustment are abnormal.
[0081] Further, if the QoS operating index of the virtual instance after the current adjustment of the resource specification is abnormal, it is determined that the QoS of the virtual instance after the current adjustment of the resource specification is abnormal. If the QoS operating index of the virtual instance after the current adjustment of the resource specification is normal, it is determined that the QoS of the virtual instance after the current adjustment of the resource specification is normal.
[0082] The management and control node 10 can determine whether to continue to perform the above-mentioned step of gradually adjusting the resource specifications of the virtual instance by gradually approaching the target resource specifications according to the QoS of the virtual instance after the resource specifications are adjusted for the current time. Figure 6 As shown, the process may be executed by a QoS management component in the management and control node 10 .
[0083] For example, in some embodiments, the target resource specification is greater than the original resource specification of the virtual instance. The original resource specification refers to the resource specification of the virtual instance before the resource specification of the virtual instance is adjusted. Then, the resource specification of the virtual instance can be increased by a set gradient (defined as the first gradient) each time by gradually approaching the target resource specification; and after each time the resource specification of the virtual instance is increased by the first gradient, it is determined whether the QoS of the virtual instance after the current resource specification adjustment is normal; if the QoS of the virtual instance after the current resource specification adjustment is abnormal, it means that the resource specification needs to be further increased, and the above-mentioned step of gradually adjusting the resource specification of the virtual instance by gradually approaching the target resource specification can be continued, that is, the resource specification of the virtual instance is continued to be increased by the first gradient until the QoS of the virtual instance after the current resource specification adjustment is normal, and then the above-mentioned operation of gradually adjusting the resource specification of the virtual instance is exited, that is, the resource specification of the virtual instance is stopped. When the above-mentioned operation of gradually adjusting the resource specification of the virtual instance is exited, the resource specification of the virtual instance is the resource specification actually used.
[0084] If the QoS of the virtual instance is still abnormal when the resource specifications of the virtual instance are adjusted to the target resource specifications, the resource specifications of the virtual instance can be further increased until the QoS of the virtual instance is normal. Alternatively, if the QoS of the virtual instance is still abnormal when the resource specifications of the virtual instance are adjusted to the target resource specifications, the resource specifications of the virtual instance can be stopped and manual intervention or horizontal expansion can be requested. Horizontal expansion refers to optimizing resource allocation by increasing the number of virtual instances of the application.
[0085] In other embodiments, if the target resource specification is smaller than the original resource specification of the virtual instance, the resource specification of the virtual instance can be adjusted down by another set gradient (defined as the second gradient) each time by gradually approaching the target resource specification, and after each time the resource specification of the virtual instance is adjusted down by the second gradient, it is determined whether the QoS of the virtual instance after the current adjustment of the resource specification is normal; if the QoS of the virtual instance after the current adjustment of the resource specification is normal, it means that the resource specification of the virtual instance can continue to be reduced, and the resource specification of the virtual instance is continued to be reduced by the second gradient until the QoS of the virtual instance after the current adjustment of the resource specification is abnormal. In the case where the QoS of the virtual instance is abnormal after the current adjustment of the resource specification, the above-mentioned operation of gradually adjusting the resource specification of the virtual instance can be exited, and the resource specification of the virtual instance can be adjusted to the resource specification adjusted to the previous time when the QoS is abnormal (i.e., the current time), and then the adjustment of the resource specification of the virtual instance is stopped. If the QoS of the virtual instance is still normal when the resource specification of the virtual instance is adjusted to the target resource specification, the virtual instance can maintain the target resource specification operation, etc.
[0086] It should be noted that the first gradient and the second gradient may be the same or different. Preferably, the first gradient is greater than the second gradient. This is mainly because the first gradient is an upward gradient, and the upward gradient of the resource specification of the virtual instance with abnormal QoS is larger, which can make the QoS of the virtual instance adjusted to normal QoS as quickly as possible. The second gradient is a downward gradient, and the QoS of the virtual instance is normal, which can guarantee the service performance of the virtual instance, so the target resource specification can be smoothly approached.
[0087] Based on the above analysis, the control node 10 may exit the operation of gradually adjusting the resource specifications of the virtual instance (corresponding to Figure 2 Step 6 and Figure 6 Step 7 (“Interruption Adjustment Plan”). The VPA controller can respond to the interruption adjustment plan and exit the above-mentioned gradual adjustment of the resource specifications of the virtual instance.
[0088] Among them, in the embodiment where the target resource specification is greater than the original resource specification of the virtual instance, the service quality of the virtual instance meets the set requirements and can be realized as follows: the QoS of the virtual instance is normal after the resource specification is adjusted for the current time. In the embodiment where the target resource specification is less than the original resource specification of the virtual instance, the service quality of the virtual instance meets the set requirements and can be realized as follows: the QoS of the virtual instance is abnormal after the resource specification is adjusted for the current time.
[0089] In the embodiment of the present application, a scheme for dynamically adjusting the resource specifications of virtual instances in a computing cluster is proposed. On the one hand, the resource specifications of virtual instances in a computing cluster are gradually adjusted by gradually approaching the target resource specifications. Compared with adjusting the resource specifications of virtual instances to the target resource specifications at one time, the QoS jitter of virtual instances during the adjustment process can be reduced. On the other hand, in the process of gradually adjusting the resource specifications of virtual instances, a QoS perception technology for virtual instances is introduced. Based on the QoS of virtual instances, the resource specifications of virtual instances are adjusted. While adjusting the resource specifications of virtual instances, the QoS of virtual instances after the resource specifications are adjusted can be guaranteed.
[0090] After each resource specification adjustment, the QoS of the virtual instance after the current resource specification adjustment is obtained, so that the QoS of the virtual instance after the resource specification adjustment can be timely perceived. If the QoS is abnormal, it can be discovered in time and the adjustment of the resource specification of the virtual instance can be stopped, which can reduce application risks.
[0091] In an embodiment of the present application, the control node 10 may also save the resource specifications (defined as the first resource specifications) to which the virtual instance is adjusted when the resource specifications of the virtual instance in the computing cluster are stopped being adjusted. For embodiments in which the target resource specifications are greater than the original resource specifications of the virtual instance, stopping adjusting the resource specifications of the virtual instance in the computing cluster refers to exiting the stepwise adjustment of the resource specifications of the virtual instance. For embodiments in which the target resource specifications are less than the original resource specifications of the virtual instance, stopping adjusting the resource specifications of the virtual instance in the computing cluster refers to stopping adjusting the resource specifications of the virtual instance after adjusting the resource specifications of the virtual instance to the resource specifications adjusted to the last time when the QoS was abnormal (i.e., the current time) when the quality of service of the virtual instance meets the set requirements. Among them, the first resource specification may be the target resource specification, or it may be greater than (when the resource specification is lowered) or less than (when the resource specification is raised) the target resource specification. In this way, when there is a subsequent virtual instance deployment request, a new virtual instance may be created in the computing cluster according to the first resource specification. The resource specification of the new virtual instance is the first resource specification.
[0092] For example, the management node 10 may host the first resource specification to an admission controller in the management node 10. The admission controller is a piece of code that intercepts requests to the API service component after the request is authenticated and authorized but before the object is persisted. In this embodiment, the admission controller may intercept virtual instance deployment requests (i.e., Figure 6 Step 8 "intercepting a virtual instance deployment request"), and based on the virtual instance deployment request, creating a new virtual instance with a first resource specification in the computing cluster.
[0093] After stopping adjusting the resource specifications of the virtual instances in the computing cluster, the target virtual instances in the computing cluster are adjusted to the first resource specifications. Of course, after the target virtual instances are adjusted to the first resource specifications, the management and control node 10 can also adjust the target virtual instances of the next batch to achieve batch resource specification adjustment of the virtual instances in the computing cluster.
[0094] For the above-mentioned embodiment in which the target resource specification is larger than the original resource specification, if the QoS of the target virtual instance is still abnormal after the target virtual instance is adjusted to the target resource specification, the grayscale adjustment of the next batch will not be performed.
[0095] For an embodiment in which QoS is normal after the virtual instance is adjusted to the first resource specification, the management and control node 10 may obtain QoS and resource usage data of the virtual instance of the first resource specification (corresponding to Figure 6Step 6, Step 9 and Step 10); and select the resource usage data with normal QoS from the resource usage data of the virtual instance with the first resource specification. Afterwards, the resource profile of the virtual instance can be adjusted according to the resource usage data with normal QoS to obtain an adjusted resource profile; and according to the adjusted resource profile, a new target resource specification is determined to achieve the update of the target resource specification ( Figure 6 Step 11 "Update resource profile"). Among them, Figure 6 The updating of resource portraits in combination with the half-life sliding window algorithm is only used as an example for illustration, but it does not constitute a limitation. In this way, the resource specifications of the virtual instance can be adjusted based on the new target resource specifications. For the implementation method of adjusting the resource specifications of the virtual instance based on the new target resource specifications, please refer to the above-mentioned content of adjusting the resource specifications of the virtual instance based on the target resource specifications, which will not be repeated here.
[0096] In addition to the above-mentioned system embodiment, the embodiment of the present application also provides a resource specification adjustment method. The resource specification adjustment method provided in the embodiment of the present application is exemplarily described below.
[0097] Figure 7 Schematic diagram of the process of adjusting resource specifications provided in the embodiment of the present application. Figure 7 As shown, the resource specification adjustment method mainly includes:
[0098] 701. Obtain target resource specifications of virtual instances in a computing cluster.
[0099] 702. Gradually adjust the resource specifications of the virtual instance by gradually approaching the target resource specifications.
[0100] 703. In the process of gradually adjusting the resource specifications of the virtual instance, obtain the service quality of the virtual instance.
[0101] 704. When the service quality of the virtual instance meets the set requirements, exit the operation of gradually adjusting the resource specifications of the virtual instance.
[0102] In order to determine reasonable target resource specifications, the resource profile of the virtual instance is introduced. By analyzing the historical resource usage data of the virtual instance, the resource profile of the virtual instance is realized. The resource profile of the virtual instance can provide a basis for determining the target resource specifications of the virtual instance, so that the setting of the target resource specifications of the virtual instance can be targeted.
[0103] Specifically, the resource usage data of the virtual instances in the computing cluster in the historical time period can be obtained. The historical time period can be a set time period closest to the current time, such as the last week or weeks, the last month or months, etc. Of course, the historical time period can also be the historical resource usage data from the start of the virtual instance of the computing node to the current moment.
[0104] Resource profiling relies on the historical resource usage data of virtual instances. The sampling granularity of this data is often at the minute level or even the second level. Resource profiling requires a large amount of historical data accumulation. If all data is saved for regular iterative analysis by the profiling algorithm, the storage and computing overhead will be very high. Based on this, the resource usage data of virtual instances in the collected computing cluster can be compressed and stored.
[0105] In the embodiments of the present application, the specific compression algorithm for compressing and storing resource usage data is not limited. In some embodiments, a sample compression algorithm based on a statistical histogram can be used to compress the collected resource usage data of the virtual instance to obtain compressed resource usage data; and the compressed resource usage data is stored, which can reduce the storage space occupied by the resource usage data and help save storage resources.
[0106] Specifically, multiple sampling points can be set based on the resource usage of each dimension, and the resource interval between two adjacent sampling points can be the set resource interval. Furthermore, the number of occurrences of each sampling point in the resource usage data of the collected virtual instance can be counted, and the sampling points and the corresponding number of occurrences can be stored, thereby realizing a sample compression algorithm based on a statistical histogram to compress the resource usage data of the collected virtual instance.
[0107] Based on the above-mentioned compressed and stored resource usage data, when performing resource profiling, the compressed and stored resource usage data corresponding to the virtual instances in the computing cluster in the historical time period can be obtained; and the compressed and stored resource usage data corresponding to the virtual instances in the historical time period can be decompressed to obtain the resource usage data of the virtual instances in the computing cluster in the historical time period.
[0108] Furthermore, resource profiling of the virtual instance may be performed based on the resource usage data of the virtual instance in the computing cluster in a historical time period to obtain a resource profile of the virtual instance.
[0109] Specifically, the QoS operation index of the virtual instance may be obtained, and according to the historical distribution of the QoS operation index, anomaly detection may be performed on the QoS operation index of the virtual instance.
[0110] Optionally, it is possible to determine whether the distribution of the operating indicators of the QoS of the virtual instance is consistent with the historical distribution according to the historical distribution; if it is consistent, it is determined that the operating indicators of the QoS of the virtual instance are normal. If it is not consistent, it is determined that the operating indicators of the QoS of the virtual instance are abnormal. Further, if the operating indicators of the QoS of the virtual instance are abnormal, it is determined that the QoS of the virtual instance is abnormal. If the operating indicators of the QoS of the virtual instance are normal, it is determined that the QoS of the virtual instance is normal.
[0111] Furthermore, resource usage data with normal QoS can be screened from the collected resource usage data of virtual instances in the computing cluster in historical time periods as resource usage data for profiling, that is, as resource usage data of virtual instances in the above computing cluster in historical time periods.
[0112] In the embodiments of the present application, the specific implementation method of performing resource profiling on the virtual instance is not limited. In some embodiments, the resource profiling of the virtual instance can be performed according to a sampling peak algorithm, a weighted average algorithm, or a quantile value algorithm.
[0113] In the time dimension, considering the resource usage of the application workload, which usually has periodic characteristics, resource profiling requires the historical resource usage data of the application's virtual instance, but the reference value of historical data when profiling the virtual instance's resources is different. Among them, the resource usage data closer to the current time can better reflect the resource usage characteristics of the virtual instance. Based on this, the confidence of the resource usage data is determined according to the time information of the resource usage data in the historical time period; among them, the confidence corresponding to the resource usage data with earlier time information is smaller.
[0114] In some embodiments, a confidence decay strategy may be preset, in which the confidence of resource usage data within the same portrait period T1 is the same, and the confidence of resource usage data in the earlier portrait period is smaller. The above-mentioned historical time period may include: multiple portrait periods, and multiple refers to 2 or more. Based on this, the resource usage data corresponding to each of the multiple portrait periods can be determined according to the time information of the resource usage data of the virtual instances in the computing cluster in the historical time period; for any portrait period T1, the confidence of the resource usage data of the portrait period T1 can be determined according to the time information of the resource usage data of the portrait period T1 and the preset confidence decay strategy.
[0115] After determining the confidence of the resource usage data of the virtual instances in the computing cluster in the historical time period, a resource profile of the virtual instances in the computing cluster can be performed based on the confidence of the resource usage data of the virtual instances in the computing cluster in the historical time period and the resource usage data of the virtual instances in the computing cluster in the historical time period to obtain a resource profile of the virtual instances.
[0116] Optionally, a portrait cycle T1 may include: multiple statistical cycles T2. Accordingly, the resource usage peaks and / or resource usage means corresponding to the multiple statistical cycles may be determined based on the resource usage data of the multiple statistical cycles, and then the resource usage peak sequence and / or resource usage peak sequence corresponding to the portrait cycle T1 may be obtained; further, the resource portrait of the virtual instance may be performed based on the confidence of the resource usage data of the multiple portrait cycles and the resource usage peak sequence and / or resource usage mean sequence corresponding to the multiple portrait cycles, so as to obtain the resource portrait of the virtual instance.
[0117] After obtaining the resource profile of the virtual instance, the target resource specification of the virtual instance can be determined according to the resource profile of the virtual instance. For example, the resource usage peak value can be taken from the resource profiles of the virtual instance in multiple profile cycles as the target resource specification of the virtual instance.
[0118] The process of the method for determining the target resource specification shown in the above embodiment is only an exemplary description, but does not constitute a limitation. In this embodiment, the resource profile of the virtual instance is performed through the historical resource usage data of the virtual instance; and the target resource specification is determined based on the resource profile of the virtual instance, so that the target resource specification is determined based on the actual historical resource usage of the virtual instance, so that the target resource specification has a basis to rely on, which can improve the accuracy and rationality of the determined target resource specification.
[0119] After determining the target resource specifications, when adjusting the resource specifications, in step 701, the target resource specifications of the virtual instance can be obtained. In some embodiments, the target resource specifications can be hosted on a PaaS platform. Accordingly, when adjusting the resource specifications of the virtual instance in the computing cluster, the target resource specifications of the virtual instance can be obtained from the PaaS platform. Of course, when adjusting the resource specifications of the virtual instance in the computing cluster, the determination method of the target resource specifications provided in the above embodiment can also be used to perform real-time calculations to obtain the target resource specifications.
[0120] Furthermore, the resource specifications of the virtual instances in the computing cluster may be adjusted based on the target resource specifications, that is, the resource specifications of the computing cluster may be automatically scaled (VPA) based on the target resource specifications.
[0121] In order to reduce the QoS jitter of the virtual instance during the resource specification adjustment process, in step 702, the resource specifications of the virtual instances in the computing cluster can be gradually adjusted by gradually approaching the target resource specifications. This resource specification adjustment method can also be called progressive adjustment of resource specifications. In this way, it can be prevented that the resource specifications of the virtual instances in the computing cluster are adjusted to the target resource specifications at one time, which may cause a large-scale jitter in QoS.
[0122] To further reduce the large-scale jitter of the QoS of virtual instances caused by resource specification adjustments, when adjusting the resource specifications of virtual instances in the computing cluster, you can also control the grayscale ratio of virtual instances in the computing cluster and adjust the resource specifications of virtual instances in the computing cluster in batches, that is, adjust the resource specifications of virtual instances in a set ratio in each batch.
[0123] Specifically, the proportion of virtual instances to be adjusted can be determined, and the target virtual instances to be adjusted can be determined according to the proportion of virtual instances to be adjusted; the resource specifications of the target virtual instances can be gradually adjusted by approaching the target resource specifications one by one. The proportion of virtual instances to be adjusted refers to the proportion of virtual instances to be adjusted to the total virtual instances in the computing cluster, and the proportion is greater than 0 and less than 1.
[0124] In an embodiment of the present application, the resource specifications of the target virtual instance can be adjusted locally on the source computing node where the target virtual instance is located, which can avoid the impact of virtual instance migration on the application. Specifically, the source computing node where the target virtual instance is located can be determined; and based on the target resource specifications, the resource capacity of the source computing node, and the resource usage of the source computing node, it is determined whether it supports adjusting the resource specifications of the target virtual instance in the source computing node. For example, the remaining resources of the source computing node can be calculated based on the resource capacity and resource usage of the source computing node; if the remaining resources of the source computing node are less than (target resource specifications-original resource specifications of the virtual instance), it is determined that the resource specifications of the target virtual instance are not supported in the source computing node. According to the target resource specifications, the target computing node to which the target virtual instance is to be migrated can be determined from the computing cluster.
[0125] Optionally, a computing node whose remaining resources are greater than or equal to the target resource specification may be selected from the computing cluster as the target computing node.
[0126] Furthermore, the target virtual instance may be migrated to the target computing node; thereafter, the resource specifications of the target virtual instance may be gradually adjusted on the target computing node in a manner of successively approaching the target resource specifications.
[0127] Accordingly, if the remaining resources of the source computing node are greater than or equal to (target resource specifications - original resource specifications of the virtual instance), it is determined that the resource specifications of the target virtual instance can be adjusted within the source computing node. The resource specifications of the target virtual instance can be gradually adjusted on the source computing node by successively approaching the target resource specifications.
[0128] In the embodiment of the present application, in order to prevent blind adjustment of the resource specifications of the virtual instance, resulting in large QoS jitter, in step 703, the QoS of the virtual instance can be obtained during the process of gradually adjusting the resource specifications of the virtual instance.
[0129] Specifically, after each adjustment of the resource specifications of the virtual instance, the QoS operating indicator of the virtual instance after the current adjustment of the resource specifications can be obtained. Based on the QoS operating indicator of the virtual instance after the current adjustment of the resource specifications, the QoS of the virtual instance after the current adjustment of the resource specifications can be determined according to the QoS operating indicator of the virtual instance after the current adjustment of the resource specifications.
[0130] In some embodiments, the historical distribution of operating indicators when the QoS of the virtual instance is normal can be obtained; and based on the historical distribution, anomaly detection is performed on the QoS operating indicators of the virtual instance after the resource specifications are adjusted for the current time.
[0131] Optionally, it can be determined whether the distribution of the QoS operating indicators of the virtual instance after the current resource specification adjustment is consistent with the historical distribution according to the historical distribution; if it is consistent, it is determined that the QoS operating indicators of the virtual instance after the current resource specification adjustment are normal. If it is not consistent, it is determined that the QoS operating indicators of the virtual instance after the current resource specification adjustment are abnormal.
[0132] Further, if the QoS operating index of the virtual instance after the current adjustment of the resource specification is abnormal, it is determined that the QoS of the virtual instance after the current adjustment of the resource specification is abnormal. If the QoS operating index of the virtual instance after the current adjustment of the resource specification is normal, it is determined that the QoS of the virtual instance after the current adjustment of the resource specification is normal.
[0133] Whether to continue to perform the above-mentioned step of gradually adjusting the resource specifications of the virtual instance by gradually approaching the target resource specifications can be determined according to the QoS of the virtual instance after the resource specifications are adjusted for the current time.
[0134] For example, in some embodiments, the target resource specification is greater than the original resource specification of the virtual instance. The original resource specification refers to the resource specification of the virtual instance before the resource specification of the virtual instance is adjusted. Then, the resource specification of the virtual instance can be increased by a set gradient (defined as the first gradient) each time by gradually approaching the target resource specification; and after each time the resource specification of the virtual instance is increased by the first gradient, it is determined whether the QoS of the virtual instance after the current resource specification adjustment is normal; if the QoS of the virtual instance after the current resource specification adjustment is abnormal, it means that the resource specification needs to be further increased, and then the above-mentioned step of gradually adjusting the resource specification of the virtual instance by gradually approaching the target resource specification can be continued, that is, the resource specification of the virtual instance is continued to be increased by the first gradient until the QoS of the virtual instance after the current resource specification adjustment is normal, and then the above-mentioned operation of gradually adjusting the resource specification of the virtual instance is exited, that is, the resource specification of the virtual instance is stopped. When the above-mentioned operation of gradually adjusting the resource specification of the virtual instance is exited, the resource specification of the virtual instance is the resource specification actually used.
[0135] If the QoS of the virtual instance is still abnormal when the resource specifications of the virtual instance are adjusted to the target resource specifications, the resource specifications of the virtual instance can be further increased until the QoS of the virtual instance is normal. Alternatively, if the QoS of the virtual instance is still abnormal when the resource specifications of the virtual instance are adjusted to the target resource specifications, the resource specifications of the virtual instance can be stopped and manual intervention or horizontal expansion can be requested. Horizontal expansion refers to optimizing resource allocation by increasing the number of virtual instances of the application.
[0136] In other embodiments, if the target resource specification is smaller than the original resource specification of the virtual instance, the resource specification of the virtual instance can be adjusted down by another set gradient (defined as the second gradient) each time by gradually approaching the target resource specification, and after each time the resource specification of the virtual instance is adjusted down by the second gradient, it is determined whether the QoS of the virtual instance after the current adjustment of the resource specification is normal; if the QoS of the virtual instance after the current adjustment of the resource specification is normal, it means that the resource specification of the virtual instance can continue to be reduced, and the resource specification of the virtual instance is continued to be reduced by the second gradient until the QoS of the virtual instance after the current adjustment of the resource specification is abnormal. In the case where the QoS of the virtual instance is abnormal after the current adjustment of the resource specification, exit the above-mentioned operation of gradually adjusting the resource specification of the virtual instance, and adjust the resource specification of the virtual instance to the resource specification adjusted to the previous time when the QoS is abnormal (i.e., the current time), and stop adjusting the resource specification of the virtual instance. If the QoS of the virtual instance is still normal when the resource specification of the virtual instance is adjusted to the target resource specification, the virtual instance can maintain the target resource specification operation, etc.
[0137] It should be noted that the first gradient and the second gradient may be the same or different. Preferably, the first gradient is greater than the second gradient. This is mainly because the first gradient is an upward gradient, and the upward gradient of the resource specification of the virtual instance with abnormal QoS is larger, which can make the QoS of the virtual instance adjusted to normal QoS as quickly as possible. The second gradient is a downward gradient, and the QoS of the virtual instance is normal, which can guarantee the service performance of the virtual instance, so the target resource specification can be smoothly approached.
[0138] Based on the above analysis, in step 704, if the service quality of the virtual instance meets the set requirements, the above operation of gradually adjusting the resource specifications of the virtual instance can be exited. Among them, in an embodiment where the target resource specification is greater than the original resource specification of the virtual instance, the service quality of the virtual instance meets the set requirements, which can be realized as: the QoS of the virtual instance is normal after the current resource specification is adjusted. In an embodiment where the target resource specification is less than the original resource specification of the virtual instance, the service quality of the virtual instance meets the set requirements, which can be realized as: the QoS of the virtual instance is abnormal after the current resource specification is adjusted.
[0139] In the embodiment of the present application, a scheme for dynamically adjusting the resource specifications of virtual instances in a computing cluster is proposed. On the one hand, the resource specifications of virtual instances in a computing cluster are gradually adjusted by gradually approaching the target resource specifications. Compared with adjusting the resource specifications of virtual instances to the target resource specifications at one time, the QoS jitter of virtual instances during the adjustment process can be reduced. On the other hand, in the process of gradually adjusting the resource specifications of virtual instances, a QoS perception technology for virtual instances is introduced. Based on the QoS of virtual instances, the resource specifications of virtual instances are adjusted. While adjusting the resource specifications of virtual instances, the QoS of virtual instances after the resource specifications are adjusted can be guaranteed.
[0140] After each resource specification adjustment, the QoS of the virtual instance after the current resource specification adjustment is obtained, so that the QoS of the virtual instance after the resource specification adjustment can be timely perceived. If the QoS is abnormal, it can be discovered in time and the adjustment of the resource specification of the virtual instance can be stopped, which can reduce application risks.
[0141] In an embodiment of the present application, the resource specification (defined as the first resource specification) to which the virtual instance is adjusted when the resource specification of the virtual instance in the computing cluster stops being adjusted can also be saved. The first resource specification can be a target resource specification, or it can be greater than (when the resource specification is lowered) or less than (when the resource specification is raised) the target resource specification. In this way, when there is a subsequent virtual instance deployment request, a new virtual instance can be created in the computing cluster according to the first resource specification. The resource specification of the new virtual instance is the first resource specification.
[0142] After the resource specifications of the virtual instances in the computing cluster are stopped being adjusted, the target virtual instances in the computing cluster are adjusted to the first resource specifications. Of course, after the target virtual instances are adjusted to the first resource specifications, the target virtual instances of the next batch can also be adjusted to achieve batch resource specification adjustment of the virtual instances in the computing cluster.
[0143] For the above-mentioned embodiment in which the target resource specification is larger than the original resource specification, if the QoS of the target virtual instance is still abnormal after the target virtual instance is adjusted to the target resource specification, the grayscale adjustment of the next batch will not be performed.
[0144] For an embodiment in which QoS is normal after the virtual instance is adjusted to the first resource specification, the QoS and resource usage data of the virtual instance with the first resource specification can be obtained; and the resource usage data with normal QoS can be selected from the resource usage data of the virtual instance with the first resource specification. Afterwards, the resource profile of the virtual instance can be adjusted according to the resource usage data with normal QoS to obtain an adjusted resource profile; and based on the adjusted resource profile, a new target resource profile can be determined to implement an update of the target resource profile. In this way, the resource specifications of the virtual instance can be adjusted based on the new target resource specifications. Regarding the implementation method of adjusting the resource specifications of the virtual instance based on the new target resource specifications, please refer to the above-mentioned relevant content of adjusting the resource specifications of the virtual instance based on the target resource specifications, which will not be repeated here.
[0145] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 701 and 702 can be device A; for another example, the execution subject of step 701 can be device A, and the execution subject of step 702 can be device B; and so on.
[0146] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations appearing in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel, and the sequence numbers of the operations, such as 702, 703, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel.
[0147] Accordingly, an embodiment of the present application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the above-mentioned resource specification adjustment method.
[0148] Figure 8 This is a schematic diagram of the structure of a computing device provided in an embodiment of the present application. Figure 8 As shown, the computing device mainly includes: a memory 80a and a processor 80b. The memory 80a is used to store computer programs.
[0149] The processor 80b is coupled to the memory 80a, and is used to execute a computer program for: obtaining target resource specifications of virtual instances in the computing cluster; gradually adjusting the resource specifications of the virtual instances by successively approaching the target resource specifications; obtaining the service quality of the virtual instances in the process of gradually adjusting the resource specifications of the virtual instances; and, when the service quality of the virtual instances meets the set requirements, exiting the above-mentioned operation of gradually adjusting the resource specifications of the virtual instances.
[0150] In some embodiments, when the processor 80b obtains the service quality of the computing cluster during the process of gradually adjusting the resource specifications of the virtual instance, it is specifically used to: after each adjustment of the resource specifications of the virtual instance, obtain the operating indicators of the service quality of the virtual instance after the current adjustment of the resource specifications; determine the service quality of the virtual instance after the current adjustment of the resource specifications based on the operating indicators of the service quality of the virtual instance after the current adjustment of the resource specifications.
[0151] Optionally, when the processor 80b determines the service quality of the virtual instance after the resource specifications are currently adjusted based on the operating indicators of the service quality of the virtual instance after the resource specifications are currently adjusted, it is specifically used to: obtain the historical distribution of the operating indicators when the service quality of the virtual instance is normal; perform anomaly detection on the operating indicators of the service quality of the virtual instance after the resource specifications are currently adjusted based on the historical distribution; if the operating indicators of the service quality of the virtual instance after the resource specifications are currently adjusted are abnormal, determine that the service quality of the virtual instance after the resource specifications are currently adjusted is abnormal.
[0152] In some embodiments, the target resource specification is less than the original resource specification of the virtual instance. Accordingly, when the processor 80b exits the operation of gradually adjusting the resource specification of the virtual instance when the service quality of the virtual instance meets the set requirements, it is specifically used to: if the service quality of the virtual instance after the resource specification is adjusted for the current time is abnormal, determine that the service quality of the virtual instance meets the set requirements, and exit the operation of gradually adjusting the resource specification of the virtual instance; and if the service quality of the virtual instance meets the set requirements, adjust the resource specification of the virtual instance to the resource specification adjusted for the previous time.
[0153] In some other embodiments, the target resource specification is greater than the original resource specification of the virtual instance. Accordingly, when the service quality of the virtual instance meets the set requirements or the resource specification of the virtual instance is adjusted to the target resource specification, the processor 80b stops adjusting the resource specification of the virtual instance, and is specifically used to: if the service quality of the virtual instance after the current resource specification adjustment is normal, determine that the service quality of the virtual instance meets the set requirements, and exit the operation of gradually adjusting the resource specification of the virtual instance.
[0154] Correspondingly, processor 80b is also used for: if the service quality of the virtual instance is abnormal after the current resource specification adjustment, continue to execute the step of gradually adjusting the resource specification of the virtual instance by successively approaching the target resource specification until the service quality of the virtual instance is normal.
[0155] In some embodiments, the processor 80b is further used to: save the first resource specification to which the virtual instance is adjusted when the adjustment of the resource specification of the virtual instance is stopped, so as to create a new virtual instance in the computing cluster according to the first resource specification.
[0156] In some embodiments of the present application, when the processor 80b obtains the target resource specifications of the virtual instance of the computing cluster, it is specifically used to: obtain resource usage data of the virtual instance of the computing cluster in a historical time period; and determine the target resource specifications of the virtual instance based on the resource usage data.
[0157] Optionally, when determining the target resource specifications of the virtual instance based on the resource usage data, the processor 80b is specifically used to: perform resource profiling on the virtual instance based on the resource usage data to obtain a resource profile of the virtual instance; and determine the target resource specifications of the virtual instance based on the resource profile.
[0158] Furthermore, when processor 80b performs resource profiling on a virtual instance based on resource usage data, it is specifically used to: determine the confidence of the resource usage data based on the time information of the resource usage data; wherein, the confidence corresponding to the resource usage data with earlier time information is smaller; and perform resource profiling on the virtual instance based on the resource usage data and the confidence of the resource usage data to obtain a resource profile.
[0159] Optionally, the historical time period includes: multiple portrait periods. When the processor 80b determines the confidence of the resource usage data according to the time information of the resource usage data, it is specifically used to: determine the resource usage data corresponding to each of the multiple portrait periods according to the time information of the resource usage data; for any portrait period, determine the confidence of the resource usage data of any portrait period according to the time information of the resource usage data of any portrait period and a preset confidence attenuation strategy; wherein, the confidence of the resource usage data of the earlier portrait period is smaller.
[0160] Further, any portrait cycle includes: multiple statistical cycles. When the processor 80b performs resource portrait on the virtual instance according to the resource usage data and the confidence of the resource usage data, it is specifically used to: determine the resource usage peak values and / or resource usage mean values corresponding to the multiple statistical cycles according to the resource usage data of the multiple statistical cycles, so as to obtain the resource usage peak value sequence and resource usage mean value sequence corresponding to any portrait cycle; and, perform resource portrait on the virtual instance according to the confidence of the resource usage data of the multiple portrait cycles, and the resource usage peak value sequence and / or resource usage mean value sequence corresponding to the multiple portrait cycles, so as to obtain the resource portrait.
[0161] In this embodiment, the processor 80b is further used to compress and store the collected resource usage data of the virtual instance. Accordingly, when the processor 80b obtains the resource usage data of the virtual instance of the computing cluster in the historical time period, it is specifically used to: obtain the compressed and stored resource usage data corresponding to the virtual instance in the historical time period; decompress the compressed and stored data corresponding to the virtual instance in the historical time period to obtain the resource usage data.
[0162] Optionally, when the processor 80b compresses and stores the collected resource usage data of the virtual instance, it is specifically used to: compress the collected resource usage data of the virtual instance using a sample compression algorithm based on a statistical histogram to obtain compressed resource usage data; and store the compressed resource usage data.
[0163] In other embodiments, when the processor 80b gradually adjusts the resource specifications of the virtual instance by successively approaching the target resource specifications, it is specifically used to: determine the proportion of the virtual instance to be adjusted; determine the target virtual instance to be adjusted based on the proportion of the virtual instance to be adjusted; and gradually adjust the resource specifications of the target virtual instance by successively approaching the target resource specifications.
[0164] Optionally, the processor 80b is further used to: determine the source computing node where the target virtual instance is located before gradually adjusting the resource specifications of the target virtual instance by using a method of successively approaching the target resource specifications; determine whether it is supported to adjust the resource specifications of the target virtual instance in the source computing node according to the target resource specifications, the resource capacity of the source computing node, and the resource usage of the source computing node; if the judgment result is yes, gradually adjust the resource specifications of the target virtual instance on the source computing node by using a method of successively approaching the target resource specifications. If the judgment result is no, determine the target computing node to which the target virtual instance is to be migrated from the computing cluster according to the target resource specifications; migrate the target virtual instance to the target computing node; and, gradually adjust the resource specifications of the target virtual instance on the target computing node by using a method of successively approaching the target resource specifications.
[0165] Optionally, processor 80b is also used to: obtain service quality and resource usage data of a virtual instance with a first resource specification; the first resource specification is the resource specification to which the virtual instance is adjusted when adjustment of the resource specification of the virtual instance is stopped; select resource usage data with normal service quality from the resource usage data of the virtual instance with the first resource specification; adjust the resource profile of the virtual instance based on the resource usage data with normal service quality to obtain an adjusted resource profile; determine a new target resource specification based on the adjusted resource profile to adjust the resource specification of the virtual instance based on the new target resource specification.
[0166] In some optional embodiments, such as Figure 8 As shown, the computing device may also include: a communication component 80c and a power component 80d and other components. In some embodiments, the computing device may also be implemented as a terminal device such as a computer. Accordingly, the computing device may also include: a display component 80e and an audio component 80f and other components. Figure 8 The components are shown schematically only and do not necessarily include Figure 8 The components shown do not necessarily mean that the computing device can only include Figure 8 Components shown.
[0167] The computing device provided in this embodiment can dynamically adjust the resource specifications of virtual instances in a computing cluster. On the one hand, by gradually adjusting the resource specifications of virtual instances in a computing cluster in a manner that gradually approaches the target resource specifications, the QoS jitter of the virtual instances during the adjustment process can be reduced compared to adjusting the resource specifications of the virtual instances to the target resource specifications at one time. On the other hand, in the process of gradually adjusting the resource specifications of the virtual instances, QoS awareness technology for virtual instances is introduced. Based on the QoS of the virtual instances, the resource specifications of the virtual instances are adjusted, which can ensure the QoS of the virtual instances after the resource specifications are adjusted while adjusting the resource specifications of the virtual instances.
[0168] In an embodiment of the present application, the memory is used to store a computer program and can be configured to store various other data to support operations on the device where it is located. Among them, the processor can execute the computer program stored in the memory to implement the corresponding control logic. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random-Access Memory, SRAM), electrically erasable programmable read only memory (Electrically Erasable Programmable Read Only Memory, EEPROM), erasable programmable read only memory (Electrical Programmable Read Only Memory, EPROM), programmable read only memory (Programmable Read Only Memory, PROM), read only memory (Read Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0169] In the embodiment of the present application, the processor can be any hardware processing device that can execute the logic of the above method. Optionally, the processor can be a central processing unit (CPU), a graphics processing unit (GPU) or a microcontroller unit (MCU); it can also be a field programmable gate array (FPGA), a programmable array logic device (PAL), a general array logic device (GAL), a complex programmable logic device (CPLD) and other programmable devices; or an application specific integrated circuit (ASIC) chip; or an advanced reduced instruction set (RISC) processor (Advanced RISC Machines, ARM) or a system on chip (SoC), etc., but not limited to this.
[0170] In an embodiment of the present application, the communication component is configured to facilitate wired or wireless communication between the device in which it is located and other devices. The device in which the communication component is located can access a wireless network based on a communication standard, such as Wireless Fidelity (WiFi), 2G or 3G, 4G, 5G or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component can also be based on Near Field Communication (NFC) technology, Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology or other technologies.
[0171] In an embodiment of the present application, the display component may include a liquid crystal display (LCD) and a touch panel (TP). If the display component includes a touch panel, the display component may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0172] In an embodiment of the present application, a power supply component is configured to provide power to various components of the device in which it is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply component is located.
[0173] In an embodiment of the present application, the audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (Microphone, MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal may be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal. For example, for a device with a language interaction function, voice interaction with a user can be achieved through an audio component.
[0174] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0175] It should also be noted that the descriptions such as "first" and "second" in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit "first" and "second" to different types.
[0176] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage, etc.) that contain computer-usable program code.
[0177] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (or systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0178] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0179] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0180] In a typical configuration, a computing device includes one or more processors (such as a CPU, etc.), an input / output interface, a network interface, and a memory.
[0181] Memory may include non-permanent storage in a computer-readable medium, random-access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0182] The storage medium of a computer is a readable storage medium, which may also be referred to as a readable medium. The readable storage medium includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be a computer-readable instruction, a data structure, a module of a program, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0183] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the above elements.
[0184] The above contents are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A resource specification adjustment method, characterized in that: include: Obtaining a target resource specification of a virtual instance in a computing cluster, wherein the target resource specification refers to a resource specification to which the virtual instance is to be adjusted; By gradually approaching the target resource specification, the resource specification of the virtual instance is gradually adjusted; In the process of gradually adjusting the resource specifications of the virtual instance, obtaining the service quality of the virtual instance; When the service quality of the virtual instance meets the set requirements or the resource specifications of the virtual instance are adjusted to the target resource specifications, exiting the operation of gradually adjusting the resource specifications of the virtual instance; Wherein, if the quality of service QoS of the virtual instance is still abnormal when the resource specification of the virtual instance is adjusted to the target resource specification, the resource specification of the virtual instance is continuously increased until the QoS of the virtual instance is normal; or, if the QoS of the virtual instance is still abnormal when the resource specification of the virtual instance is adjusted to the target resource specification, the adjustment of the resource specification of the virtual instance is stopped; Wherein, the target resource specification is smaller than the original resource specification of the virtual instance; if the service quality of the virtual instance after the resource specification is adjusted for the current time is abnormal, it is determined that the service quality of the virtual instance meets the set requirements, and the operation of gradually adjusting the resource specification of the virtual instance is exited; if the service quality of the virtual instance meets the set requirements, the resource specification of the virtual instance is adjusted to the resource specification adjusted for the previous time; Wherein, the target resource specification is greater than the original resource specification of the virtual instance; if the service quality of the virtual instance after the current adjustment of the resource specification is normal, determine that the service quality of the virtual instance meets the set requirements, and exit the operation of gradually adjusting the resource specification of the virtual instance; if the service quality of the virtual instance after the current adjustment of the resource specification is abnormal, continue to execute the step of gradually adjusting the resource specification of the virtual instance by gradually approaching the target resource specification until the service quality of the virtual instance is normal; Among them, obtaining the target resource specifications of the virtual instances in the computing cluster includes: obtaining the resource usage data of the virtual instances of the computing cluster in the historical time period; determining the confidence of the resource usage data based on the time information of the resource usage data; wherein, the confidence corresponding to the resource usage data with earlier time information is smaller, and the historical time period includes: multiple portrait periods; the confidence of the resource usage data of each portrait period is related to the time information of the resource usage data of the portrait period and a pre-set confidence attenuation strategy; based on the resource usage data and the confidence of the resource usage data, performing resource portrait on the virtual instance to obtain the resource portrait; based on the resource portrait, determining the target resource specifications of the virtual instance.
2. The method according to claim 1, characterized in that The obtaining of the service quality of the computing cluster during the process of gradually adjusting the resource specifications of the virtual instance includes: After each adjustment of the resource specifications of the virtual instance, obtaining an operating indicator of the service quality of the virtual instance after the current adjustment of the resource specifications; The service quality of the virtual instance after the resource specification is adjusted for the current time is determined according to the operating indicator of the service quality of the virtual instance after the resource specification is adjusted for the current time.
3. The method according to claim 2, characterized in that The determining, according to the operation index of the service quality of the virtual instance after the resource specification is adjusted for the current time, the service quality of the virtual instance after the resource specification is adjusted for the current time, comprises: Obtaining historical distribution of operating indicators when the service quality of the virtual instance is normal; According to the historical distribution, anomaly detection is performed on the operating indicators of the service quality of the virtual instance after the resource specification is adjusted for the current time; If the operating indicator of the service quality of the virtual instance after the resource specification is adjusted for the current time is abnormal, it is determined that the service quality of the virtual instance after the resource specification is adjusted for the current time is abnormal.
4. The method according to claim 1, characterized in that: The historical time period includes: a plurality of portrait cycles; the determining the confidence level of the resource usage data according to the time information of the resource usage data includes: Determining resource usage data corresponding to each of the plurality of portrait periods according to time information of the resource usage data; For any portrait period, the confidence of the resource usage data of any portrait period is determined according to the time information of the resource usage data of any portrait period and a pre-set confidence decay strategy; wherein, the confidence of the resource usage data of the earlier portrait period is smaller.
5. The method according to any one of claims 1 to 3, characterized in that: The step of gradually adjusting the resource specification of the virtual instance by gradually approaching the target resource specification includes: Determining the ratio of virtual instances to be adjusted; Determining a target virtual instance to be adjusted according to the ratio of the virtual instance to be adjusted; The resource specifications of the target virtual instance are gradually adjusted by gradually approaching the target resource specifications.
6. The method according to claim 5, characterized in that Before gradually adjusting the resource specification of the target virtual instance by successively approaching the target resource specification, the method further includes: Determine the source computing node where the target virtual instance is located; According to the target resource specification, the resource capacity of the source computing node and the resource usage of the source computing node, judging whether it is supported to adjust the resource specification of the target virtual instance in the source computing node; if the judgment result is yes, gradually adjusting the resource specification of the target virtual instance on the source computing node by successively approaching the target resource specification; If the judgment result is no, determine the target computing node to which the target virtual instance is to be migrated from the computing cluster according to the target resource specifications; migrate the target virtual instance to the target computing node; and gradually adjust the resource specifications of the target virtual instance on the target computing node by successively approximating the target resource specifications.
7. The method according to claim 1, characterized in that Also includes: Acquire service quality and resource usage data of a virtual instance of a first resource specification; the first resource specification is the resource specification to which the virtual instance is adjusted when the resource specification of the virtual instance stops being adjusted; Selecting resource usage data with normal service quality from the resource usage data of the virtual instances of the first resource specification; According to the resource usage data with normal service quality, adjusting the resource profile of the virtual instance to obtain an adjusted resource profile; According to the adjusted resource profile, a new target resource specification is determined to adjust the resource specification of the virtual instance based on the new target resource specification.
8. A computing device, characterized in that include: A memory and a processor; wherein the memory is used to store a computer program; The processor is coupled to the memory and configured to execute the computer program to perform the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the method according to any one of claims 1 to 7.
