Application performance optimization method, device, electronic device and storage medium
By obtaining and comparing the performance indicators before and after application migration in the k8s container cluster, and optimizing the container configuration of the target node based on the gap, the problem of performance degradation after application migration is solved and the stability and efficiency of application performance are achieved.
Patent Information
- Application Number
- CN202410797462.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-06-20
AI Technical Summary
In a k8s container cluster, after application migration, the CPU model of the target node is different from the original node, resulting in a degradation of application performance.
By obtaining the configuration information of the migrated application on the original node and the target node, determine the original and migrated performance indicators, formulate a performance optimization strategy based on the gap, and optimize the container unit configuration of the target node to improve the performance of the migrated application.
Ensure that the performance of the application migrated to the target node is as close as possible to the performance before migration to ensure the smooth operation of the application.
Smart Images

Figure CN118363764B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an application performance optimization method, device, electronic device and storage medium. Background Art
[0002] At present, k8s container clusters are generally distributed on multiple physical nodes. Pod is the smallest schedulable unit of a container. Pod contains one or more containers. At present, in order to respond to user needs, it is often necessary to migrate applications to physical nodes, which means that multiple Pods of the application to be migrated need to be migrated to physical nodes.
[0003] In the related art, a corresponding number of Pods are usually migrated according to the number of CPU cores of the physical node currently being migrated.
[0004] However, since the original physical node and the currently migrated physical node may use different CPU models, the performance they show is also different. If you only rely on the number of CPU cores of the physical node, the performance of the application will be reduced after the physical node migration. Summary of the invention
[0005] The present application provides an application performance optimization method, device, electronic device and storage medium to solve the defects of related technologies such as performance degradation after physical node migration in applications.
[0006] The first aspect of the present application provides an application performance optimization method, comprising:
[0007] After migrating several container units involved in the migrated application from the original node to the target node, obtaining original configuration information of the migrated application at the original node and migration configuration information at the target node;
[0008] Determining original performance indicators of the migrated application according to original configuration information of the migrated application;
[0009] Determining a migration performance indicator of the migration application according to the migration configuration information of the migration application;
[0010] Determining a performance optimization strategy for the migrated application based on the original performance indicator and the migrated performance indicator;
[0011] According to the performance optimization strategy of the migration application, the container unit configuration of the target node is optimized to optimize the performance of the migration application on the target node.
[0012] In an optional implementation manner, determining the original performance indicator of the migrated application according to the original configuration information of the migrated application includes:
[0013] Call the target computing power evaluation tool from the preset tool library;
[0014] Based on the target computing power evaluation tool, the original performance indicators of the migrated application are determined according to the original configuration information of the migrated application.
[0015] In an optional implementation, determining the migration performance indicator of the migration application according to the migration configuration information of the migration application includes:
[0016] Based on the target computing power evaluation tool, the migration performance index of the migration application is determined according to the migration configuration information of the migration application.
[0017] In an optional implementation, the determining the original performance index of the migrated application based on the target computing power evaluation tool and the original configuration information of the migrated application includes:
[0018] Based on the target computing power evaluation tool, and according to the original configuration information of the migrated application, determining scores of multiple original test items;
[0019] An original performance indicator of the migrated application is determined according to the multiple original test item scores.
[0020] In an optional implementation manner, determining the original performance index of the migrated application according to the multiple original test item scores includes:
[0021] The original performance index of the migration application is determined based on the following formula:
[0022]
[0023] in, Represents the original performance indicators of the migrated application, Indicates the number of test items included in the target computing power evaluation tool. represents the original test item score corresponding to the i-th test item, Represents the preset benchmark score of the i-th test item.
[0024] In an optional implementation, the determining the migration performance index of the migration application based on the target computing power evaluation tool and according to the migration configuration information of the migration application includes:
[0025] Based on the target computing power evaluation tool, and according to the migration configuration information of the migration application, determining scores of multiple migration test items;
[0026] A migration performance index of the migration application is determined according to the scores of the multiple migration test items.
[0027] In an optional implementation manner, determining the migration performance index of the migration application according to the scores of the multiple migration test items includes:
[0028] The migration performance index of the migration application is determined based on the following formula:
[0029]
[0030] in, Indicates the migration performance index of the migration application. Indicates the number of test items included in the target computing power evaluation tool. represents the migration test item score corresponding to the j-th test item, Represents the preset benchmark score of the j-th test item.
[0031] In an optional implementation, determining the performance optimization strategy of the migrated application according to the original performance indicator and the migrated performance indicator includes:
[0032] According to the gap between the original performance indicator and the migration performance indicator, determining whether the migration application has a performance optimization requirement;
[0033] In the case where it is determined that the migrated application has a performance optimization requirement, obtaining attribute information of the migrated application;
[0034] A performance optimization strategy for the migration application is determined according to the performance optimization logic represented by the attribute information of the migration application.
[0035] In an optional implementation, determining the performance optimization strategy of the migration application according to the performance optimization logic represented by the attribute information of the migration application includes:
[0036] According to the performance optimization logic represented by the attribute information of the migration application, if it is determined that the migration application is of a horizontal expansion type, a horizontal expansion strategy is used as the performance optimization strategy of the migration application;
[0037] When it is determined according to the performance optimization logic represented by the attribute information of the migrated application that the migrated application is of a vertical expansion type, a vertical expansion strategy is used as the performance optimization strategy of the migrated application.
[0038] In an optional implementation, optimizing the container unit configuration of the target node according to the performance optimization strategy of the migrated application to optimize the performance of the migrated application on the target node includes:
[0039] In the case where the performance optimization strategy of the migration application is a horizontal expansion strategy, the number of copies of the migration application is increased according to a preset copy increase step, and the process returns to the step of determining the migration performance index of the migration application according to the migration configuration information of the migration application;
[0040] Determining whether the migration performance index of the migration application is improved;
[0041] When it is determined that the migration performance index of the migrated application has been improved, judging whether the migrated application has a performance optimization requirement according to the gap between the original performance index and the migrated performance index;
[0042] When it is determined that the migrated application has no performance optimization requirement, the increased number of copies of the migrated application is used as the target number of copies;
[0043] According to the target number of replicas, the target number of container units of the target node is determined to optimize the container unit configuration of the target node.
[0044] In an optional embodiment, the method further includes:
[0045] In the case where it is determined that the migration performance indicator of the migration application has not been improved, determining that the migration performance indicator of the migration application has reached an upper limit;
[0046] The number of replicas before the migration application is increased is used as the target number of replicas.
[0047] In an optional embodiment, the method further includes:
[0048] When it is determined that the migration application has a performance optimization requirement, the process returns to the step of increasing the number of copies of the migration application according to the preset copy increase step.
[0049] In an optional implementation, optimizing the container unit configuration of the target node according to the performance optimization strategy of the migrated application to optimize the performance of the migrated application on the target node includes:
[0050] In the case where the performance optimization strategy of the migration application is a vertical expansion strategy, increasing the computing resource allocation value of the migration application according to a preset resource increase step, and returning to the step of determining the migration performance index of the migration application according to the migration configuration information of the migration application;
[0051] Determining whether the migration performance index of the migration application is improved;
[0052] When it is determined that the migration performance index of the migrated application has been improved, judging whether the migrated application has a performance optimization requirement according to the gap between the original performance index and the migrated performance index;
[0053] When it is determined that the migrated application has no performance optimization requirement, the increased computing resource allocation value of the migrated application is used as the target computing resource allocation value;
[0054] According to the target computing power resource allocation value, the container unit configuration of the target node is optimized.
[0055] In an optional embodiment, the method further includes:
[0056] When it is determined that the migration performance index of the migration application has not been improved, the memory resource allocation value of the migration application is increased according to a preset memory increase step, and the process returns to the step of determining the migration performance index of the migration application according to the migration configuration information of the migration application;
[0057] When it is determined that the migration performance indicator of the migration application still has not been improved, determining that the migration performance indicator of the migration application has reached an upper limit;
[0058] The computing power resource allocation value before the migration application is increased is used as the target computing power resource allocation value.
[0059] In an optional embodiment, the method further includes:
[0060] If the migration performance index of the migration application is improved after increasing the memory resource allocation value of the migration application, the step of determining whether the migration application has a performance optimization requirement based on the gap between the original performance index and the migration performance index is performed.
[0061] In an optional embodiment, the method further includes:
[0062] When it is determined that the migration application has performance optimization requirements, return to the step of increasing the computing power resource allocation value of the migration application according to the preset resource increase step, or return to the step of increasing the memory resource allocation value of the migration application according to the preset memory increase step.
[0063] A second aspect of the present application provides an application performance optimization device, comprising:
[0064] An acquisition module, configured to acquire original configuration information of the migrated application at the original node and migration configuration information at the target node after migrating several container units involved in the migrated application from the original node to the target node;
[0065] A first determination module, configured to determine an original performance indicator of the migrated application according to original configuration information of the migrated application;
[0066] A second determination module, configured to determine a migration performance indicator of the migration application according to the migration configuration information of the migration application;
[0067] A strategy module, used to determine a performance optimization strategy for the migrated application based on the original performance indicator and the migrated performance indicator;
[0068] The optimization module is used to optimize the container unit configuration of the target node according to the performance optimization strategy of the migration application, so as to optimize the performance of the migration application on the target node.
[0069] A third aspect of the present application provides an electronic device, comprising: at least one processor and a memory;
[0070] The memory stores computer-executable instructions;
[0071] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method described in the first aspect and various possible designs of the first aspect.
[0072] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method described in the first aspect and various possible designs of the first aspect are implemented.
[0073] A fifth aspect of the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the method described in the first aspect and various possible designs of the first aspect.
[0074] The technical solution of this application has the following advantages:
[0075] The present application provides an application performance optimization method, device, electronic device and storage medium, the method comprising: after migrating several container units involved in the migration application from the original node to the target node, obtaining the original configuration information of the migration application at the original node and the migration configuration information at the target node; determining the original performance index of the migration application according to the original configuration information of the migration application; determining the migration performance index of the migration application according to the migration configuration information of the migration application; determining the performance optimization strategy of the migration application according to the original performance index and the migration performance index; optimizing the container unit configuration of the target node according to the performance optimization strategy of the migration application to optimize the performance of the migration application at the target node. The method provided by the above scheme compares the performance indexes of the migration application before and after migration, and optimizes the container unit configuration of the target node when it is determined that the performance index has decreased, so that the performance of the migration to the target node is as good as possible not lower than the performance before migration, thereby ensuring the smooth operation of the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technical descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.
[0077] Figure 1 This is a schematic diagram of the pod allocation results for nodes in different traditional architectures;
[0078] Figure 2 A schematic diagram of the structure of the application performance optimization system based on the embodiment of the present application;
[0079] Figure 3 A flowchart of an application performance optimization method provided in an embodiment of the present application;
[0080] Figure 4 A flow chart of an application performance optimization method based on a horizontal expansion strategy provided in an embodiment of the present application;
[0081] Figure 5 A flowchart of an application performance optimization method based on a vertical expansion strategy provided in an embodiment of the present application;
[0082] Figure 6 A schematic diagram of the structure of the application performance optimization system provided in the embodiment of the present application;
[0083] Figure 7 A schematic diagram of the structure of the tool module provided in the embodiment of the present application;
[0084] Figure 8 A schematic diagram of the use process of the computing power evaluation tool provided in the embodiment of the present application;
[0085] Fig. 9 A schematic diagram of the structure of an application performance optimization device provided in an embodiment of the present application;
[0086] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0087] The above drawings have shown clear embodiments of the present application, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0088] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are 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 creative work are within the scope of protection of this application.
[0089] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following embodiments, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0090] In related technologies, Kubernetes (k8s) is an open source container cluster management system. Based on Docker technology, it provides a series of complete functions such as deployment and operation, resource scheduling, service discovery and dynamic scaling for containerized applications, which improves the convenience of large-scale container cluster management. Kubernetes is a complete distributed system support platform with complete cluster management capabilities, multi-level security protection and access mechanisms, multi-tenant application support capabilities, transparent service registration and discovery mechanisms, built-in intelligent load balancers, powerful fault detection and self-repair capabilities, service rolling upgrades and online capacity expansion capabilities, scalable resource automatic scheduling mechanisms, and multi-granular resource quota management capabilities. At the same time, Kubernetes provides complete management tools, covering all aspects including development, deployment testing, and operation and maintenance monitoring. As deep learning research gradually lands in various fields, the industry has begun to explore and improve a complete system from data acquisition to model training to model landing, reducing the computing resource cost of model training and shortening the model development cycle. To achieve this goal, major cloud service providers have launched their own deep learning cloud platforms. These deep learning cloud platforms solve the problems of high computing resource costs, lack of a unified resource monitoring system, and the need for algorithm personnel to participate in operation and maintenance (such as building a hardware and software environment) caused by traditional methods of training directly on PCs or servers. At the same time, they are based on k8s unified resource monitoring and scheduling, which greatly improves the resource utilization of the computing center and effectively reduces costs.
[0091] In Kubernetes, a Pod is the smallest schedulable unit, which can contain one or more containers. In the Pod configuration, there are two important fields for defining the resource requirements and limits of the container, namely resources.requests and resources.limits. The resources.requests field is used to define the container's resource requests. It specifies the minimum amount of resources required for the container to be scheduled. Resources can include CPU (computing power) and memory. By setting resources.requests, the Kubernetes scheduler can allocate the Pod to the appropriate node based on these requirements to ensure that the container has enough resources available. For example, you can set the container's CPU request to 500m (indicating 500 millicores) and the memory request to 1Gi (indicating 1GB of memory). The resources.limits field is used to define the container's resource limits. It specifies the upper limit of resources that the container can use. Resource limits help protect other containers in the cluster from excessive resource use by a container. If a container exceeds the set limit, Kubernetes will limit it and may terminate the container. Similar to resources.requests, resources.limits can also set CPU and memory limits. For example, you can set a container's CPU limit to 1 core and memory limit to 2 GB.
[0092] By properly setting resources.requests and resources.limits, you can ensure that the container has enough resources to run and appropriately limit the use of resources, thereby improving the stability and performance of the system. The settings of these fields also play an important role in the resource scheduling and management of the Kubernetes cluster.
[0093] Currently, there are two common CPU architectures in the k8s cluster, namely x86 and arm. There are some performance differences between x86 CPUs (such as Intel and AMD processors) and ARM CPUs (such as ARM architecture processors), but the specific differences depend on the specific processor model, architecture design, and application scenario. The following are some general performance differences:
[0094] Instruction set architecture: x86 CPU uses complex instruction set (CISC), while ARM CPU uses reduced instruction set (RISC). Since the complex instruction set performs more instruction operations, the x86 CPU may have higher performance than the ARM CPU on some tasks.
[0095] Single-core performance: In general, the single-core performance of x86 CPUs is relatively high. This is because x86 CPUs have historically focused on improving single-core performance, especially in the desktop and server fields. ARM CPUs focus more on power efficiency and multi-core performance.
[0096] Multi-core performance: As the ARM architecture is widely used in mobile devices and embedded fields, its design pays more attention to power consumption and multi-core processing capabilities. ARM CPUs usually perform well in multi-core configurations and are particularly suitable for highly parallelized workloads such as distributed computing in the server field.
[0097] Energy efficiency: ARM CPUs generally perform well in terms of power efficiency, which makes them widely used in portable devices, the Internet of Things, and embedded systems. Relatively speaking, x86 CPUs consume more power and are suitable for scenarios that require higher performance, such as desktop computing and servers.
[0098] For a k8s cluster, a cluster may contain nodes with multiple CPU specifications. Applications can be migrated between nodes of different architectures by building manifest images, but the request and limit specifications of the application pod will not change. Therefore, when a pod is migrated to a node with a different CPU architecture or a different CPU model, it will apply for CPU resources of the same specification. For two nodes with a large difference in CPU computing power, this will lead to different application performance in the pod, which will ultimately bring risks during application runtime.
[0099] At the same time, for cpu resources, k8s will only schedule according to the number of cpu cores reported by the node, and cannot consider the difference in computing power caused by the difference in cpu models. From the node perspective, the actual number of businesses that nodes with the same number of cores can support will also be different. For example, the arm architecture often has more cpu cores, but the single-core computing power is lower than the x86 architecture. However, k8s only schedules according to the number of cores, resulting in too many pods on the arm architecture node, but the actual node computing power is not enough to support twice the pods, which ultimately causes abnormal situations such as application freezes.
[0100] like Figure 1The figure shows the pod allocation results of traditional nodes with different architectures. The two nodes use the 64-core x86 architecture and the 128-core arm architecture respectively. Since the x86 architecture has fewer cores, 16 pods corresponding to applications that apply for 4-core CPUs are generally deployed for it. Since the arm architecture has more cores, 32 pods corresponding to applications that apply for 4-core CPUs are generally deployed for it. However, the performance of the 4-core arm cpu is about 40% of that of the intel x86, and the actual computing power of the 128-core is equivalent to 120% of the 64-core x86; but in the view of k8s, the computing power is equivalent to 200% of the x86 cpu, which leads to the jamming of applications deployed on the arm architecture node, reducing the performance of the application.
[0101] In response to the above problems, the embodiments of the present application provide an application performance optimization method, device, electronic device and storage medium, the method comprising: after migrating several container units involved in the migration application from the original node to the target node, obtaining the original configuration information of the migration application at the original node and the migration configuration information at the target node; determining the original performance index of the migration application according to the original configuration information of the migration application; determining the migration performance index of the migration application according to the migration configuration information of the migration application; determining the performance optimization strategy of the migration application according to the original performance index and the migration performance index; optimizing the container unit configuration of the target node according to the performance optimization strategy of the migration application to optimize the performance of the migration application at the target node. The method provided by the above scheme compares the performance indexes of the migration application before and after migration, and optimizes the container unit configuration of the target node when it is determined that the performance index has decreased, so that the performance of the migration to the target node is as good as possible not lower than the performance before migration, thereby ensuring the smooth operation of the application.
[0102] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0103] First, the structure of the application performance optimization system on which this application is based is described:
[0104] The application performance optimization method, device, electronic device, and storage medium provided in the embodiments of the present application are suitable for optimizing the performance of applications migrated across architectures. Figure 2 As shown, it is a schematic diagram of the structure of the application performance optimization system based on the embodiment of the present application, which mainly includes a container cluster composed of different architecture nodes and an application performance optimization device. Specifically, when any application is migrated from an x86 architecture node in the container cluster to an arm node, the application performance optimization device is used to optimize the performance of the migrated application so that the performance of the application migrated to the arm node is as good as possible.
[0105] The embodiment of the present application provides an application performance optimization method for optimizing the performance of applications migrated across architectures. The execution subject of the embodiment of the present application is an electronic device, such as a server, a desktop computer, a laptop computer, a tablet computer, and other electronic devices that can be used to optimize the performance of applications migrated across architectures.
[0106] like Figure 3 FIG. 1 is a flow chart of an application performance optimization method provided in an embodiment of the present application, the method comprising:
[0107] Step 301 : after migrating several container units involved in the migrated application from the original node to the target node, obtaining the original configuration information of the migrated application on the original node and the migration configuration information on the target node.
[0108] The original configuration information and the migration configuration information both include at least the number of CPU cores and the memory size.
[0109] Step 302: determining original performance indicators of the migrated application according to original configuration information of the migrated application.
[0110] Specifically, the performance requirements of the migration application may be determined according to the business scenario of the migration application, and then the original performance indicators matching the performance requirements of the migration application may be determined according to the original configuration information of the migration application.
[0111] Among them, the test indicators of migration applications include throughput, latency, and business response efficiency.
[0112] Step 303: Determine the migration performance index of the migration application according to the migration configuration information of the migration application.
[0113] The migration performance index and the original performance index are calculated in the same way. The purpose of calculating the migration performance index is to analyze whether the performance of the migrated application is reduced and the extent of the reduction after being migrated to the target node by comparing the migration performance index with the original performance index.
[0114] Step 304: Determine a performance optimization strategy for the migrated application based on the original performance indicator and the migrated performance indicator.
[0115] Specifically, by comparing the original performance indicators with the migration performance indicators and combining the performance attributes of the migrated application, a performance optimization strategy that can improve the migration performance indicators of the migrated application can be formulated.
[0116] Step 305 : Optimize the container unit configuration of the target node according to the performance optimization strategy of the migrated application to optimize the performance of the migrated application on the target node.
[0117] Specifically, you can optimize the container unit configuration of the target node by increasing the number of pods (container units) or adjusting resource limits (resources.limits) on the target node, thereby improving the performance of the migrated application on the target node.
[0118] On the basis of the above embodiments, in order to adapt to different migration applications due to the diversity of current application services and to improve the universality of the method provided in the embodiments of the present application, as an implementable manner, in one embodiment, according to the original configuration information of the migration application, the original performance index of the migration application is determined, including:
[0119] Step 3021, calling the target computing power evaluation tool from the preset tool library;
[0120] Step 3022, based on the target computing power evaluation tool and according to the original configuration information of the migrated application, determine the original performance indicators of the migrated application.
[0121] Specifically, in one embodiment, in order to ensure the reliability of the comparison results between the migration performance indicators and the original performance indicators, the same computing power evaluation tool can be used to calculate the migration performance indicators and the original performance indicators, that is, based on the target computing power evaluation tool, the migration performance indicators of the migration application can be determined according to the migration configuration information of the migration application.
[0122] It should be noted that the preset tool library includes a variety of computing power evaluation tools that can meet the needs of various applications, such as the first tool (ycsb tool), the second tool (iperf tool), the third tool (jmeter tool) and custom tools. Each tool is based on the original configuration information and migration configuration information of the migration application, and performs corresponding performance tests on the migration application to obtain original performance indicators and migration performance indicators.
[0123] Among them, the first tool measures the performance of the migration application by simulating concurrent requests and data operations to measure the performance indicators of the migration application under different workloads, such as throughput and latency. The testing principle of the second tool is to install and run the server and client of the second tool in the container. The server configures the second tool to accept connections from the client. The client configures the second tool to connect to the server and specifies the network performance indicators to be tested, such as bandwidth, latency, etc. The third tool is to install the third tool on the test machine (target node). Create a test plan in the third tool, set the test target, number of threads, request type, etc. Add test elements such as HTTP requests, TCP requests, etc. to the test plan. Add a listener to the test plan to collect performance data, such as throughput, response time, etc. Run the test plan in the third tool, simulate concurrent user requests, and perform performance testing on the container application. After the test, analyze the performance data and evaluate the performance indicators of the container application, such as throughput, response time, etc. Custom tools can be developed according to user needs, and the embodiments of this application are not limited.
[0124] Specifically, the performance requirements of the migration application can be determined according to the business scenario of the migration application, and then a target computing power evaluation tool that matches the performance requirements of the migration application can be called from a preset tool library.
[0125] Specifically, in one embodiment, in order to improve the accuracy of each evaluation tool, multiple test items can be set in each test tool to determine multiple original test item scores based on the target computing power evaluation tool and the original configuration information of the migration application; and determine the original performance indicators of the migration application based on the multiple original test item scores.
[0126] Among them, taking the migration application as the data storage application and the target computing power evaluation tool as the ycsb tool as an example, each test item represents a specific operation or scenario, such as reading data, updating data, inserting data, reading data and writing after modification, scanning data, and mixed reading, updating, inserting and scanning operations.
[0127] Specifically, in one embodiment, the original performance index of the migrated application may be determined based on the following formula:
[0128]
[0129] in, Represents the original performance indicators of the migrated application, Indicates the number of test items included in the target computing power evaluation tool. represents the original test item score corresponding to the i-th test item, Represents the preset benchmark score of the i-th test item.
[0130] Accordingly, in one embodiment, based on the target computing power testing tool, multiple migration test item scores can be determined according to the migration configuration information of the migration application; and based on the multiple migration test item scores, the migration performance index of the migration application can be determined.
[0131] Furthermore, in one embodiment, the migration performance index of the migration application is determined based on the following formula:
[0132]
[0133] in, Indicates the migration performance index of the migration application. Indicates the number of test items included in the target computing power evaluation tool. represents the migration test item score corresponding to the j-th test item, Represents the preset benchmark score of the j-th test item.
[0134] The preset benchmark score used to calculate the migration performance index It can actually be equal to the preset benchmark score used when calculating the original performance index. ,Right now The value of the preset benchmark score may be the actual performance measurement result before application migration.
[0135] Based on the above embodiment, as an implementable manner, in one embodiment, a performance optimization strategy for a migrated application is determined according to the original performance index and the migrated performance index, including:
[0136] Step 3041, judging whether the migrated application has a performance optimization requirement according to the difference between the original performance indicator and the migrated performance indicator;
[0137] Step 3042: when it is determined that the migrated application has a performance optimization requirement, obtain attribute information of the migrated application;
[0138] Step 3043: Determine a performance optimization strategy for the migrated application according to the performance optimization logic represented by the attribute information of the migrated application.
[0139] Specifically, the degree of performance degradation of the migrated application after it is migrated to the target node can be determined based on the gap between the original performance indicator and the migration performance indicator, and then based on the degree of performance degradation, it can be judged whether the current performance of the migrated application is close to the performance before migration. If so, there is no need for performance optimization, otherwise, there is a need for performance optimization.
[0140] Specifically, in one embodiment, when it is determined that the migration application is of a horizontal expansion type based on the performance optimization logic represented by the attribute information of the migration application, the horizontal expansion strategy is used as the performance optimization strategy for the migration application; when it is determined that the migration application is of a vertical expansion type based on the performance optimization logic represented by the attribute information of the migration application, the vertical expansion strategy is used as the performance optimization strategy for the migration application.
[0141] It should be noted that if the attribute information of the migration application indicates that the performance of the migration application can be improved by increasing the number of replicas, that is, the migration application is a horizontal expansion type application with multiple modules running independently, such as stateless load applications such as tomcat, then the horizontal expansion strategy is used as the performance optimization strategy for the migration application. If the migration application cannot expand replicas at will, but the performance can be improved by expanding the CPU / memory supply, such as stateful cluster applications such as redis and etcd or single scientific computing applications such as unixbench, then the vertical expansion strategy is used as the performance optimization strategy for the migration application.
[0142] Specifically, in one embodiment, if Figure 4 As shown, it is a flow chart of the application performance optimization method based on the horizontal expansion strategy provided in an embodiment of the present application. When the performance optimization strategy of the migration application is the horizontal expansion strategy, the number of copies of the migration application is increased according to the preset copy increase step, and the process returns to the step of determining the migration performance index of the migration application according to the migration configuration information of the migration application; judging whether the migration performance index of the migration application is improved; when it is determined that the migration performance index of the migration application is improved, judging whether the migration application has a performance optimization requirement based on the gap between the original performance index and the migration performance index; when it is determined that the migration application has no performance optimization requirement, the number of copies of the migration application after the increase is used as the target number of copies; and determining the target number of container units of the target node based on the target number of copies to optimize the container unit configuration of the target node.
[0143] Specifically, first, the horizontal expansion strategy is set as the performance optimization strategy of the migration application, and then based on the target computing power evaluation tool, according to the original configuration information of the migration application, the original performance index of the migration application is determined, and then the cross-architecture migration of the migration application is performed. After the migration is completed, the migration performance index of the migration application is calculated again, and by comparing the migration performance index with the original performance index, it is determined whether the migration performance index reaches 90% of the original performance index. If so, it is determined that the migration application has no performance optimization requirements, and the current container unit configuration on the target node can achieve application computing power equivalence. Otherwise, it is determined that the migration application has performance optimization requirements, and then according to the preset replica increase step, the number of replicas of the migration application is increased, such as adjusting the number of application replicas +1 each round, and repeatedly calculating the migration performance index. If the migration performance index is improved after the number of replicas is increased, the migration performance index is further compared with the original performance index. If the migration performance index reaches 90% of the original performance index, it is determined that the migration application has no performance optimization requirements, so the number of replicas after the migration application is increased is used as the target number of replicas. Finally, according to the target number of replicas and the initial number of replicas, the corresponding number of target container units is increased to determine the target number of container units of the target node.
[0144] Accordingly, in one embodiment, when it is determined that the migration performance index of the migration application has not been improved, it is determined that the migration performance index of the migration application has reached an upper limit; and the number of replicas of the migration application before the increase is used as the target number of replicas.
[0145] Specifically, if the migration performance index of the migration application does not improve after increasing the number of copies, it means that the migration performance index of the migration application at the target node has reached the upper limit. Therefore, the number of copies after the previous round of increase, that is, the number of copies before this round of increase, can be used as the target number of copies.
[0146] Accordingly, in one embodiment, when it is determined that the migration application has a performance optimization requirement, the process returns to the step of increasing the number of replicas of the migration application according to the preset replica increase step.
[0147] Specifically, if the migration performance index is improved by increasing the number of replicas of the migration application, but after comparing with the original performance index, it is determined that there is still a need for performance optimization, the next round of increasing the number of replicas is entered, that is, returning to the step of increasing the number of replicas of the migration application according to the preset replica increase step.
[0148] Specifically, in one embodiment, if Figure 5As shown, it is a flow chart of the application performance optimization method based on the vertical expansion strategy provided in an embodiment of the present application. When the performance optimization strategy of the migration application is the vertical expansion strategy, the computing power resource allocation value of the migration application is increased according to the preset resource increase step, and the process returns to the step of determining the migration performance index of the migration application according to the migration configuration information of the migration application; judging whether the migration performance index of the migration application is improved; when it is determined that the migration performance index of the migration application is improved, judging whether the migration application has a performance optimization requirement based on the gap between the original performance index and the migration performance index; when it is determined that the migration application has no performance optimization requirement, the computing power resource allocation value after the increase of the migration application is used as the target computing power resource allocation value; and optimizing the container unit configuration of the target node according to the target computing power resource allocation value.
[0149] Specifically, first set the vertical expansion strategy as the performance optimization strategy for the migrated application, then determine the original performance indicators of the migrated application based on the target computing power evaluation tool and the original configuration information of the migrated application, and then perform cross-architecture migration of the migrated application. After the migration is completed, calculate the migration performance indicators of the migrated application, and determine whether the migration performance indicators reach 90% of the original performance indicators by comparing the migration performance indicators with the original performance indicators. If so, it is determined that the migrated application has no performance optimization requirements, and the current container unit configuration at the target node can achieve application computing power equivalence. Otherwise, it is determined that the migrated application has performance optimization requirements, and further determines whether the migrated application has computing power resource limitations at the target node. If there are computing power resource limitations, then increase the computing power resource allocation value of the migrated application according to the preset resource increase step, such as adjusting the computing power resource allocation value by +1 each round, and repeatedly calculate the migration performance index. If the migration performance index is improved after the computing power resource allocation value is increased, then further compare the migration performance index with the original performance index. If the migration performance index reaches 90% of the original performance index, it is determined that the migrated application has no performance optimization requirements. Therefore, the computing power resource allocation value after the migration application is increased is used as the target computing power resource allocation value. Finally, according to the target computing power resource allocation value, optimize the container unit configuration of the target node.
[0150] The computing power resource allocation value specifically refers to the upper limit of the number of CPU cores represented by the computing power resource limitation.
[0151] Accordingly, in one embodiment, when it is determined that the migration performance index of the migration application has not improved, the memory resource allocation value of the migration application is increased according to the preset memory increase step, and the process returns to the step of determining the migration performance index of the migration application according to the migration configuration information of the migration application; when it is determined that the migration performance index of the migration application has still not improved, it is determined that the migration performance index of the migration application has reached the upper limit; and the computing power resource allocation value before the increase of the migration application is used as the target computing power resource allocation value.
[0152] Specifically, when it is determined that the migration performance index of the migrated application has not been improved, or when the migrated application has no computing power resource restrictions on the target node, it can be further determined that the migrated application has no memory resource restrictions on the target node. If so, the memory resource allocation value of the migrated application is increased according to the preset memory increase step size, and the migration performance index is re-determined. If the migration performance index of the migrated application still has not been improved, it is determined that the migration performance index of the migrated application has reached the upper limit; the computing power resource allocation value before the migration application is increased is used as the target computing power resource allocation value, and the memory resource allocation value uses the value before adjustment. Among them, the memory resource allocation value is the memory upper limit value represented by the memory resource restriction.
[0153] Accordingly, in one embodiment, if the migration performance index of the migrated application is improved after increasing the memory resource allocation value of the migrated application, a step of determining whether the migrated application has a performance optimization requirement is performed based on the gap between the original performance index and the migrated performance index.
[0154] Specifically, if the migration performance index of the migrated application is improved by increasing the memory resource allocation value of the migrated application, then by further comparing the original performance index with the migrated performance index, it is determined whether the migrated application has a performance optimization requirement.
[0155] Accordingly, in one embodiment, when it is determined that the migration application has a performance optimization requirement, the step returns to the preset resource increase step size to increase the computing resource allocation value of the migration application, or returns to the step of increasing the memory resource allocation value of the migration application according to the preset memory increase step size.
[0156] On the contrary, if there is no performance optimization requirement, that is, the migration performance index reaches 90% of the original performance index, the current memory resource allocation value is used as the target memory resource allocation value, and the current computing power resource allocation value is used as the target computing power resource allocation value. That is, it is considered that according to this resource configuration, the migrated application can achieve computing power equivalence on the target node.
[0157] For example, Figure 6As shown, it is a structural diagram of the application performance optimization system provided by an embodiment of the present application, and the system includes a k8s one-cloud multi-core cluster composed of several x86 architecture nodes and arm architecture nodes, a tool module including a preset tool library, and a computing power tuning framework. The computing power tuning framework includes horizontal expansion strategies and vertical expansion strategies. After determining the performance optimization strategy of the migrated application, the computing power tuning framework implements the computing power evaluation of the migrated application by calling the target computing power test tool in the preset tool library to determine the original performance indicators and the migration performance indicators, and stores the obtained original performance indicators and the migration performance indicators as application computing power labels to the container service node, so that the subsequent computing power tuning framework can read when adjusting the configuration of the migrated application. Among them, the container service node is the service node in the k8s one-cloud multi-core cluster, and the service is a public resource of the k8s cluster, which is convenient for the computing power tuning framework to read.
[0158] Specifically, Figure 7 As shown, it is a schematic diagram of the structure of the tool module provided in the embodiment of the present application, and the tool includes a metadata management unit, a preset tool library and a script management unit. Among them, the main logic of the metadata management unit is to realize the management of evaluation tools, evaluation targets and k8s call library, and it can also normalize the relationship management between scripts and target applications to be evaluated; support users to register new evaluation tool call script commands, target cluster connection information, target application connection information, etc.; support calling k8s interfaces to add labels, annotations and other content. The target cluster connection information represents the connection relationship between the nodes in the cluster, and the target application connection information represents the pod association relationship of the application in the target node to represent the corresponding relationship between the application and the pod. The preset tool library is mainly responsible for maintaining the entities of various computing power evaluation tools, supports formats such as container images or binaries, and provides operations such as upload, download, delete, and update of computing power evaluation tools. The script management unit is mainly responsible for maintaining the scripts that match the computing power evaluation tools. Because the startup parameters and output formats of the evaluation tools are not unified, each evaluation tool requires a matching script. This module mainly implements the management of the matching scripts, including upload, download, delete, update and other operations.
[0159] For the script management unit, the management of supporting scripts includes unified packaging of the input of the evaluation tool. The input format supports the input of the evaluation tool call command registered in the metadata management module in string format, and the output of the evaluation tool is uniformly packaged, requiring the output result to be normalized into a digital value, which is used to reflect the current performance status of the application. That is, the script directly input by the user can be normalized based on the script management unit, so that the command finally input into the evaluation tool meets the requirements of the evaluation tool. Accordingly, the data output by the evaluation tool is normalized into a numerical form, that is, the numerical value of the output performance indicator.
[0160] Specifically, Figure 8 As shown, it is a schematic diagram of the use process of the computing power evaluation tool provided in the embodiment of the present application. The use process includes a preparation stage and a use stage. The preparation stage includes uploading the computing power evaluation tool to the preset tool library and uploading the computing power evaluation tool script to the script management unit. When the computing power evaluation tool is selected as the target computing power evaluation tool, it enters the use stage. At the use node, first register the migration application information, which is the original configuration information and migration configuration information of the migration application. Then associate the migration application and the computing power evaluation tool, call the script based on the script management unit to perform computing power evaluation, obtain the original performance index and the migration performance index, and finally attach the obtained computing power evaluation score (original performance index and migration performance index) as a label to the migration application, that is, record it to the container service node.
[0161] The application performance optimization method provided by the embodiment of the present application obtains the original configuration information of the migrated application at the original node and the migration configuration information at the target node after migrating several container units involved in the migrated application from the original node to the target node; determines the original performance index of the migrated application according to the original configuration information of the migrated application; determines the migration performance index of the migrated application according to the migration configuration information of the migrated application; determines the performance optimization strategy of the migrated application according to the original performance index and the migration performance index; optimizes the container unit configuration of the target node according to the performance optimization strategy of the migrated application to optimize the performance of the migrated application at the target node. The method provided by the above scheme compares the performance index of the migrated application before and after migration, and optimizes the container unit configuration of the target node when it is determined that the performance index has decreased, so that the performance migrated to the target node is as good as possible. The performance is not lower than the performance before migration, thereby ensuring the smooth operation of the application. In addition, by designing a computing power evaluation tool framework, users are supported to quickly integrate new evaluation tools and scripts; the script integration specification of the computing power evaluation tool is designed, the main content of which is to support users to register startup parameters and support the normalization of the output of the measurement tool to a numerical value, further improving the universality of the application performance optimization method provided in the embodiment of the present application, and facilitating users to use and expand the preset tool library. The method provided in the embodiment of the present application is applied to the equivalent optimization of computing power in a one-cloud multi-core scenario to ensure the smooth operation of the application. In the current scenario where the chip supply chain is unstable and multiple models and multi-architecture CPUs coexist, it has great practical value.
[0162] An embodiment of the present application provides an application performance optimization device for executing the application performance optimization method provided in the above embodiment.
[0163] like Fig. 9, which is a schematic diagram of the structure of an application performance optimization device provided in an embodiment of the present application. The application performance optimization device 90 comprises: an acquisition module 901 , a first determination module 902 , a second determination module 903 , a strategy module 904 and an optimization module 905 .
[0164] Among them, the acquisition module is used to obtain the original configuration information of the migration application on the original node and the migration configuration information on the target node after migrating several container units involved in the migration application from the original node to the target node; the first determination module is used to determine the original performance index of the migration application based on the original configuration information of the migration application; the second determination module is used to determine the migration performance index of the migration application based on the migration configuration information of the migration application; the strategy module is used to determine the performance optimization strategy of the migration application based on the original performance index and the migration performance index; the optimization module is used to optimize the container unit configuration of the target node according to the performance optimization strategy of the migration application, so as to optimize the performance of the migration application on the target node.
[0165] Regarding the application performance optimization device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0166] The application performance optimization device provided in the embodiment of the present application is used to execute the application performance optimization method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0167] An embodiment of the present application provides an electronic device for executing the application performance optimization method provided in the above embodiment.
[0168] like Fig.10 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 100 includes: at least one processor 1001 and a memory 1002.
[0169] The memory stores computer-executable instructions; at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the application performance optimization method provided in the above embodiment.
[0170] The electronic device provided in the embodiment of the present application is used to execute the application performance optimization method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0171] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, an application performance optimization method provided in any of the above embodiments is implemented.
[0172] The storage medium containing computer executable instructions provided in the embodiment of the present application can be used to store computer executable instructions of the application performance optimization method provided in the aforementioned embodiment. Its implementation method and principle are the same and will not be repeated here.
[0173] An embodiment of the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the application performance optimization method provided in the aforementioned embodiment.
[0174] The embodiments of the present application provide a computer program product that can be used to execute computer instructions of the application performance optimization method provided in the aforementioned embodiments. The implementation method and principle are the same and will not be repeated here.
[0175] A part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0176] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0177] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for optimizing application performance, characterized in that: include: After migrating several container units involved in the migrated application from the original node to the target node, obtaining original configuration information of the migrated application at the original node and migration configuration information at the target node; Determining original performance indicators of the migrated application according to original configuration information of the migrated application; Determining a migration performance indicator of the migration application according to the migration configuration information of the migration application; Determining a performance optimization strategy for the migrated application based on the original performance indicator and the migrated performance indicator; Optimizing the container unit configuration of the target node according to the performance optimization strategy of the migration application to optimize the performance of the migration application on the target node; Optimizing the container unit configuration of the target node according to the performance optimization strategy of the migrated application to optimize the performance of the migrated application on the target node includes: In the case where the performance optimization strategy of the migration application is a vertical expansion strategy, increasing the computing resource allocation value of the migration application according to a preset resource increase step, and returning to the step of determining the migration performance index of the migration application according to the migration configuration information of the migration application; Determining whether the migration performance index of the migration application is improved; When it is determined that the migration performance index of the migrated application has been improved, judging whether the migrated application has a performance optimization requirement according to the gap between the original performance index and the migrated performance index; When it is determined that the migrated application has no performance optimization requirement, the increased computing resource allocation value of the migrated application is used as the target computing resource allocation value; Optimizing the container unit configuration of the target node according to the target computing power resource allocation value; The step of determining the performance optimization strategy of the migrated application according to the original performance indicator and the migrated performance indicator includes: According to the gap between the original performance indicator and the migration performance indicator, determining whether the migration application has a performance optimization requirement; In the case where it is determined that the migrated application has a performance optimization requirement, obtaining attribute information of the migrated application; A performance optimization strategy for the migration application is determined according to the performance optimization logic represented by the attribute information of the migration application.
2. The application performance optimization method according to claim 1, characterized in that: The determining, according to the original configuration information of the migrated application, the original performance indicator of the migrated application includes: Call the target computing power evaluation tool from the preset tool library; Based on the target computing power evaluation tool, the original performance indicators of the migrated application are determined according to the original configuration information of the migrated application.
3. The application performance optimization method according to claim 2, characterized in that: The step of determining the migration performance index of the migration application according to the migration configuration information of the migration application includes: Based on the target computing power evaluation tool, the migration performance index of the migration application is determined according to the migration configuration information of the migration application.
4. The application performance optimization method according to claim 2, characterized in that: The target computing power evaluation tool is used to determine the original performance index of the migrated application according to the original configuration information of the migrated application, including: Based on the target computing power evaluation tool, and according to the original configuration information of the migrated application, determining scores of multiple original test items; An original performance indicator of the migrated application is determined according to the multiple original test item scores.
5. The application performance optimization method according to claim 4, characterized in that: The determining, according to the scores of the multiple original test items, the original performance index of the migrated application includes: The original performance index of the migration application is determined based on the following formula: in, Represents the original performance indicators of the migrated application, Indicates the number of test items included in the target computing power evaluation tool. represents the original test item score corresponding to the i-th test item, Represents the preset benchmark score of the i-th test item.
6. The application performance optimization method according to claim 3, characterized in that: The step of determining the migration performance index of the migration application based on the target computing power evaluation tool and the migration configuration information of the migration application includes: Based on the target computing power evaluation tool, and according to the migration configuration information of the migration application, determining scores of multiple migration test items; A migration performance index of the migration application is determined according to the scores of the multiple migration test items.
7. The application performance optimization method according to claim 6, characterized in that: The step of determining the migration performance index of the migration application according to the scores of the multiple migration test items includes: The migration performance index of the migration application is determined based on the following formula: in, Indicates the migration performance index of the migration application. Indicates the number of test items included in the target computing power evaluation tool. represents the migration test item score corresponding to the jth test item, Represents the preset benchmark score of the j-th test item.
8. The application performance optimization method according to claim 1, characterized in that: The determining, according to the performance optimization logic represented by the attribute information of the migrated application, a performance optimization strategy of the migrated application includes: According to the performance optimization logic represented by the attribute information of the migration application, if it is determined that the migration application is of a horizontal expansion type, a horizontal expansion strategy is used as the performance optimization strategy of the migration application; When it is determined according to the performance optimization logic represented by the attribute information of the migrated application that the migrated application is of a vertical expansion type, a vertical expansion strategy is used as the performance optimization strategy of the migrated application.
9. The application performance optimization method according to claim 1, characterized in that: Optimizing the container unit configuration of the target node according to the performance optimization strategy of the migrated application to optimize the performance of the migrated application on the target node includes: In the case where the performance optimization strategy of the migration application is a horizontal expansion strategy, the number of copies of the migration application is increased according to a preset copy increase step, and the process returns to the step of determining the migration performance index of the migration application according to the migration configuration information of the migration application; Determining whether the migration performance index of the migration application is improved; When it is determined that the migration performance index of the migrated application has been improved, judging whether the migrated application has a performance optimization requirement according to the gap between the original performance index and the migrated performance index; When it is determined that the migrated application has no performance optimization requirement, the increased number of copies of the migrated application is used as the target number of copies; According to the target number of replicas, the target number of container units of the target node is determined to optimize the container unit configuration of the target node.
10. The application performance optimization method according to claim 9, characterized in that: The method further comprises: In the case where it is determined that the migration performance indicator of the migration application has not been improved, determining that the migration performance indicator of the migration application has reached an upper limit; The number of replicas before the migration application is increased is used as the target number of replicas.
11. The application performance optimization method according to claim 9, characterized in that: The method further comprises: When it is determined that the migration application has a performance optimization requirement, the process returns to the step of increasing the number of copies of the migration application according to the preset copy increase step.
12. The application performance optimization method according to claim 1, characterized in that: The method further comprises: When it is determined that the migration performance index of the migration application has not been improved, the memory resource allocation value of the migration application is increased according to a preset memory increase step, and the process returns to the step of determining the migration performance index of the migration application according to the migration configuration information of the migration application; When it is determined that the migration performance indicator of the migration application still has not been improved, determining that the migration performance indicator of the migration application has reached an upper limit; The computing power resource allocation value before the migration application is increased is used as the target computing power resource allocation value.
13. The application performance optimization method according to claim 12, characterized in that: The method further comprises: If the migration performance index of the migration application is improved after increasing the memory resource allocation value of the migration application, the step of determining whether the migration application has a performance optimization requirement based on the gap between the original performance index and the migration performance index is performed.
14. The application performance optimization method according to claim 13, characterized in that: The method further comprises: When it is determined that the migration application has performance optimization requirements, return to the step of increasing the computing power resource allocation value of the migration application according to the preset resource increase step, or return to the step of increasing the memory resource allocation value of the migration application according to the preset memory increase step.
15. An application performance optimization device, characterized in that: include: An acquisition module, configured to acquire original configuration information of the migrated application at the original node and migration configuration information at the target node after migrating several container units involved in the migrated application from the original node to the target node; A first determination module, configured to determine an original performance indicator of the migrated application according to original configuration information of the migrated application; A second determination module, configured to determine a migration performance indicator of the migration application according to the migration configuration information of the migration application; A strategy module, used to determine a performance optimization strategy for the migrated application based on the original performance indicator and the migrated performance indicator; An optimization module, configured to optimize the container unit configuration of the target node according to the performance optimization strategy of the migration application, so as to optimize the performance of the migration application on the target node; The optimization module is specifically used for: In the case where the performance optimization strategy of the migration application is a vertical expansion strategy, increasing the computing resource allocation value of the migration application according to a preset resource increase step, and returning to execute the second determination module; Determining whether the migration performance index of the migration application is improved; When it is determined that the migration performance index of the migrated application has been improved, judging whether the migrated application has a performance optimization requirement according to the gap between the original performance index and the migrated performance index; When it is determined that the migrated application has no performance optimization requirement, the increased computing resource allocation value of the migrated application is used as the target computing resource allocation value; Optimizing the container unit configuration of the target node according to the target computing power resource allocation value; The policy module is specifically used for: According to the gap between the original performance indicator and the migration performance indicator, determining whether the migration application has a performance optimization requirement; In the case where it is determined that the migrated application has a performance optimization requirement, obtaining attribute information of the migrated application; A performance optimization strategy for the migration application is determined according to the performance optimization logic represented by the attribute information of the migration application.
16. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 14 is implemented.
18. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Container application cross-CPU architecture migration method and device
CN113867923A