Application processing method and related device
By introducing information acquisition, resource recommendation, and migration management modules into the communication system, the resource configuration and migration of the application are adjusted in real time, solving the problem of node performance degradation and achieving performance assurance of second-level response and improved resource utilization.
Patent Information
- Application Number
- PCT/CN2025/113627
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-12
- Filing Date
- 2025-08-08
- Publication Date
- 2026-02-19
AI Technical Summary
When the performance of the function corresponding to the user's business is degraded, the node (server) does not respond in time and cannot reliably guarantee the performance of the function. Existing technical solutions cannot adjust resource configuration in a timely manner, resulting in performance degradation and a long migration process.
By introducing an information acquisition module, a resource recommendation module, a resource adjustment module, and a migration management module into the communication system, resource utilization and performance indicators are monitored in real time. Applications are proactively triggered to migrate to sub-nodes with lower loads, ensuring that performance does not degrade during the migration process. A resource configuration adjustment mechanism with a response time of seconds is adopted.
It ensures timely and effective protection of application performance, reduces resource utilization pressure, improves resource utilization, and ensures the stability and performance of user services.
Smart Images

Figure CN2025113627_19022026_PF_FP_ABST
Abstract
Description
Application processing method and related device
[0001] The present application claims priority to the Chinese Patent Application No. 202411103980.8, filed on August 12, 2024, and entitled "An Application Processing Method and Related Device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] Embodiments of the present application relate to the software field, and in particular to an application processing method and related device. BACKGROUND
[0003] A cloud service provider plays a role of a supplier of cloud resources, manages a huge resource cluster (including multiple nodes), and provides resource selling services to users. A user purchases resources from the cloud service provider to support the running of the user's business. From the perspective of the user, the user is most concerned about the stability and performance of the business.
[0004] However, the node (server) does not respond in time when the performance of the function corresponding to the user's business decreases, and cannot reliably guarantee the performance of the function. SUMMARY
[0005] The present application provides an application processing method and related device, which can timely and effectively guarantee the performance of the application.
[0006] In a first aspect, an application processing method is provided. The method can be executed by a child node (or a child device) or a chip in the child node.
[0007] The application processing method is applied to a first child node in a communication system. The communication system includes a master node and at least two child nodes, the at least two child nodes including the first child node and a second child node, and at least one application program is running on the first child node.
[0008] The application processing method includes the following steps: obtaining a resource utilization of the first child node and a performance indicator of a first application program. The at least one application program includes the first application program. When the resource utilization of the first child node is greater than or equal to a first preset threshold and the performance indicator of the first application program meets a performance degradation condition, a second application program is determined from the at least one application program. A migration request is sent to the master node, the migration request being used to request migration of the second application program, and the migration request including a resource request value of the second application program. Migration confirmation information sent by the master node is received. The migration confirmation information includes identification information of the second child node, and a remaining resource of the second child node is greater than or equal to the resource request value of the second application program.
[0009] The resource of the child node refers to hardware resources of the child node, including computing resources and / or storage resources. The computing resources can be understood as central processing units (CPUs). The storage resources include memories and external storages (also referred to as auxiliary memories), and the memories include random access memories (RAMs). The resource utilization of the child node refers to the utilization of the hardware resources. The first child node can determine to migrate the second application to the second child node based on the migration confirmation information.
[0010] In this solution, whether to actively trigger the migration of the application is determined based on the resource utilization of the first child node and the performance indicator of the application. When the resource utilization of the first child node is greater than or equal to a first preset threshold and the performance indicator of the first application meets the performance degradation condition, the second application is triggered to be migrated to the second child node, so as to reduce the resource utilization pressure of the first child node and timely and effectively guarantee the performance of the application running in the first child node.
[0011] In a possible implementation of the first aspect, the above determining the second application from the at least one application specifically includes the following steps: determining a priority order of the at least one application. The higher the sensitivity of the application to the time delay is, the higher the priority of the application is. Based on the priority order, the at least one application with a low ranking is taken as the second application. When the second application is migrated, the resource utilization of the first child node is less than a second preset threshold.
[0012] In this implementation, the priority order of the application is determined based on the sensitivity to the time delay, and the application with a low sensitivity to the time delay is preferentially migrated as the second application, which can not only reduce the resource utilization pressure of the first child node, but also guarantee the service quality of the user of the application with a high sensitivity to the time delay.
[0013] In a possible implementation of the first aspect, before the resource utilization of the first child node and the performance indicator of the first application are acquired, the above application processing method further includes the following steps: acquiring time delay information of the first application and resource utilization information of the first application. The resource configuration recommendation parameter of the first application is determined based on the time delay information and the resource utilization information. The first application is configured with parameters based on the resource configuration recommendation parameter.
[0014] In this implementation, the resource configuration recommendation parameter of the first application is determined based on the time delay information of the first application and the resource utilization information of the first application, and then the first application is configured with parameters based on the resource configuration recommendation parameter. After the parameter configuration is completed, the first application is run, and then the resource utilization of the first child node and the performance indicator of the first application are acquired.
[0015] The parameter configuration process of other application programs in the first sub-node is the same as the parameter configuration process of the first application program.
[0016] In a possible implementation of the first aspect, the resource utilization information includes a resource usage amount of the first application program. The resource configuration recommendation parameter includes a resource configuration recommendation value of the first application program. The determining of the resource configuration recommendation parameter of the first application program based on the latency information and the resource utilization information specifically includes the following steps: determining first normal distribution information corresponding to the latency information and second normal distribution information corresponding to the resource usage amount. Determining an initial resource configuration recommendation value of the first application program based on the first normal distribution information and the second normal distribution information. Determining the resource configuration recommendation value of the first application program based on the initial resource configuration recommendation value and a resource compensation coefficient of the first application program.
[0017] In the embodiment, the initial resource configuration recommendation value of the first application program can be determined based on the first normal distribution information corresponding to the latency information of the first application program and the second normal distribution information corresponding to the resource usage amount of the first application program, and the resource configuration recommendation value of the first application program can be finally determined in combination of the initial resource configuration recommendation value and the resource compensation coefficient of the first application program. In the embodiment, the resource compensation is performed on the application program according to actual conditions to determine the resource configuration recommendation value of the application program, which not only does not waste the resources of the first sub-node, but also effectively guarantees the performance of the application program and ensures the application program use experience of the user.
[0018] In a possible implementation of the first aspect, the resource configuration recommendation value is a central processing unit (CPU) resource configuration recommendation value. The resource utilization information further includes a total CPU throttling time of the first application program and a throttling frequency of the first application program. The resource configuration recommendation parameter further includes a CPU burst resource configuration recommendation value of the first application program.
[0019] The determining of the resource configuration recommendation parameter of the first application program based on the latency information and the resource utilization information further includes the following steps: determining a first burst resource compensation coefficient based on the total CPU throttling time and the throttling frequency, the first burst resource compensation coefficient being a ratio of the total CPU throttling time to the throttling frequency. Determining a second burst resource compensation coefficient based on the first normal distribution information. Determining the CPU burst resource configuration recommendation value based on the CPU resource configuration recommendation value, the first burst resource compensation coefficient, and the second burst resource compensation coefficient.
[0020] In this embodiment, the first burst resource compensation coefficient is determined based on the CPU throttling information of the first application program, the second burst resource compensation coefficient is determined based on the first normal distribution information corresponding to the time delay information of the first application program, and the CPU burst resource configuration recommendation value of the first application program is determined based on the first burst resource compensation coefficient, the second burst resource compensation coefficient, and the CPU resource configuration recommendation value of the first application program, so as to cope with the CPU throttling situation of the first application program and guarantee the service quality of the first application program.
[0021] In a possible implementation of the first aspect, when the second application program is the first application program, the resource request value of the first application program is obtained based on the resource configuration recommendation value of the first application program and a migration compensation resource value, and the migration compensation resource value is obtained based on the time delay information of the first application program and the resource usage of the first application program.
[0022] In this embodiment, the resource compensation is performed on the time delay caused by the migration of the application program to determine the resource request value of the application program, so as to guarantee the performance of the application program after migration and ensure the application program use experience of the user.
[0023] In a possible implementation of the first aspect, the second child node is determined based on the resource request value of the second application program and the resource utilization information of the child nodes other than the first child node.
[0024] In this embodiment, the second child node is determined based on the resource request value and the resource utilization information of the child nodes other than the first child node, and the second child node is a child node having resources to run the second application program, that is, the remaining resources of the second child node are greater than or equal to the resource request value of the second application program, so as to ensure that the second application program can be reliably run after being migrated.
[0025] In a second aspect, the application further provides an application processing method applied to a master node in a communication system.
[0026] The communication system includes the master node and at least two child nodes, the at least two child nodes include a first child node and a second child node, and at least one application program is run on the first child node.
[0027] The application program processing method comprises the following steps: receiving a migration request sent by a first sub-node, wherein the migration request comprises a resource request value of a second application program, and the at least one application program comprises the second application program; determining a second sub-node from the at least two sub-nodes except the first sub-node in response to the migration request, wherein the remaining resource of the second sub-node is greater than or equal to the resource request value of the second application program; and sending migration confirmation information to the first sub-node, wherein the migration confirmation information comprises identification information of the second sub-node.
[0028] In the scheme, in response to the migration request of the first sub-node, the second sub-node is determined from the at least two sub-nodes except the first sub-node based on the resource request value of the second application program, and the identification information of the second sub-node is returned to the first sub-node, so that the first sub-node knows that the second application program is migrated to the second sub-node; thereby the resource utilization pressure of the first sub-node is relieved, and the performance of the application program running in the first sub-node is effectively ensured in time.
[0029] In a third aspect, the application further provides an application program processing method, which is applied to the communication system.
[0030] The communication system comprises a master node and at least two sub-nodes, the at least two sub-nodes comprise a first sub-node and a second sub-node, and at least one application program runs on the first sub-node.
[0031] The application program processing method comprises the following steps: the first sub-node acquires a resource utilization rate of the first sub-node and a performance index of a first application program, wherein the at least one application program comprises the first application program; when the resource utilization rate is greater than or equal to a first preset threshold value and the performance index satisfies a performance degradation condition, the first sub-node determines a second application program from the at least one application program; the first sub-node sends a migration request to the master node, wherein the migration request is used to request migration of the second application program, and the migration request comprises a resource request value of the second application program; the master node determines a second sub-node from the at least two sub-nodes except the first sub-node in response to the migration request, wherein the remaining resource of the second sub-node is greater than or equal to the resource request value of the second application program; the master node sends migration confirmation information to the first sub-node, wherein the migration confirmation information comprises identification information of the second sub-node; and the first sub-node receives the migration confirmation information.
[0032] In the scheme, the first child node determines whether to trigger migration of the application based on resource utilization of the first child node and performance indicators of the application. When the resource utilization of the first child node is greater than or equal to a first preset threshold, and the performance indicators of the first application meet performance degradation conditions, the first child node sends a migration request to the master node to request migration of the second application. The master node determines the second child node from the child nodes other than the first child node based on a resource request value of the second application, and returns identification information of the second child node to the first child node, so that the first child node knows to migrate the second application to the second child node, thereby reducing the resource utilization pressure of the first child node and timely and effectively guaranteeing the performance of the application running in the first child node.
[0033] In a fourth aspect, the application further provides a communication system, which comprises a master node and at least two child nodes, the at least two child nodes comprising a first child node and a second child node, and at least one application running on the first child node. The first child node is configured to obtain resource utilization of the first child node and performance indicators of the first application, and the at least one application comprises a first application. When the resource utilization is greater than or equal to a first preset threshold, and the performance indicators meet performance degradation conditions, the first child node is further configured to determine a second application from the at least one application. The first child node is further configured to send a migration request to the master node, the migration request being used to request migration of the second application, and the migration request comprising a resource request value of the second application. The master node is configured to determine the second child node from the child nodes other than the first child node in response to the migration request, and the remaining resources of the second child node being greater than or equal to the resource request value of the second application. The master node is further configured to send migration confirmation information to the first child node, the migration confirmation information comprising identification information of the second child node. The first child node is further configured to receive the migration confirmation information.
[0034] In the communication system of the scheme, the first child node determines whether to trigger migration of the application based on resource utilization of the first child node and performance indicators of the application. When the resource utilization of the first child node is greater than or equal to a first preset threshold, and the performance indicators of the first application meet performance degradation conditions, the first child node sends a migration request to the master node to request migration of the second application. The master node determines the second child node from the child nodes other than the first child node based on a resource request value of the second application, and returns identification information of the second child node to the first child node, so that the first child node knows to migrate the second application to the second child node, thereby reducing the resource utilization pressure of the first child node and timely and effectively guaranteeing the performance of the application running in the first child node.
[0035] In a fifth aspect, the present application provides a child node, which comprises a unit or module for executing the application processing method of the first aspect.
[0036] In a sixth aspect, the present application provides a parent node, which comprises a unit or module for executing the application processing method of the second aspect.
[0037] In a seventh aspect, the present application provides a communication device, which comprises a processor and a memory, wherein the processor is connected to the memory, wherein the memory is configured to store program code, and the processor is configured to invoke the program code to execute the application processing method of any one of the first aspect or the second aspect.
[0038] In an eighth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the application processing method of any one of the first aspect or the second aspect.
[0039] In a ninth aspect, the present application provides a computer program product comprising instructions which, when the computer program product is executed on a computer, cause the computer to execute the application processing method of any one of the first aspect or the second aspect.
[0040] In a tenth aspect, the present application provides a chip, which comprises a processor and a data interface, and the processor reads instructions stored on a memory through the data interface to execute the application processing method of any one of the first aspect or the second aspect.
[0041] Optionally, as an implementation manner, the chip can further comprise a memory, and the memory stores instructions, and the processor is configured to execute the instructions stored on the memory, and when the instructions are executed, the processor is configured to execute the application processing method of any one of the first aspect or the second aspect. BRIEF DESCRIPTION OF DRAWINGS
[0042] The drawings used in the embodiments of the present application are described as follows.
[0043] FIG. 1A is a flowchart of a vertical elastic scaling technology provided by an embodiment of the present application;
[0044] FIG. 1B is a flowchart of a cluster node load balancing technology provided by an embodiment of the present application;
[0045] FIG. 2A is a schematic diagram of a system architecture of an application processing method provided by an embodiment of the present application;
[0046] FIG. 2B is a schematic diagram of another system architecture of an application processing method provided by an embodiment of the present application;
[0047] FIG. 2C is a schematic diagram of an implementation of an application processing method according to an embodiment of the present application;
[0048] FIG. 3 is a flowchart of an application processing method according to an embodiment of the present application;
[0049] FIG. 4A is a detailed flowchart of an application processing method according to an embodiment of the present application;
[0050] FIG. 4B is a flowchart of resource recommendation adjustment of a function according to an embodiment of the present application;
[0051] FIG. 4C is a normal distribution diagram of resource usage of a function instance according to an embodiment of the present application;
[0052] FIG. 4D is a normal distribution diagram of end-to-end execution time of a function instance in different time windows according to an embodiment of the present application;
[0053] FIG. 4E is a flowchart of function migration according to an embodiment of the present application;
[0054] FIG. 4F is a flowchart of determining resource configuration recommendation parameters according to an embodiment of the present application;
[0055] FIG. 4G is a diagram of a calculation example of a second burst resource compensation coefficient according to an embodiment of the present application;
[0056] FIG. 5 is a schematic diagram of a structure of a child node according to an embodiment of the present application;
[0057] FIG. 6 is a schematic diagram of a structure of a master node according to an embodiment of the present application;
[0058] FIG. 7 is a schematic diagram of a structure of a communication device according to an embodiment of the present application. DETAILED DESCRIPTION
[0059] The technical solutions in the present application will be described below with reference to the accompanying drawings.
[0060] In the embodiments of the present application, the words “exemplary” or “for example” are used to mean serving as an example, instance, or illustration. Any embodiment or design solution described as “exemplary” or “for example” in the present application should not be interpreted as being better or superior to other embodiments or design solutions. Rather, the word “exemplary” or “for example” is used to illustrate and / or describe at least one embodiment or design solution. In the present application, the words “exemplary” and “for example” are used interchangeably with each other.
[0061] The "at least one" mentioned in the embodiments of the present application refers to one or more, and "multiple" refers to two or more. "At least one of the following" or the like refers to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean: a, b, c, (a and b), (a and c), (b and c), or (a and b and c), where a, b, and c can be single or multiple. "And / or" describes the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. The sequence numbers (such as step S1, step S21, etc.) of the steps of the embodiments of the present application are only used to distinguish different steps, and do not limit the execution order between the steps.
[0062] In addition, unless otherwise stated, the ordinal numbers "first", "second", etc. used in the embodiments of the present application are used to distinguish a plurality of objects, and are not used to limit the order, time sequence, priority or importance of the plurality of objects. For example, the first device and the second device are only for ease of description, and do not mean that the structures, importance, etc. of the first device and the second device are different. In some embodiments, the first device and the second device can also be the same device.
[0063] In the above embodiments, the term "when" can be interpreted as meaning "if" or "after" or "in response to determining" or "in response to detecting" depending on the context. The above is only an optional embodiment of the present application and does not limit the present application. Any modification, equivalent replacement, improvement, etc. within the concept and principle of the present application should be included in the protection scope of the present application.
[0064] For ease of understanding, the related concepts related to the related terms involved in the embodiments of the present application are introduced as follows.
[0065] (1) Container orchestration engine (Kubernetes, K8s)
[0066] K8s is an open source that is used to manage containerized applications on multiple hosts in a cloud platform. The goal of K8s is to make it simple and efficient to deploy containerized applications. K8s provides a mechanism for application deployment, planning, updating, and maintenance.
[0067] And the pod is the smallest deployable computing unit (software level) created and managed in K8s, which is a combination of one or more containers, each of which runs an application instance.
[0068] (2), Functions
[0069] Functions refer to user business code running in the cloud platform system, and are pre-defined function blocks (composed of code).
[0070] (3), Function Instance
[0071] Function instance refers to the Pod (carrier) where the user business code runs.
[0072] (4), Resources
[0073] In the embodiments of the present application, the resources of the device refer to the hardware resources of the device, and the hardware resources include computing resources and / or storage resources. The computing resources can be understood as Central Processing Unit (CPU) resources; and the storage resources include Memory (MEM) resources and external storage (also known as auxiliary storage) resources, and the memory includes Random Access Memory (RAM).
[0074] The resource utilization of the device refers to the utilization of the hardware resources. For example, the resource utilization takes the CPU utilization as an example. Assuming that the device has 16 CPUs, and only 8 CPUs are used at this time, the CPU utilization of the device is 50%.
[0075] (5), Resource Adjustment
[0076] In the embodiments of the present application, the resource adjustment refers to adjusting the size of the hardware resources occupied by the application program.
[0077] (6), Load Balancing / Application Migration
[0078] The application program is migrated from one node (or device) to another node to achieve load balancing.
[0079] (7), CPU Burst Elastic Throttling
[0080] If the container in the Pod sets a CPU limit (Limit) value, the CPU usage of the container will be limited within the Limit value, forming a throttling of the CPU. Frequent CPU throttling will affect the business performance and increase the long tail response delay of the business.
[0081] Therefore, the CPU Burst provides a flexible throttling mechanism that can temporarily break through the CPU Limit value to reduce the long tail response time of the service. The principle is that when the service has remaining CPU quota in each CPU scheduling period, the system accumulates (or buffers) these CPU quotas, and in the subsequent scheduling period, if it needs to break through the CPU Limit, the previously accumulated CPU quotas are used to achieve the effect of breaking through the CPU Limit.
[0082] The cloud service provider plays the role of a supplier of cloud resources, manages a large cluster of resources (including multiple nodes or devices), and provides resource selling services to users. Improving the utilization rate of cluster resources can effectively save the company's operating costs and has great market value. From the user's perspective, the user is most concerned about the stability and performance of the business when purchasing resources from the cloud service provider to support the operation of their own business.
[0083] The user's business often exhibits the characteristic of having a large fluctuation in load, for example, the number of business requests increases sharply during the day, but sharply decreases at night. Therefore, for the sake of business stability and performance, users often purchase resources that can meet the demand during peak periods. However, this over-provisioning of resources can result in a large amount of idle resources in the cluster during the trough of business requests, resulting in extremely low utilization of cluster resources. Therefore, for both cloud service providers and users, the cost of resource waste is extremely high, and it is urgent to improve the utilization of cluster resources.
[0084] To alleviate the problem of low utilization of cluster resources caused by over-provisioning of user resources, the Vertical Pod Autoscaler (VPA) technology is proposed and applied to cluster resource management. Referring to FIG. 1A, FIG. 1A is a flowchart of a vertical elastic scaling technology according to an embodiment of the present application; this scheme is an elastic scaling technology scheme for unreasonable resource configuration, and the specific steps are as follows:
[0085] (1) The resource collection module periodically collects and stores the resource usage of the function instance, for example, stores it in the memory.
[0086] (2) The VPA module regularly pulls historical resource usage data from the memory.
[0087] (3) A histogram is obtained by using the historical resource usage data, and the resource value of the specified histogram percentile bucket is used as the recommended resource configuration value of the function instance.
[0088] (4) Adjust the resource configuration of the function instance, that is, update the resource configuration of the Pod where the function instance is located to the above-mentioned recommended resource configuration value.
[0089] The scheme of FIG. 1A can effectively implement the dynamic adjustment function instance resource configuration function, release redundant resources for use by other users, ultimately improve the utilization rate of cluster resources, solve the problem of unreasonable user resource configuration, but still has the following deficiencies:
[0090] (1) The demand of application latency performance for resources is not considered, and the application resource cannot be quickly adjusted according to the current request latency, and the tail latency performance of the application cannot be guaranteed.
[0091] (2) It oversells the server resources. When the traffic of the function instance in the server is high, the server resource utilization will correspondingly rise, resulting in resource competition problem, affecting the performance of all user services in the server, and violating the service level target guarantee of user service performance.
[0092] To solve the problems of the scheme of FIG. 1A, a cluster node load balancing technology is proposed. The technology monitors the server load, regularly judges whether the server load exceeds the set threshold. Once the threshold is exceeded, the function instance on the server is migrated to other nodes with relatively low load to relieve the pressure of the high-load server.
[0093] Referring to FIG. 1B, FIG. 1B is a flowchart of a cluster node load balancing technology provided by an embodiment of the present application. The scheme shown in FIG. 1B adds a rescheduling component to balance the load of the cluster nodes to relieve the problem of extremely uneven node load in view of the fact that the elastic scaling technology scheme cannot solve the traffic burst situation. The specific steps are as follows:
[0094] 1. The resource collection module periodically collects the resource usage of the nodes and the function instances, and stores them in the storage.
[0095] 2. The VPA module operates in the same way as described in FIG. 1A.
[0096] 3. The rescheduling module regularly pulls the historical resource utilization data of the nodes and the function instances from the storage.
[0097] 4. The rescheduling module senses the node load and generates a load balancing plan. That is, whether the function instance needs to be migrated is determined according to the current node resource utilization, and the corresponding migration plan is generated.
[0098] 5. The function instance is evicted and migrated according to the migration plan.
[0099] The scheme shown in FIG. 1B can effectively balance the cluster load and relieve the problem of uneven node load affecting user service performance caused by the high-density deployment of function instances by the VPA technology, but the scheme still has the following deficiencies:
[0100] (1) In the load balancing migration process, the original resource size of the function instance is still used as the request resource amount, and the problem of resource over-provisioning still exists, which increases the probability of migration failure and limits the deployment density of the function instance.
[0101] (2) The k8s native function instance eviction scheme is used in the migration process, and the new function instance cannot be pulled up until the function instance eviction is completed, which affects the performance of the function instance.
[0102] (3) The rescheduling process is triggered periodically, and there is a time difference between the decision cycle and the actual load change of the node, which affects the performance of the function instance.
[0103] In summary, the primary technical problem to be solved by the embodiments of the present application is that the node (server) does not respond in time when the performance of the function corresponding to the user business decreases, and cannot reliably guarantee the performance of the function.
[0104] In addition, the technical problems to be solved by the embodiments of the present application are that the function instance migration scheme is not reasonable in resource allocation and the migration time is long, and the performance of the migrated function instance is easily affected. In addition, the resource allocation recommendation scheme has deficiencies, only considering the resource dimension and not considering the function instance performance dimension, which easily leads to the problem of performance degradation of the function instance due to resource limitation.
[0105] Therefore, the embodiments of the present application propose an application processing method to timely and effectively guarantee the performance of the application. In the embodiments of the present application, the application refers to the code for completing the user business function, such as the above-mentioned function or user task, etc. The execution carrier of the function is a Pod, and the execution carrier of the user task is not limited.
[0106] The above-mentioned application processing method is applied to a communication system. The above-mentioned communication system is a master-slave structure, which includes a master node (or a master device) and at least two slave nodes (or slave devices), at least two slave nodes including a first slave node and a second slave node, and at least one application program running on the first slave node.
[0107] Exemplarily, the number of the above-mentioned master nodes can be one or more, generally one of which acts as a master node, and the rest as backup master nodes.
[0108] The embodiments of the present application also provide an application processing method, which can be executed by the slave node in the above-mentioned communication system, or by a chip in the slave node.
[0109] The embodiments of the present application also provide an application processing method, which can be executed by the master node in the above-mentioned communication system, or by a chip in the master node.
[0110] Exemplarily, the above communication system can be applied to a distributed cluster (server cluster) and is a resource management technical solution that takes into account resource utilization and performance; that is, the above communication system includes at least one master node (server) and at least two sub-nodes (servers).
[0111] Exemplarily, the above communication system can also be an Internet of Things (IOT) system; that is, the communication system is a master-slave mode IOT system that includes a master node and at least two slave nodes (sub-nodes). The method of the embodiment of the application can actively migrate user tasks running on the slave nodes, and when the resource utilization of a slave node is relatively high and affects the performance of the user tasks of the slave node, part of the tasks can be actively migrated to other available slave nodes to reduce performance degradation and also not let the resource utilization of the slave node decrease too much.
[0112] Referring to FIG. 2A, FIG. 2A is a schematic diagram of a system architecture of an application processing method provided by an embodiment of the application; the system architecture (software structure) of the application processing method of the embodiment of the application includes an information acquisition module, a resource recommendation module, a resource adjustment module, a migration management module, and a rescheduling module.
[0113] Exemplarily, the information acquisition module, the resource recommendation module, the resource adjustment module, and the migration management module are arranged in each sub-node of the communication system of the embodiment of the application, and at least one application program runs on the sub-node, and the sub-node is exemplified by sub-node 1 and sub-node 2 in FIG. 2A. The rescheduling module is arranged in the master node. Further, the master node can selectively be provided with the information acquisition module, the resource recommendation module, the resource adjustment module, and the migration management module, and in this case, the master node can serve as one of the sub-nodes of the communication system. Among them:
[0114] The information acquisition module is configured to acquire at least one of time delay information of an application program, resource utilization information of the application program, and resource utilization information of a sub-node. Exemplarily, the information acquisition module collects information of the application program and the sub-node to acquire the at least one information.
[0115] The resource recommendation module is configured to determine resource configuration recommendation parameters of the application program based on the time delay information of the application program and the resource utilization information of the application program.
[0116] The resource adjustment module is configured to perform parameter configuration on the application program based on the resource configuration recommendation parameters.
[0117] The migration management module is configured to be responsible for migration management of the application program, to actively trigger migration of the application program, and to ensure that the performance is not degraded during the migration, that is, when the resource utilization of the child node 1 is greater than or equal to a first preset threshold, and the performance index (for example, obtained based on the latency information of the application program) of the first application program of the child node 1 meets the performance degradation condition, a second application program is determined from the application program of the child node 1; and a migration request is sent to the rescheduling module, the migration request being used to request migration of the second application program, and the migration request including the resource request value of the second application program.
[0118] The rescheduling module is configured to receive the migration request sent by the migration management module, and to select a suitable child node for the second application program. As shown in FIG. 2A, the second application program in the child node 1 is migrated to the child node 2 for running.
[0119] Further, the information acquisition module can report the acquired information to the rescheduling module of the master node for use by the rescheduling module. For example, the rescheduling module determines a second child node based on the resource utilization information of the child node and the resource request value of the second application program, the second child node being a migration target child node of the second application program.
[0120] For another example, the rescheduling module can send at least one of the latency information of the application program and the resource utilization information of the application program reported by the child node A to the child node B, so that the child node B can successfully obtain at least one of the latency information of the application program and the resource utilization information of the application program. For example, the latency information of the application program, the child node B can use the received latency information of the application program C of the child node A as the latency information of the application program C in the child node B. In this way, when the child node B cannot temporarily obtain the latency information of the application program C, the child node B can successfully obtain the latency information of the application program C.
[0121] Referring to FIG. 2B, FIG. 2B is a schematic diagram of a system architecture of another application processing method provided by an embodiment of the application. In the embodiment of the application, the child nodes in the communication system are taken as the child node 1 and the child node 2, and the application programs are taken as functions. In addition to obtaining various related information (for example, latency information, resource utilization information, etc.) of the functions themselves and the resource utilization information of the child nodes to realize migration judgment of the functions, the function instances are also carriers of the functions, and thus, various related information of the function instances can also be obtained, and the migration judgment of the functions is performed based on the various related information of the function instances and the resource utilization information of the child nodes. At this time, the function resource adjustment is to adjust the configuration of the function instances, and the function migration is to newly create a function instance on a new child node. Therefore, the functions of the modules in FIG. 2B are as follows:
[0122] The information acquisition module is configured to acquire time delay information of the function instance, resource utilization information of the function instance, and resource utilization information of the child node. For example, the time delay information of the function instance includes execution time delay (i.e., end-to-end execution time) of the function instance and migration duration of the function instance, etc. The resource utilization information of the function instance can be CPU usage or MEM usage, etc.
[0123] The resource recommendation module is configured to determine resource configuration recommendation parameters of the function instance according to the time delay information of the function instance and the resource utilization information of the function instance.
[0124] The resource adjustment module is configured to adjust the resource of the function instance based on the resource configuration recommendation parameters. For example, the cgroups parameters (such as cpu.cfs_quota_us, cpu.shares, cpu.cfs_burst_us, cpu.qos_level, memory.memsw.limit_in_bytes, memory.limit_in_bytes, etc.) of the function instance are adjusted based on the resource configuration recommendation parameters.
[0125] The migration management module is configured to be responsible for migration management of the function instance, to actively trigger migration of the function instance, and to ensure that the performance is not degraded during the migration process. The migration of the function instance is the migration of the function. Specifically, when the resource utilization rate of the child node 1 is greater than or equal to a first preset threshold, and the performance index (e.g., obtained based on the time delay information of the function instance) of the first function instance of the child node 1 meets the performance degradation condition, a second function instance is determined from the function instance of the child node 1; and a migration request is sent to the rescheduling module, the migration request being used to request migration of the second function instance, and the migration request including a resource request value of the second function instance.
[0126] The rescheduling module is configured to receive the migration request sent by the migration management module, and to select a suitable child node for placing the second function instance. As shown in FIG. 2B, the second function instance in the child node 1 is migrated to the child node 2 for running. Specifically, after the second function instance is created in the child node 2, the child node 1 exits the original second function instance.
[0127] The function instance Pod pool is configured to carry the function instance, and includes at least one Pod to run at least one function instance.
[0128] Referring to FIG. 2C, FIG. 2C is a schematic diagram of an implementation form of an application processing method provided by an embodiment of the present application; in the embodiment of the present application, the information acquisition module, the resource recommendation module, the resource adjustment module and the migration management module can be arranged in the resource management component, and the modules are arranged in the same component, so that the information can be quickly transmitted, the response speed of the resource adjustment control of the application can be improved, and the response can be realized in seconds. As an example, the information acquisition module, the resource recommendation module and the resource adjustment module can also be arranged in the resource management component.
[0129] As shown in FIG. 2C, the control plane of the master node is provided with a rescheduling module, and the hardware includes various hardware resources such as CPU, MEM and other resources. Optionally, the master node can be provided with a resource management component.
[0130] The subnode of the communication system takes the first subnode as an example, and the first subnode includes a resource management component and other software and hardware resources such as CPU and MEM.
[0131] As an example, during running, the program code corresponding to the method of the embodiment of the present application runs in the memory of the node (server).
[0132] The application processing method provided by the embodiment of the present application is described in detail below.
[0133] Referring to FIG. 3, FIG. 3 is a flowchart of an application processing method provided by an embodiment of the present application; the application processing method is applied to a communication system, and the communication system includes a master node and at least two subnodes, the at least two subnodes include a first subnode and a second subnode, and at least one application program runs on the first subnode. In the embodiment of the present application, the execution subject of the application processing method takes the first subnode and the master node as an example, and the application processing method includes the following steps:
[0134] 301. The first subnode acquires the resource utilization rate of the first subnode and the performance index of the first application program, and the at least one application program includes the first application program.
[0135] Specifically, the resource of the subnode refers to the hardware resource of the subnode, including the computing resource and / or the storage resource. The computing resource can be understood as the central processing unit CPU resource; and the storage resource includes the memory MEM resource and the external storage resource, and the memory includes the random access memory RAM. Therefore, the resource utilization rate of the subnode refers to the utilization rate of the hardware resource. Taking the CPU resource as an example, assuming that the subnode has 16 CPUs, and only 8 CPUs are used at this time, the CPU utilization rate of the subnode is 50%.
[0136] The performance indicator of the application program is various indicator parameters directly or indirectly representing the program performance of the application program, for example, the performance degradation times of the application program (there are various methods for evaluating the performance degradation, which are not limited) or the error rate of the application program.
[0137] For example, when the application program is a function, the performance indicator of the function can be the performance indicator of the function itself or the performance indicator of the function instance, and the performance of the function is indirectly represented by the performance indicator of the function instance.
[0138] For example, the latency information of the application program can be used to determine the performance degradation times of the application program, which will be described in detail below, and will not be repeated here.
[0139] For example, the first child node can collect the resource utilization information of itself and the latency information of the first application program, to obtain the resource utilization rate of the first child node based on the resource utilization information, and to obtain the performance indicator of the first application program based on the latency information. For another example, the first child node can also obtain the resource utilization rate of the first child node and the performance indicator of the first application program from other devices. The specific method for the first child node to obtain the resource utilization rate of the first child node and the performance indicator of the first application program is not limited.
[0140] 302、When the resource utilization rate is greater than or equal to the first preset threshold value and the performance indicator meets the performance degradation condition, the first child node determines the second application program from the at least one application program.
[0141] Specifically, the specific value of the first preset threshold value can be determined according to the actual situation. Similarly, the performance degradation condition can be set according to the specific situation and the actual situation of the performance indicator, which is not limited.
[0142] When the first child node confirms that the application program needs to be migrated based on the resource utilization rate and the performance indicator, the second application program is determined from the application programs running on the first child node for migration, and the number of the second application programs can be one or more.
[0143] 303、The first child node sends a migration request to the master node, and the migration request is used to request the migration of the second application program, and the migration request includes the resource request value of the second application program.
[0144] Specifically, for each second application program, a corresponding migration request is generated, the application resource size is the resource request value of the second application program, and the migration request is sent to the master node to trigger the migration of the second application program.
[0145] 304、the master node determines a second node from the at least two nodes except the first node based on the resource request value of the second application, wherein the remaining resource of the second node is greater than or equal to the resource request value of the second application.
[0146] Specifically, for each migration request, a second node is determined based on the resource request value.
[0147] 305、the master node sends migration confirmation information to the first node, wherein the migration confirmation information comprises identification information of the second node.
[0148] Specifically, the master node sends the identification information of the second node to the first node to inform the first node to migrate the second application to the second node. Exemplarily, the first node can migrate the second application to the second node in a performance lossless (non-degrading) manner.
[0149] 306、the first node receives the migration confirmation information.
[0150] Specifically, the first node can determine to migrate the second application to the second node based on the migration confirmation information.
[0151] In the communication system of the embodiment of the application, the first node determines whether to actively trigger migration of the application based on the resource utilization rate of the first node and the performance index of the application. When the resource utilization rate of the first node is greater than or equal to a first preset threshold and the performance index of the first application meets the performance degradation condition, the first node actively triggers migration of the application, that is, the first node sends a migration request to the master node to request migration of the second application. The master node determines a second node from the at least two nodes except the first node based on the resource request value of the second application, and returns the identification information of the second node to the first node, so that the first node knows to migrate the second application to the second node, thereby reducing the resource utilization pressure of the first node and timely and effectively guaranteeing the performance of the application running in the first node.
[0152] The application program processing method of the embodiment of the application can actively perceive changes in resource utilization of the nodes and changes in performance of the application, actively select and trigger migration of the application, realize adaptive management of the nodes, quickly respond to migration of the application, reduce the influence of performance degradation of the application in the nodes caused by resource competition, and guarantee the performance of the application.
[0153] In a possible implementation, before step 301, referring to FIG. 4A, which is a specific flowchart of an application program processing method provided by the embodiment of the application, the application program processing method further comprises the following steps:
[0154] 307、the first sub-node acquires the time delay information of the first application and the resource utilization information of the first application.
[0155] Specifically, the time delay information of the first application is information directly or indirectly representing the time delay situation of the first application, without limitation on the specific information type. For example, the time delay information of the first application includes the execution time delay of the first application, the migration duration of the first application or the average request per second of the first application (i.e. how many user requests come per second).
[0156] For example, when the application is a function, the time delay information of the function can be the time delay information of the function itself or the time delay information of the function instance, indirectly representing the time delay situation of the function by the time delay information of the function instance.
[0157] The resource utilization information of the first application is information directly or indirectly representing the resource utilization situation of the first application, without limitation on the specific information type. For example, the resource utilization information of the first application includes the resource usage (CPU usage or MEM usage, etc.), the total CPU throttling time or the throttling frequency, etc.
[0158] For example, when the application is a function, the resource utilization information of the function can be the resource utilization information of the function itself or the resource utilization information of the function instance, indirectly representing the resource utilization situation of the function by the resource utilization information of the function instance.
[0159] For example, in FIG. 4A, the information acquisition module, the resource recommendation module and the resource adjustment module are integrated in the resource management component. After deployment, the information acquisition module in the resource management component of the first sub-node will start collecting information, including collecting the time delay information of the application and the resource utilization information of the application. For example, the information acquisition module can monitor and collect the resource utilization information of the application at a first period (the specific value of the first period can be set according to the actual situation, for example, 1 second, etc.), and cache to the memory and external storage. In addition, for the collection of the time delay information of the application, the information acquisition module will record the end-to-end execution time of the request (i.e. the execution time delay of the application) when the application completes the user request, and record the migration duration of the application from the start of migration to the end of migration (if there is no migration record of the application, the migration duration can be a default value), and cache to the memory and external storage. In addition, the information acquisition module can also collect the resource utilization information of the sub-node at the first period.
[0160] 308、the first sub-node acquires the time delay information of the first application and the resource utilization information of the first application.
[0161] Specifically, the resource configuration recommendation parameter is various parameters related to the resource configuration of the application program, and the specific parameter type is not limited.
[0162] Exemplarily, the resource recommendation module in the resource management component in the first sub-node performs statistical analysis on the data collected by the information acquisition module, loads the resource utilization information and the time delay information of the first application program in the past period (which can be from the start of the deployment of the application program to the current time) from the memory, and determines the resource configuration recommendation parameter of the first application program based on the resource utilization information and the time delay information of the first application program.
[0163] 309、The first sub-node performs parameter configuration on the first application program based on the resource configuration recommendation parameter.
[0164] Specifically, the first sub-node adjusts the resource configuration of the first application program based on the resource configuration recommendation parameter of the first application program. For example, when the first application program is a function, the process of performing parameter configuration on the function can be the process of configuring the function instance, and at this time, the resource configuration recommendation parameter of the first application program is the resource configuration recommendation parameter of the function instance.
[0165] In the embodiment, the resource adjustment module in the resource management component in the first sub-node performs parameter configuration on the first application program based on the resource configuration recommendation parameter of the first application program, runs the first application program after the parameter configuration is completed, and then obtains the resource utilization rate of the first sub-node and the performance index of the first application program.
[0166] The parameter configuration process of other application programs in the first sub-node is the same as that of the first application program. The first sub-node can be any sub-node in the communication system, and the parameter configuration process of the application programs in other sub-nodes in the communication system is the same as that of the first sub-node, which is not described herein.
[0167] Exemplarily, the first sub-node further obtains the resource utilization information of the first sub-node, and the first sub-node sends at least one of the obtained resource utilization information of the first sub-node, the time delay information of the first application program, and the resource utilization information of the first application program to the master node. After the master node obtains the information uploaded by all the sub-nodes in the communication system, the master node can determine the second sub-node according to the resource utilization information of the sub-nodes other than the first sub-node in the communication system and the resource request value of the second application program.
[0168] Exemplarily, the master node can send the time delay information of the application C uploaded by the sub-node A and / or the resource utilization information of the application C to the sub-node B, and when the sub-node B cannot obtain the relevant information of the application C temporarily, the relevant information of the application C of the sub-node A can be directly taken as the relevant information of the corresponding application C of the sub-node B, so as to ensure that the sub-node B can obtain the relevant information of the application smoothly.
[0169] In a possible implementation, the resource utilization information includes a resource usage amount of the first application, and the resource usage amount can be a CPU usage amount or a MEM usage amount, which is not limited herein. The resource configuration recommendation parameter includes a resource configuration recommendation value of the first application. Correspondingly, when the resource usage amount is the CPU usage amount, the resource configuration recommendation value is a CPU resource configuration recommendation value; and when the resource usage amount is the MEM usage amount, the resource configuration recommendation value is a MEM resource configuration recommendation value. The step 308 specifically includes the following steps.
[0170] 381. The first sub-node determines first normal distribution information corresponding to the time delay information and second normal distribution information corresponding to the resource usage amount.
[0171] Specifically, the first normal distribution information corresponding to the time delay information can be determined based on the time delay information of the first application, and the second normal distribution information corresponding to the resource usage amount can be determined based on the resource usage amount of the first application.
[0172] 382. The first sub-node determines an initial resource configuration recommendation value of the first application based on the first normal distribution information and the second normal distribution information.
[0173] 383. The first sub-node determines a resource configuration recommendation value of the first application based on the initial resource configuration recommendation value and a resource compensation coefficient of the first application.
[0174] In the embodiment, the first sub-node can determine an initial resource configuration recommendation value of the first application based on the first normal distribution information corresponding to the time delay information of the first application and the second normal distribution information corresponding to the resource usage amount of the first application, and finally determine the resource configuration recommendation value of the first application by combining the initial resource configuration recommendation value and the resource compensation coefficient of the first application, so as to realize dynamic and adaptive resource recommendation adjustment of the application. In the embodiment, the resource compensation of the application is performed according to the actual situation of the application to determine the resource configuration recommendation value of the application, so as to not waste the resources of the first sub-node and effectively guarantee the performance of the application and the application use experience of the user.
[0175] Referring to FIG. 4A, after the first child node adjusts the resource configuration of the first application, the first child node runs the first application, and obtains the resource utilization of the first child node and the performance index of the first application. The first child node determines whether to trigger the application migration of the first child node based on the resource utilization of the first child node and the first preset threshold, and the performance index of the first application and the performance degradation condition. The trigger judgment period is greater than or equal to the acquisition period of the resource utilization information. Specifically, when the resource utilization of the first child node is greater than or equal to the first preset threshold, and the performance index of the first application meets the performance degradation condition of the first application, the second application migration processing step of the first child node is entered. For details, please refer to the specific description below. When the resource utilization of the first child node is less than the first preset threshold, and / or the performance index of the first application does not meet the performance degradation condition of the first application, the resource configuration recommendation parameter of the application of the first child node is returned.
[0176] In a possible implementation, referring to FIG. 4A, in step 302, the first child node determines the second application from the at least one application, which specifically includes the following steps:
[0177] 321. The first child node determines the priority order of the at least one application.
[0178] Specifically, the higher the sensitivity of the application to the latency, the higher the priority of the application. For example, the migration management module in the first child node determines the priority order of the application in the first child node based on the latency sensitivity.
[0179] 322. The first child node determines the second application based on the priority order, and takes the at least one application with a low ranking as the second application.
[0180] Specifically, after the second application is migrated, the resource utilization of the first child node is less than the second preset threshold. The specific value of the second preset threshold can be set according to the actual situation, and is not particularly limited. The first preset threshold and the second preset threshold can be the same or different.
[0181] For example, the migration management module can select the application with the lowest priority order in the first child node as the second application one by one, and the number of the second application is one or more, until the resource utilization of the first child node is less than the second preset threshold after the second application is migrated.
[0182] In the embodiments of the present application, the first sub-node preferentially migrates an application program with low time sensitivity as the second application program, which can not only reduce the resource utilization pressure of the first sub-node, but also guarantee the user service quality of the application program with high time sensitivity, such as the service level objective (SLO) or the service level agreement (SLA) of the application program.
[0183] Further, when the application program is a function, the first sub-node determines the second function from the at least one function or the second function instance from the at least one function instance, and migrates the second function or the second function instance, because the function instance is the running carrier of the function.
[0184] Further, referring to FIG. 4A, the migration management module generates a migration request for the second application program, and sends the migration request to the master node, wherein the migration request includes the resource request value of the second application program; and returns the resource configuration recommendation parameter of the application program of the first sub-node. For example, the rescheduling module in the master node receives the migration request, and selects the second sub-node in response to the migration request, so as to migrate the second application program. The specific migration process can be referred to the related description of FIG. 4E.
[0185] In a possible implementation, when the second application program is the first application program, the resource request value of the first application program is obtained based on the resource configuration recommendation value of the first application program and the migration compensation resource value, and the migration compensation resource value is obtained based on the time delay information of the first application program and the resource usage of the first application program. The resource configuration recommendation value of the first application program can be determined in step 308, or can be calculated in real time based on the time delay information and the resource utilization information of the first application program.
[0186] For any application program, the resource request value of the application program is obtained based on the resource configuration recommendation value of the application program and the migration compensation resource value, and the migration compensation resource value is obtained based on the time delay information of the application program and the resource usage of the application program.
[0187] In the embodiments of the present application, the resource compensation is performed on the time delay caused by the migration of the application program to determine the resource request value of the application program, which can guarantee the performance of the application program after migration, improve the processing capability of the application program after migration, alleviate the performance impact of the migration process on the application program, and ensure the user experience of the application program.
[0188] In a possible implementation, the second sub-node is determined by the master node based on the resource request value of the second application and the resource utilization information of the sub-nodes other than the first sub-node.
[0189] In this embodiment, the master node determines the second sub-node based on the resource request value and the resource utilization information of the sub-nodes other than the first sub-node, and the second sub-node is a sub-node that has resources to run the second application, that is, the remaining resources of the second sub-node are greater than or equal to the resource request value of the second application, to ensure that the second application can be reliably run after being migrated.
[0190] The specific process of determining the resource configuration recommendation value of an application and migrating the application is described below.
[0191] Referring to FIG. 4B, which is a resource recommendation adjustment flowchart of a function according to an embodiment of the present application, in the embodiment of the present application, an application is taken as an example of a function, and the resource configuration recommendation value of the function is taken as the resource configuration recommendation value of a function instance. The time delay information of the function is taken as the time delay information of a function instance, the performance indicator of the function is taken as the performance indicator of a function instance, and the resource utilization information of the function is taken as the resource utilization information of a function instance for description. By way of example, in a communication system, an information acquisition module, a resource recommendation module, and a resource adjustment module in a sub-node are arranged in a resource management component, which can realize adaptive adjustment and configuration of a function instance resource of the sub-node, and is responsible for information collection of the function instance and the sub-node, resource recommendation of the function instance, and resource adjustment of the function instance. A rescheduling module is deployed on a control plane of a master node, and is responsible for selection of a target node of the function instance during migration of the function instance.
[0192] The flow of adaptive adjustment and configuration of the function instance resource includes the following steps.
[0193] 1. The information acquisition module periodically collects resource utilization information of a current function instance, end-to-end execution time of the function instance, and migration duration of the function instance at a first period (for example, 1 second), and buffers the collected data in a memory.
[0194] Specifically, the sub-node receives a user request to trigger running of the function instance, and then starts recording the end-to-end execution time of the function instance until the request processing is completed. In the embodiment of the present application, the resource utilization information of the function instance includes a resource usage amount of the function instance.
[0195] 2. The resource recommendation module reads the resource utilization information and the end-to-end execution time of the function instance in the past period of time from the memory, and calculates a resource configuration recommendation value of the function instance based on a normal distribution adaptive resource recommendation algorithm of the statistical data, where the calculation steps of the recommendation algorithm are as follows.
[0196] (a) obtaining second normal distribution information corresponding to the resource usage of the function instance. In the embodiment of the present application, the second normal distribution information takes a normal distribution diagram as an example. For example, the normal distribution diagram of the resource usage of the function instance is obtained by using the resource usage of all past time function instances, and reference is made to FIG. 4C, which is a normal distribution diagram of the resource usage of the function instance provided by the embodiment of the present application. The above-mentioned all past time refers to the time from the start of the function instance to the reading time, and the second normal distribution information, i.e., the normal distribution diagram corresponding to the resource usage of the function instance, is obtained based on the data processing of the reading. The normal distribution diagram includes the cumulative percentage and the corresponding Z-score (Z-Score). When the resource usage of the function instance is the CPU usage, the normal distribution diagram corresponding to the resource usage is the normal distribution diagram of the CPU usage; when the resource usage of the function instance is the MEM usage, the normal distribution diagram of the resource usage is the normal distribution diagram of the MEM usage.
[0197] (b) obtaining first normal distribution information corresponding to the time delay information of the function instance. In the embodiment of the present application, the first normal distribution information includes normal distribution diagrams corresponding to the time delay information of at least three time windows. For example, the three time windows can be understood as three different time lengths, such as all past time, K hours in the past and T minutes in the past; or all past time, W days in the past and V hours in the past. The specific time window can be defined according to the actual situation.
[0198] For example, the normal distribution diagrams corresponding to the end-to-end execution time of the function instance in different time windows are counted, and reference is made to FIG. 4D, which is a normal distribution diagram of the end-to-end execution time of the function instance in different time windows provided by the embodiment of the present application. The time windows are divided into three types, the long time window (LongTerm) is all past time, the middle time window (MiddleTerm) is K hours in the past, and the short time window (ShortTerm) is T minutes in the past.
[0199] (c) determining the initial resource configuration recommended value of the function instance based on the first normal distribution information and the second normal distribution information; and determining the resource configuration recommended value of the function instance based on the initial resource configuration recommended value and the resource compensation coefficient of the function instance.
[0200] For example, reference is made to FIG. 4D, and the end-to-end execution time value S 3σ respectively, and the mean μ and the standard deviation σ of the middle time window and the long time window are calculated 3σ The Z-score Zscore M of the normal distribution diagram of the above-mentioned two time windows is calculated LThe corresponding calculation formula is as follows: Zscore = (S 3σ -μ) / σ.
[0201] The final Zscore is calculated by weighting ZscoreM and ZscoreL, resulting in Zscore = (1-α)*Zscore. L +α*Zscore M The Zscore is then mapped to the cumulative percentage of the normal distribution of resource usage of function instances, and the resource usage corresponding to this quantile is used as the initial resource configuration recommendation value R. Here, α is a configurable weight, ranging from [0,1]. As shown in Figure 4C, assuming Zscore = 2, the initial resource configuration recommendation value R is the resource usage corresponding to the 97.7th quantile of the cumulative percentage of function resource usage.
[0202] The recommended resource configuration value for a function instance is Rf = R*(1+β), where β is the resource compensation coefficient for the function instance. The specific value of β can be set according to the actual situation. For example, for latency-sensitive function instances, β>0, while for latency-insensitive function instances, β≤0. Different values of β can also be set for different resource usage types (CPU or MEM, etc.).
[0203] To distinguish between time-sensitive function instances, users can specify a function instance as a time-sensitive function instance; alternatively, the end-to-end execution time S, where 3σ is located, can be used as the criterion in the normal distribution plot of the function instance's short time window. 3σ Is it less than the set latency-sensitive threshold L? threshold To determine, when S 3σ <L threshold At that time, the function instance is a time-delay-sensitive function instance; while S 3σ ≥L threshold At that time, the function instance is a time-insensitive function instance.
[0204] For example, the β value can also be determined in conjunction with the resource utilization of child nodes, and the specific determination method is not limited. For instance, using the F% quantile of the resource utilization of child nodes within a short time window of the function instance as an indicator, when the resource utilization of the child node's F% quantile is ≤ the threshold TP, then the β of the latency-sensitive function instance is 0.1 (or other values), and the β of the latency-insensitive function instance is 0 (or other values). When the resource utilization of the child node's F% quantile is > TP, then the β of the latency-sensitive function instance is 0.15 (or other values), and the β of the latency-insensitive function instance is -0.1 (or other values). The specific value of F can be set according to the actual situation and is not particularly limited.
[0205] 3、Exemplarily, after the resource adjustment module receives the resource configuration recommended value of the function instance recommended by the resource recommendation module, whether to modify the cgroups parameter corresponding to the function instance is determined through an admission judgment step. The admission judgment can be a no-operation direct release operation, that is, it is directly determined that the cgroups parameter can be modified; or it can be determined whether the difference between the current cgroups parameter and the resource configuration recommended value is less than a preset difference (which can be set according to actual conditions, for example, 5%), and if so, the current cgroups parameter is not modified to reduce the number of file operations.
[0206] In the embodiments of the present application, according to the changes of the resource utilization and the changes of the delay performance of the function instance, the adaptive resource recommendation algorithm based on the normal distribution of the resource utilization and the delay information statistical data of the function instance is used to realize the adaptive resource adjustment management of the function instance of the subnode, the performance index of the function instance is used to guide the resource configuration of the function instance, more available resources are released to other users without affecting the performance of the function instance, the deployment density of the function instance of the subnode is improved, and the resource utilization of the subnode is improved.
[0207] In addition, the adaptive resource recommendation algorithm based on the normal distribution of the resource utilization and the delay information statistical data of the function instance is used to recommend a resource configuration recommended value with migration compensation to the migrated function instance; more resource compensation is provided to the migrated function instance, the processing capacity of the migrated function instance is improved, and the performance impact of the function instance caused by the migration process can be alleviated.
[0208] The above resource recommendation algorithm is an adaptive resource recommendation algorithm based on the normal distribution of the resource utilization and the delay information statistical data of the function instance, and the recommended process can be applied not only to the migration process of the function instance but also to the running process of the function instance.
[0209] After the resource adjustment module sets the resource configuration recommended value of the application program, the application program is run, the migration management module on the subnode starts the self-checking of the resource utilization change and the delay information change of the application program on the subnode and judges whether the application program migration needs to be triggered actively. Referring to FIG. 4E, FIG. 4E is a flowchart of function migration provided by an embodiment of the present application; the application program is taken as an example, the subnode is taken as subnode 1, and the specific steps are as follows:
[0210] 1. Function instance autonomous management and migration determination.
[0211] In the embodiments of the present application, the resource configuration of the function is taken as an example of the resource configuration of the function instance. After the resource adjustment of the function instance is completed, the child node 1 actively detects the load condition of the child node 1 and the change of the time delay information of the function instance. If it is found that the resource utilization rate of the child node 1 is greater than or equal to the first preset threshold X, and there is a function instance whose performance index meets the performance degradation condition (for example, the end-to-end execution time of the function instance continues to degrade N times), the active migration process of the function instance is triggered.
[0212] (a) The migration management module on the child node 1 perceives the load condition of the current child node and the time delay information of the function instance. When it is found that the resource utilization rate of the child node is greater than or equal to X (such as 65%) and the performance of a certain function instance continues to degrade N times, if the condition is not met, the function instance is not actively migrated in this round of decision, otherwise the function instance is actively migrated (step 2).
[0213] The resource utilization rate of the child node can be calculated based on the load condition of the child node. For example, the child node has 64 CPUs, and only 32 CPUs are used, so the resource utilization rate is 50%.
[0214] For example, if the end-to-end execution time of a certain function instance at the current time is greater than the end-to-end execution time at the last decision (or a fixed value), or the difference between the two exceeds a preset difference value (5%), it is considered that the function instance has degraded once.
[0215] (b) The function instances are sorted according to the priority of the function instances to obtain a sorted function instance queue. The priority consideration dimensions mainly include the user-defined function instance priority, the time delay sensitivity of the function instance, the resource usage of the function instance, or the migration time length of the function instance, etc. For example, the higher the time delay sensitivity of the function instance, the higher the priority. The higher the resource usage of the function instance, the higher the priority. The longer the migration time length of the function instance, the higher the priority.
[0216] (c) Low-priority function instances are selected from the sorted function instance queue in turn as migrated function instances to be added to the migration queue until the resource utilization rate of the child node decreases to below the second preset threshold S (S is, for example, 60%, or S is equal to X).
[0217] 2. For each function instance in the migration queue, the migration management module on the child node 1 requests the resource recommendation module to recommend a resource request value Rm with migration compensation resources as the resource application amount of the function instance, and actively requests the rescheduling module of the master node to select a suitable target node for the migrated function instance. The specific calculation process of the resource request value Rm is as follows:
[0218] (a) According to the end-to-end execution time data and resource usage data of the function instance history, a function instance average processing rate-resource usage fitting curve is constructed: Resource=F(PPS), PPS is the average processing rate of the function instance.
[0219] For example, the resource usage of the function instance is taken as the CPU usage, and the average processing rate is taken as the average end-to-end execution time. When the CPU usage of the function instance is 1 CPU, the average end-to-end execution time is 1 second; when the CPU usage of the function instance is 2 CPUs, the average end-to-end execution time is 500 milliseconds; and when the CPU usage of the function instance is 3 CPUs, the average end-to-end execution time is 330 milliseconds.
[0220] (b) In the embodiment of the application, the time delay information collected by the information acquisition module of the child node 1 also includes the average per-second request QPS of the function instance, that is, how many user requests come per second. According to the migration time length Ms (historically collected or a default value) of the function instance and the average per-second request QPS of the function instance collected by the information acquisition module of the child node 1, the number of requests to be blocked in the migration process is calculated: Pn=QPS / Ms. Further, if the request forwarding time Ts is considered, the number of requests to be blocked is: Pn=QPS / (Ms+Ts).
[0221] (c) The end-to-end execution time value at 3σ of the normal distribution diagram (as shown in FIG. 4D) of the short time window is used as the expectation E lantency , that is, the expectation E lantency Pn requests are processed within the time delay, then the expected function average processing rate Epps is: Epps=Pn / E lantency .
[0222] (d) The expected function instance average processing rate Epps is substituted into the function instance average processing rate-resource usage fitting curve Resource=F(PPS), to obtain the size of the resource required to compensate after the migration of the function instance, that is, the migration compensation resource value Rs.
[0223] (e) The size of the resource request value Rm of the function instance is the resource configuration recommendation value Rf calculated by the dynamic adaptive function instance resource recommendation algorithm plus the migration compensation resource value Rs of the function instance: Rm=Rf+Rs.
[0224] 3. After receiving a migration request for a function instance, the rescheduling module selects a suitable child node as the target node to house the migrated function instance based on the current resource usage of the node cluster. Resources are reserved on the target node to ensure successful migration. Upon successful decision-making, the module notifies the migration management module of the source node (the node where the migrated function instance resides) to perform a lossless hot migration. For example, after a successful decision, the rescheduling module sends a confirmation migration message to the migration management module of child node 1, which includes the target node's identification information.
[0225] 4. After receiving the migration confirmation message, the migration management module of child node 1 will notify the migration management module of the target node to create a new function instance according to the recommended resource request value Rm. Refer to Figure 4E, with child node 2 as an example of the target node.
[0226] 5. The target node creates a new function instance based on the resource request value Rm of the function instance. After the new function instance is launched on the target node, it will take over and process all new user requests.
[0227] 6. The target node notifies the source node that the new instance of the migration management module has been started and is ready to exit the old function instance.
[0228] 7. The migration management module of the source node forwards the function requests that have not been executed in the current cache to the new function instance.
[0229] 8. Once the old function instance in the source node finishes processing the last function request, it exits the old function instance, thus completing the migration of the function instance, i.e., the migration of the function.
[0230] Exemplarily, when the application program is for a user task, the user task migration can be implemented in various manners without limitation. For example, the source node sends a task creation request to the target node, the task creation request including relevant information of the user task to be migrated (e.g., identification information of the user task, state information of the user task, and context information of the user task, etc.), the target node creates a user task at the target node based on the relevant information of the user task to be migrated. The target node notifies the source node after the user task is created, and then the source node exits the old user task, and the target node continues to execute the user task, thereby realizing the user task migration. Exemplarily, the state information of the user task is used to represent the type of the user task. When the state information of the user task represents that the user task to be migrated is a stateless (without context connection) user task, the relevant information of the user task does not include the context information of the user task, and the target node creates a new user task at the target node based on the relevant information of the user task to be migrated, the user task accepting a user request to execute a task to obtain a relevant task result. When the state information of the user task represents that the user task to be migrated is a stateful (with context connection) user task, the relevant information of the user task includes the context information of the user task, and the target node creates a user task at the target node based on the relevant information of the user task to be migrated, and creates the user task based on the context information to realize the state migration of the user task.
[0231] In a possible implementation, when the resource configuration recommendation value of the first application program is a CPU resource configuration recommendation value, the resource utilization information of the first application program further includes a total CPU throttling time of the first application program and a throttling frequency of the first application program, and the resource configuration recommendation parameter further includes a CPU burst resource configuration recommendation value of the first application program. Referring to FIG. 4F, which is a flowchart of determining a resource configuration recommendation parameter according to an embodiment of the present application; optionally, in addition to determining the resource configuration recommendation value of the application program, the resource management component can also determine the CPU burst resource configuration recommendation value, and the order of determining the two is not limited. The resource configuration of the application program is adjusted based on the resource configuration recommendation value and the CPU burst resource configuration recommendation value.
[0232] Specifically, the step 308 further includes the following steps:
[0233] 384、The first sub-node determines a first burst resource compensation coefficient based on the total CPU throttling time of the first application program and the throttling frequency of the first application program, the first burst resource compensation coefficient being a ratio of the total CPU throttling time trottled_time to the throttling frequency nr_throttled.
[0234] Specifically, the first burst resource compensation coefficient C1 can be the average throttling time of the application (for example, the average throttling time in a preset time, and the length of the preset time can be set according to actual conditions), and the CPU throttling total time trottled_time and the throttling number nr_throttled are parameters obtained in the preset time, so C1 is the CPU throttling total time divided by the throttling number: C1 = trottled_time / nr_throttled.
[0235] 385、The first sub-node determines a second burst resource compensation coefficient C2 based on the first normal distribution information.
[0236] 386、The first sub-node determines a CPU burst resource configuration recommendation value Bf based on the CPU resource configuration recommendation value Rf_cpu, the first burst resource compensation coefficient C1, and the second burst resource compensation coefficient C2.
[0237] For example, based on Rf_cpu, C1 and C2, the CPU burst resource configuration recommendation value Bf of the application can be calculated, for example, Bf = Rf_cpu*(1+max(C2,0))+C1. For another example, based on the configurable parameter γ, Rf_cpu, C1 and C2, the CPU burst resource configuration recommendation value Bf of the application can also be calculated. For example, Bf = (Rf_cpu*γ)*(1+max(C2,0))+C1. Wherein, γ can be configured differently according to different applications. For example, the function of the application, the γ of the function instance of the latency-sensitive type is greater than the γ of the function instance of the latency-insensitive type.
[0238] In this embodiment, the first burst resource compensation coefficient is determined based on the CPU throttling information of the first application, and the second burst resource compensation coefficient is determined based on the first normal distribution information corresponding to the latency information of the first application. The CPU burst resource configuration recommendation value of the first application is determined based on the first burst resource compensation coefficient, the second burst resource compensation coefficient and the CPU resource configuration recommendation value of the first application, so as to cope with the CPU throttling situation of the first application and guarantee the service quality of the first application.
[0239] For example, referring to FIG. 4G, FIG. 4G is a calculation example diagram of a second burst resource compensation coefficient provided by an embodiment of the application; the normal distribution mean μ L of the long time window is used to map the end-to-end execution time to the normal distribution of the short time window to obtain the corresponding cumulative percentage Pμ L , and compared with the cumulative percentage P 3σ of the distribution 3σ of the short time window to calculate, and the second burst resource compensation coefficient C2 = P 3σ -PμL .
[0240] In the embodiments of the present application, the numbering of the steps does not limit the execution sequence between the steps, and the numbering of the steps is only for distinguishing different steps.
[0241] The device provided in the present application will be described in detail below.
[0242] FIG. 5 is a structural schematic diagram of a sub-node provided in an embodiment of the present application. The sub-node shown in FIG. 5 can be used to implement the function of the first sub-node in the application program processing method embodiment shown in FIG. 3, and thus can also implement the beneficial effects possessed by the above method embodiments. In the embodiments of the present application, the sub-node can be an electronic device, and can also be a module (such as a chip) applied in an electronic device.
[0243] As shown in FIG. 5, the sub-node 500 includes an acquisition module 510, a processing module 520, a sending module 530, and a receiving module 540. The sub-node 500 is used to implement the function of the first sub-node in the above application program processing method embodiment. Alternatively, the sub-node 500 can include a module for implementing any function or operation of the first sub-node in the above application program processing method embodiment, and the module can be implemented by software, hardware, firmware, or any combination thereof, in whole or in part.
[0244] When the sub-node 500 is used to implement the function of the first sub-node in the above application program processing method embodiment, the acquisition module 510 is configured to acquire the resource utilization of the first sub-node and the performance indicator of the first application program. The at least one application program includes the first application program. The processing module 520 is configured to determine a second application program from the at least one application program when the resource utilization of the first sub-node is greater than or equal to a first preset threshold value, and the performance indicator of the first application program satisfies a performance degradation condition. The sending module 530 is configured to send a migration request to a master node, the migration request being used to request migration of the second application program, and the migration request including a resource request value of the second application program. The receiving module 540 is configured to receive migration confirmation information sent by the master node. The migration confirmation information includes identification information of a second sub-node, and a remaining resource of the second sub-node is greater than or equal to the resource request value of the second application program.
[0245] The sub-node 500 determines whether to actively trigger migration of an application program based on the resource utilization of the first sub-node and the performance indicator of the application program. When the resource utilization of the first sub-node is greater than or equal to the first preset threshold value, and the performance indicator of the first application program satisfies the performance degradation condition, the second application program is triggered to be migrated to the second sub-node, so as to reduce the resource utilization pressure of the first sub-node, and timely and effectively guarantee the performance of the application program running in the first sub-node.
[0246] In a possible implementation, the processing module 520 is specifically configured to determine a priority order of the at least one application. The higher the sensitivity of the application to the time delay, the higher the priority of the application. Based on the priority order, the at least one application with a low ranking is taken as the second application. When the second application is migrated, the resource utilization of the first sub-node is less than the second preset threshold.
[0247] In a possible implementation, before the acquisition module 510 acquires the resource utilization of the first sub-node and the performance indicator of the first application, the acquisition module 510 is further configured to acquire time delay information of the first application and resource utilization information of the first application. The processing module 520 is further configured to determine a resource configuration recommendation parameter of the first application based on the time delay information and the resource utilization information. The processing module 520 is further configured to perform parameter configuration on the first application based on the resource configuration recommendation parameter.
[0248] In a possible implementation, the resource utilization information includes a resource usage amount of the first application. The resource configuration recommendation parameter includes a resource configuration recommendation value of the first application. In the aspect of determining the resource configuration recommendation parameter of the first application based on the time delay information and the resource utilization information, the processing module 520 is specifically configured to determine first normal distribution information corresponding to the time delay information and second normal distribution information corresponding to the resource usage amount. The processing module 520 is specifically configured to determine an initial resource configuration recommendation value of the first application based on the first normal distribution information and the second normal distribution information. The processing module 520 is specifically configured to determine the resource configuration recommendation value of the first application based on the initial resource configuration recommendation value and a resource compensation coefficient of the first application.
[0249] In a possible implementation, the resource configuration recommendation value is a central processing unit (CPU) resource configuration recommendation value. The resource utilization information further includes a total CPU throttling time of the first application and a throttling frequency of the first application. The resource configuration recommendation parameter further includes a CPU burst resource configuration recommendation value of the first application. In the aspect of determining the resource configuration recommendation parameter of the first application based on the time delay information and the resource utilization information, the processing module 520 is specifically configured to determine a first burst resource compensation coefficient based on the total CPU throttling time and the throttling frequency, the first burst resource compensation coefficient being a ratio of the total CPU throttling time to the throttling frequency. The processing module 520 is specifically configured to determine a second burst resource compensation coefficient based on the first normal distribution information. The processing module 520 is specifically configured to determine the CPU burst resource configuration recommendation value based on the CPU resource configuration recommendation value, the first burst resource compensation coefficient, and the second burst resource compensation coefficient.
[0250] In a possible implementation, when the second application is the first application, the resource request value of the first application is obtained based on the resource configuration recommendation value of the first application and a migration compensation resource value, and the migration compensation resource value is obtained based on the time delay information of the first application and the resource usage of the first application.
[0251] In a possible implementation, the second child node is determined based on the resource request value of the second application and the resource utilization information of the child nodes other than the first child node.
[0252] The above description of the modules can refer to the description of the application processing method embodiments, and thus will not be repeated here.
[0253] FIG. 6 is a structural schematic diagram of a master node according to an embodiment of the present application. The master node shown in FIG. 6 can be used to implement the functions of the master node in the application processing method embodiment shown in FIG. 3, and thus can also achieve the beneficial effects of the above method embodiments. In the embodiments of the present application, the master node can be an electronic device, and can also be a module (such as a chip) applied to an electronic device.
[0254] As shown in FIG. 6, the master node 600 includes a receiving module 610, a processing module 620, and a sending module 630. The master node 600 is used to implement the functions of the master node in the above application processing method embodiments. Alternatively, the master node 600 can include a module for implementing any function or operation of the master node in the above application processing method embodiments, and the module can be implemented by software, hardware, firmware, or any combination thereof, in whole or in part.
[0255] When the master node 600 is used to implement the functions of the master node in the above application processing method embodiments, the receiving module 610 is configured to receive a migration request sent by the first child node, and the migration request includes a resource request value of a second application, and the at least one application includes the second application. The processing module 620 is configured to determine a second child node from the child nodes other than the first child node based on the migration request, and the remaining resource of the second child node is greater than or equal to the resource request value of the second application. The sending module 630 is configured to send migration confirmation information to the first child node, and the migration confirmation information includes identification information of the second child node.
[0256] The master node 600 determines the second sub-node from the at least two sub-nodes except the first sub-node based on the resource request value of the second application program in response to the migration request of the first sub-node, and returns the identification information of the second sub-node to the first sub-node, so that the first sub-node knows to migrate the second application program to the second sub-node; thereby reducing the resource utilization pressure of the first sub-node and timely and effectively guaranteeing the performance of the application program running in the first sub-node.
[0257] The above modules can refer to the description of the application program processing method embodiments, and will not be described again.
[0258] The application further provides a communication system, which comprises the master node shown in FIG. 6 and the at least two sub-nodes, and the at least two sub-nodes comprise the first sub-node and the second sub-node shown in FIG. 5.
[0259] Referring to FIG. 7, FIG. 7 is a structural schematic diagram of a communication device according to an embodiment of the application; the communication device 700 comprises a memory 701, a processor 702, a communication interface 704 and a bus 703. The memory 701, the processor 702 and the communication interface 704 are communicatively connected to each other through the bus 703.
[0260] Optionally, the communication device 700 further comprises a display screen (not shown), which is communicatively connected to the memory 701, the processor 702 and the communication interface 704 through the bus 703. The display screen is used to output information and interact with the user, such as voice output or display output.
[0261] The memory 701 can be a read only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM). The memory 701 can store a program, and when the program stored in the memory 701 is executed by the processor 702, the processor 702 and the communication interface 704 are used to execute each step of the application program processing method according to any embodiment of the application.
[0262] The processor 702 can be a general purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits, for executing programs to implement the functions of the units in the first sub-node or the master node of any of the embodiments of the present application, or to implement the application program processing method of any of the embodiments of the present application.
[0263] The processor 702 can also be an integrated circuit chip having a processing capability for signals. In the implementation process, the steps of the application program processing method of any of the embodiments of the present application can be completed by the integrated logic circuit or the instruction in the form of software in the processor 702. The processor 702 described above can also be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The disclosed method, steps and logic block diagram in the embodiments of the present application can be implemented or executed. The general purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the application program processing method in conjunction with any of the embodiments of the present application can be directly embodied as a hardware processor to execute, or be executed by a combination of hardware and software modules in the processor. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register, or other mature storage medium in the art. The storage medium is located in the memory 701, and the processor 702 reads the information in the memory 701, and combines the hardware to complete the functions required to be executed by the units included in the first sub-node or the master node of any of the embodiments of the present application, or to execute the application program processing method of any of the embodiments of the present application.
[0264] The communication interface 704 uses a transceiver such as but not limited to a transceiver to realize the communication between the communication device 700 and other devices or communication networks. For example, the communication interface 704 can obtain the delay information or the resource utilization information.
[0265] The bus 703 can include a path for transmitting information between the components (for example, the memory 701, the processor 702, the communication interface 704) of the communication device 700.
[0266] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other manners. For example, the embodiments of the apparatus described above are merely schematic; for example, the division of the units is only a logical function division; there can be another division manner for the actual implementation; for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.
[0267] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0268] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit.
[0269] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media sets. The available medium can be read-only memory (ROM), or random access memory (RAM), or magnetic medium, such as floppy disk, hard disk, magnetic tape, optical medium, such as digital versatile disc (DVD), or semiconductor medium, such as solid state disk (SSD), etc.
[0270] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. An application program processing method characterized by comprising: A first sub-node applied to a communication system, the communication system comprising a master node and at least two sub-nodes, the at least two sub-nodes comprising the first sub-node and a second sub-node, and at least one application program running on the first sub-node; the method comprising: obtaining resource utilization of the first sub-node and performance indicators of a first application program, the at least one application program comprising the first application program; when the resource utilization is greater than or equal to a first preset threshold and the performance indicators meet performance degradation conditions, determining a second application program from the at least one application program; sending a migration request to the master node, the migration request being used to request migration of the second application program, the migration request comprising a resource request value of the second application program; receiving migration confirmation information sent by the master node, the migration confirmation information comprising identification information of the second sub-node, and a remaining resource of the second sub-node being greater than or equal to the resource request value of the second application program.
2. The method of claim 1, wherein, The method further comprises: determining a priority order of the at least one application program, the higher the sensitivity of the application program to latency, the higher the priority of the application program; based on the priority order, at least one application program at the back of the order is determined as the second application program, wherein, after the second application program is migrated, the resource utilization of the first sub-node is less than a second preset threshold.
3. The method according to claim 1 or 2, characterized in that, Before the obtaining resource utilization of the first sub-node and performance indicators of a first application program, the method further comprises: obtaining latency information of the first application program and resource utilization information of the first application program; determining resource configuration recommendation parameters of the first application program based on the latency information and the resource utilization information; performing parameter configuration on the first application program based on the resource configuration recommendation parameters.
4. The method of claim 3, wherein, The resource utilization information comprises resource usage of the first application program; and the resource configuration recommendation parameters comprise resource configuration recommendation values of the first application program. The method further comprises: determining first normal distribution information corresponding to the latency information and second normal distribution information corresponding to the resource usage; determining initial resource configuration recommendation values of the first application program based on the first normal distribution information and the second normal distribution information; determining resource configuration recommendation values of the first application program based on the initial resource configuration recommendation values and a resource compensation coefficient of the first application program.
5. The method of claim 4, wherein, The resource configuration recommendation values are CPU resource configuration recommendation values; the resource utilization information further comprises total CPU throttling time and throttling times of the first application program; and the resource configuration recommendation parameters further comprise CPU burst resource configuration recommendation values of the first application program. The method further comprises: determine a first burst resource compensation coefficient based on the total CPU throttling time and the throttled times, the first burst resource compensation coefficient being a ratio of the total CPU throttling time to the throttled times; determine a second burst resource compensation coefficient based on the first normal distribution information; determine the CPU burst resource configuration recommendation value based on the CPU resource configuration recommendation value, the first burst resource compensation coefficient, and the second burst resource compensation coefficient.
6. The method according to claim 4 or 5, characterized in that, The second application program is the first application program, and the resource request value is obtained based on a resource configuration recommendation value of the first application program and a migration compensation resource value, the migration compensation resource value being obtained based on time delay information of the first application program and resource usage of the first application program.
7. The method according to any one of claims 1 to 6, characterized in that, The second sub-node is determined based on the resource request value and resource utilization information of sub-nodes other than the first sub-node among the at least two sub-nodes.
8. An application processing method characterized by comprising: A master node applied to a communication system, the communication system further comprising at least two sub-nodes, the at least two sub-nodes comprising a first sub-node and a second sub-node, at least one application program running on the first sub-node; the method comprising: receiving a migration request sent by the first sub-node, the migration request comprising a resource request value of a second application program, the at least one application program comprising the second application program; determining the second sub-node from sub-nodes other than the first sub-node among the at least two sub-nodes in response to the migration request, a remaining resource of the second sub-node being greater than or equal to the resource request value of the second application program; sending migration confirmation information to the first sub-node, the migration confirmation information comprising identification information of the second sub-node.
9. An application processing method characterized by comprising: A method applied to a communication system, the communication system comprising a master node and at least two sub-nodes, the at least two sub-nodes comprising a first sub-node and a second sub-node, at least one application program running on the first sub-node; the method comprising: the first sub-node obtaining resource utilization of the first sub-node and a performance index of a first application program, the at least one application program comprising the first application program; when the resource utilization is greater than or equal to a first preset threshold and the performance index meets a performance degradation condition, the first sub-node determining a second application program from the at least one application program; the first sub-node sending a migration request to the master node, the migration request being used to request migration of the second application program, the migration request comprising a resource request value of the second application program; the master node determining the second sub-node from sub-nodes other than the first sub-node among the at least two sub-nodes in response to the migration request, a remaining resource of the second sub-node being greater than or equal to the resource request value of the second application program; the master node sending migration confirmation information to the first sub-node, the migration confirmation information comprising identification information of the second sub-node; the first sub-node receiving the migration confirmation information.
10. A communication system, characterized by The system comprises a master node and at least two sub-nodes, the at least two sub-nodes comprising the first sub-node and a second sub-node, and at least one application program running on the first sub-node; wherein, The first sub-node is configured to acquire resource utilization of the first sub-node and a performance index of a first application program, and the at least one application program comprises the first application program; When the resource utilization is greater than or equal to a first preset threshold value and the performance index meets a performance degradation condition, the first sub-node is further configured to determine a second application program from the at least one application program; The first sub-node is further configured to send a migration request to the master node, the migration request being used to request migration of the second application program, and the migration request comprising a resource request value of the second application program; The master node is configured to determine the second sub-node from sub-nodes other than the first sub-node among the at least two sub-nodes in response to the migration request, and a remaining resource of the second sub-node being greater than or equal to the resource request value of the second application program; The master node is further configured to send migration confirmation information to the first sub-node, the migration confirmation information comprising identification information of the second sub-node; The first sub-node is further configured to receive the migration confirmation information.
11. A child node, characterized by The sub-node comprises units or modules for executing the method of any one of claims 1-7.
12. A master node, characterized by The master node comprises units or modules for executing the method of claim 8.
13. A communication device, characterized by A device comprises a processor and a memory, wherein the processor and the memory are connected, wherein the memory is configured to store program code, and the processor is configured to call the program code to execute the method of any one of claims 1-8.
14. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method of any one of claims 1-8.
Citation Information
Patent Citations
Method and device for migrating instances and system
CN104283951A
Container cross-host online migration method, storage medium and terminal equipment
CN110134495A
Container dynamic migration method and device and electronic equipment
CN111880939A
Container migration method and related device
CN112148483A
Application migration method and device
CN113630819A