Application program processing method and related equipment
By introducing information acquisition, resource recommendation, and migration management modules into the communication system, resource utilization and performance indicators are monitored in real time, and applications are proactively migrated to less loaded child nodes. This solves the problem of node performance degradation and achieves resource optimization and performance assurance with second-level response.
Patent Information
- Application Number
- CN202411103980.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2026-02-13
AI Technical Summary
The nodes (servers) do not respond promptly when the performance of the functions corresponding to user services degrades, making it impossible to reliably guarantee the performance of the functions. Furthermore, the existing technology has unreasonable aspects in resource configuration and migration, affecting the stability and performance of user services.
By introducing information acquisition, resource recommendation, resource adjustment, and migration management modules into the communication system, resource utilization and performance indicators are monitored in real time. Applications are proactively triggered to migrate to less loaded sub-nodes to ensure that performance does not degrade during the migration process. A second-level response mechanism is used to optimize resource configuration.
It enables timely and effective application migration when resource utilization is high, reducing node load, ensuring application performance, improving resource utilization, and avoiding performance degradation caused by unreasonable resource configuration.
Smart Images

Figure CN121523809A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of software, and in particular to an application processing method and related device. BACKGROUND
[0002] 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 operation of a business of the user. From the perspective of the user, the user is most concerned about stability and performance of the business.
[0003] However, when performance of a function corresponding to a user business of a node (server) decreases, the node (server) does not respond in time, and cannot reliably guarantee performance of the function. SUMMARY
[0004] The present application provides an application processing method and related device, which can timely and effectively guarantee performance of an application.
[0005] 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.
[0006] 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.
[0007] The application processing method includes the following steps: obtaining resource utilization of the first child node and a performance index 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 index 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.
[0008] 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 utilization of the hardware resources. Based on the migration confirmation information, the first child node can determine to migrate the second application program to the second child node.
[0009] In the solution, whether to trigger the migration of the application program is determined based on the resource utilization of the first sub-node and the performance index of the application program. When the resource utilization of the first sub-node is greater than or equal to a first preset threshold and the performance index of the first application program meets 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 effectively guarantee the performance of the application program running in the first sub-node.
[0010] In a possible implementation of the first aspect, the above determining the second application program from the at least one application program specifically includes the following steps: determining a priority order of the at least one application program. The higher the sensitivity of the application program to the time delay is, the higher the priority of the application program is. Based on the priority order, the at least one application program with a low ranking is taken as the second application program. When the second application program is migrated, the resource utilization of the first sub-node is less than a second preset threshold.
[0011] In the implementation, the priority order of the application program is determined based on the time delay sensitivity, and the application program with low time delay sensitivity is preferentially migrated 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 delay sensitivity.
[0012] In a possible implementation of the first aspect, before the resource utilization of the first sub-node and the performance index of the first application program are acquired, the above application program processing method further includes the following steps: acquiring time delay information of the first application program and resource utilization information of the first application program. The resource configuration recommendation parameter of the first application program is determined based on the time delay information and the resource utilization information. The first application program is configured with parameters based on the resource configuration recommendation parameter.
[0013] In the implementation, the resource configuration recommendation parameter of the first application program can be determined according to the time delay information of the first application program and the resource utilization information of the first application program, and then the first application program is configured with parameters based on the resource configuration recommendation parameter. After the parameter configuration is completed, the first application program is run, and then the resource utilization of the first sub-node and the performance index of the first application program are acquired.
[0014] The parameter configuration process of the other application programs in the first sub-node is the same as that of the first application program.
[0015] 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.
[0016] In this 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 this embodiment, the resource compensation is performed on the application program to determine the resource configuration recommendation value of the application program according to actual conditions, 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.
[0017] 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 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.
[0018] 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.
[0019] 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 latency 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.
[0020] In a possible implementation of the first aspect, when the second application is the first application, the resource request value of the first application is obtained based on a resource configuration recommendation value of the first application and a migration compensation resource value, and the migration compensation resource value is obtained based on time delay information of the first application and resource usage of the first application.
[0021] In this embodiment, the resource compensation is performed on the time delay caused by the migration of the application to determine the resource request value of the application, so that the performance of the application after migration is guaranteed, and the user experience of the application is ensured.
[0022] In a possible implementation of the first aspect, the second child node is determined based on the resource request value of the second application and resource utilization information of the child nodes other than the first child node.
[0023] 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, i.e., the remaining resources of the second child node are greater than or equal to the resource request value of the second application, so that the second application can be reliably run after migration.
[0024] In a second aspect, the present application also provides an application processing method applied to a master node in a communication system.
[0025] The communication system includes a 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 is running on the first child node.
[0026] The application processing method includes the following steps: receiving a migration request sent by the first child node, the migration request including a resource request value of a second application, and the at least one application including the second application; determining the second child node from the child nodes other than the first child node in response to the migration request, the remaining resources of the second child node being greater than or equal to the resource request value of the second application; and sending migration confirmation information including identification information of the second child node to the first child node.
[0027] In the scheme, in response to the migration request of the first sub-node, the second sub-node is determined from the sub-nodes other than the first sub-node based on the resource request value of the second application, 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 is migrated to the second sub-node; so as to alleviate the resource utilization pressure of the first sub-node, and timely and effectively guarantee the performance of the application running in the first sub-node.
[0028] In a third aspect, the application further provides an application processing method applied to the communication system.
[0029] The communication system includes a master node and at least two sub-nodes, the at least two sub-nodes include a first sub-node and a second sub-node, and at least one application program runs on the first sub-node.
[0030] The application processing method includes the following steps: the first sub-node acquires the resource utilization rate of the first sub-node and the performance index of the first application program, and the at least one application program includes the first application program. When the resource utilization rate is greater than or equal to a first preset threshold value and the performance index meets the 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, the migration request is used to request migration of the second application program, and the migration request includes a resource request value of the second application program. The master node determines the second sub-node from the sub-nodes other than the first sub-node based on the migration request, and 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, and the migration confirmation information includes the identification information of the second sub-node. The first sub-node receives the migration confirmation information.
[0031] In the scheme, the first sub-node determines whether to actively trigger the migration application based on the resource utilization rate of the first sub-node and the performance index of the application program. When the resource utilization rate of the first sub-node is greater than or equal to a first preset threshold value, and the performance index of the first application program meets the performance degradation condition, the first sub-node sends a migration request to the master node to request migration of the second application program. The master node determines the second sub-node from the sub-nodes other than the first sub-node based on the resource request value of the second application, and returns the identification information of the second sub-node to the first sub-node, so that the first sub-node knows that the second application is migrated to the second sub-node; so as to alleviate the resource utilization pressure of the first sub-node, and timely and effectively guarantee the performance of the application running in the first sub-node.
[0032] In a fourth aspect, the present application also provides a communication system, comprising a master node and at least two slave nodes, the at least two slave nodes comprising a first slave node and a second slave node, and at least one application program running on the first slave node. The first slave node is configured to acquire resource utilization of the first slave node and performance indicators of the 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 and the performance indicators meet performance degradation conditions, the first slave node is further configured to determine a second application program from the at least one application program. The first slave 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 slave node from the slave nodes other than the first slave node based on the migration request, and the remaining resources of the second slave node are 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 slave node, the migration confirmation information comprising identification information of the second slave node. The first slave node is further configured to receive the migration confirmation information.
[0033] In the communication system, the first slave node determines whether to actively trigger migration of the application program based on the resource utilization of the first slave node and the performance indicators of the application program. When the resource utilization of the first slave node is greater than or equal to the first preset threshold and the performance indicators of the first application program meet the performance degradation conditions, the first slave node sends a migration request to the master node to request migration of the second application program. The master node determines the second slave node from the slave nodes other than the first slave node based on the resource request value of the second application program, and returns the identification information of the second slave node to the first slave node, so that the first slave node knows that the second application program is migrated to the second slave node, thereby reducing the resource utilization pressure of the first slave node and timely and effectively ensuring the performance of the application program running in the first slave node.
[0034] In a fifth aspect, the present application also provides a slave node, comprising units or modules for executing the application program processing method of the first aspect.
[0035] In a sixth aspect, the present application also provides a master node, comprising units or modules for executing the application program processing method of the second aspect.
[0036] In a seventh aspect, the present application also provides a communication device, comprising a processor and a memory, wherein the processor and the memory are connected, the memory is configured to store program code, and the processor is configured to call the program code to execute the application program processing method of any one of the first aspect or the second aspect.
[0037] In an eighth aspect, the present application provides a computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the application processing method according to any one of the first aspect or the second aspect.
[0038] In a ninth aspect, the present application provides a computer program product containing instructions which, when the computer program product is executed on a computer, cause the computer to carry out the application processing method according to any one of the first aspect or the second aspect.
[0039] In a tenth aspect, the present application provides a chip, the chip comprising a processor and a data interface, the processor reading instructions stored on a memory through the data interface and executing the application processing method according to any one of the first aspect or the second aspect.
[0040] Optionally, as an implementation manner, the chip can further comprise a memory, the memory storing instructions, and the processor being 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 according to any one of the first aspect or the second aspect. BRIEF DESCRIPTION OF DRAWINGS
[0041] The drawings used in the embodiments of the present application are described below.
[0042] Figure 1A A flowchart of a vertical elastic scaling technology provided for the embodiments of the present application;
[0043] Figure 1A A flowchart of a cluster node load balancing technology provided for the embodiments of the present application;
[0044] Figure 2A A system architecture schematic diagram of an application processing method provided for the embodiments of the present application;
[0045] Figure 2A A system architecture schematic diagram of another application processing method provided for the embodiments of the present application;
[0046] Figure 2A An implementation form schematic diagram of an application processing method provided for the embodiments of the present application;
[0047] Figure 3 A flowchart of an application processing method provided for the embodiments of the present application;
[0048] Figure 4A A specific flowchart of an application processing method provided for the embodiments of the present application;
[0049] Figure 4AA function resource recommendation adjustment flowchart provided for an embodiment of the present application;
[0050] Figure 4A A normal distribution diagram of resource usage of a function instance provided for an embodiment of the present application;
[0051] Figure 4A A normal distribution diagram of end-to-end execution time of a function instance of different time windows provided for an embodiment of the present application;
[0052] Figure 4A A function migration flowchart provided for an embodiment of the present application;
[0053] Figure 4A A flowchart of determining resource configuration recommendation parameters provided for an embodiment of the present application;
[0054] Figure 4A A calculation example diagram of a second burst resource compensation coefficient provided for an embodiment of the present application;
[0055] Figure 5 A structure schematic diagram of a sub-node provided for an embodiment of the present application;
[0056] Figure 6 A structure schematic diagram of a master node provided for an embodiment of the present application;
[0057] Figure 7 A structure schematic diagram of a communication device provided for an embodiment of the present application. DETAILED DESCRIPTION
[0058] The technical solutions in the present application will be described below with reference to the drawings.
[0059] In the embodiments of the present application, the words such as "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 more preferred or advantageous than other embodiments or design solutions. Rather, the use of the words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.
[0060] 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.
[0061] 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.
[0062] 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.
[0063] For ease of understanding, the related concepts related to the related terms involved in the embodiments of the present application are introduced as follows.
[0064] (1) Container orchestration engine (Kubernetes, K8s)
[0065] 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.
[0066] And the pod is the smallest deployable computing unit (software level) created and managed in K8s. It is a combination of one or more containers, each of which runs an application instance.
[0067] (2), Functions
[0068] Functions refer to user business code running in the cloud platform system, and are pre-defined function blocks (composed of code).
[0069] (3), Function Instance
[0070] The function instance is also the running instance of the function, which refers to the Pod (carrier) where the user business code runs.
[0071] (4), Resources
[0072] 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).
[0073] The resource utilization rate of the device refers to the utilization rate of the hardware resources. For example, the resource utilization rate takes the CPU utilization rate as an example. Assuming that the device has 16 CPUs, and only 8 CPUs are used at this time, the CPU utilization rate of the device is 50%.
[0074] (5), Resource Adjustment
[0075] In the embodiments of the present application, resource adjustment refers to adjusting the size of the hardware resources occupied by the application program.
[0076] (6), Load Balancing / Application Migration
[0077] The application program is migrated from one node (or device) to another node to achieve load balancing.
[0078] (7), CPU Burst Elastic Throttling
[0079] 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.
[0080] 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.
[0081] 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.
[0082] The user's business often exhibits a load with a large fluctuation, such as a sharp increase in business request volume during the day and a sharp decline 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 during the low point 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 improving cluster resource utilization is imminent.
[0083] To alleviate the problem of low cluster resource utilization caused by user over-provisioning of resources, the Vertical Pod Autoscaler (VPA) technology was proposed and applied to cluster resource management. Referring to Figure 1A , Figure 1A A flowchart of a vertical elastic scaling technology provided for embodiments of the present application; this scheme is an elastic scaling technology scheme for unreasonable resource configuration, and the specific steps are as follows:
[0084] (1) The resource collection module periodically collects and stores the resource usage of the function instance, such as storing it in the memory.
[0085] (2) The VPA module regularly pulls historical resource usage data from the memory.
[0086] (3) A histogram is obtained using the historical resource usage data, and the resource value of the specified histogram percentile bin is used as the recommended resource configuration value for the function instance.
[0087] (4) Adjust the resource configuration of the function instance, i.e., update the resource configuration of the Pod where the function instance is located to the above-mentioned resource configuration recommended value.
[0088] Figure 1A The solution can effectively implement the function of dynamically adjusting the resource configuration of function instances, release excess resources for other users to use, and ultimately improve the utilization rate of cluster resources, solving the problem of unreasonable user resource configuration. However, there are still the following deficiencies:
[0089] (1) It does not consider the resource requirements of application latency performance and cannot quickly respond to adjust application resources according to the current request latency situation, so the tail latency performance of the application cannot be guaranteed.
[0090] (2) Because it overcommits server resources. When there is a traffic peak in the user function instances within the server, the utilization rate of server resources will soar accordingly, resulting in resource competition problems and affecting the performance of all user services within the server, violating the service level objective guarantee for user service performance.
[0091] To solve Figure 1A the problems existing in the solution, the cluster node load balancing technology is proposed. This technology monitors the server load situation and periodically judges whether the server load exceeds the set threshold. Once it exceeds the threshold, it migrates the function instances on the server to other nodes with relatively lower load to relieve the pressure on the high-load server.
[0092] See Figure 1B , Figure 1B which is a flowchart of a cluster node load balancing technology provided by an embodiment of the present application; Figure 1B The solution shown aims at the problem that the elastic scaling technology solution cannot solve the traffic burst situation, adds a rescheduling component to balance the load of cluster nodes, and alleviates the problem of extremely unbalanced node load. The specific steps are as follows:
[0093] 1. The resource collection module periodically collects the resource usage of nodes and function instances and stores it in the memory.
[0094] 2. The VPA module operates in the same way as Figure 1A the operation method described.
[0095] 3. The rescheduling module regularly pulls the historical resource utilization data of nodes and function instances from the memory.
[0096] 4. The rescheduling module senses the node load and generates a load balancing plan. That is, it judges whether it is necessary to migrate function instances according to the current node resource utilization rate and generates a corresponding migration plan.
[0097] 5. Evict and migrate function instances according to the migration plan.
[0098] Figure 1BThe proposed solution can effectively balance cluster load and alleviate the problem of uneven node load affecting user business performance caused by high-density deployment of function instances using VPA technology. However, this solution still has the following shortcomings:
[0099] (1) During the load balancing migration process, the original resource specification size of the function instance is still used as the requested resource quantity, which still has the problem of resource over-provisioning, which will increase the probability of migration failure and limit the deployment density of function instances.
[0100] (2) The migration process uses the native function instance eviction scheme of k8s. The new function instance can only be launched after the function instance is evictioned. The migration takes a long time and affects the performance of the function instance.
[0101] (3) The rescheduling process is triggered periodically. There is a certain time difference between the decision cycle and the actual load change of the node, which may result in insufficient response and affect the performance of the function instance.
[0102] In summary, the primary technical problem addressed by the embodiments of this application is that the node (server) does not respond promptly when the performance of the function corresponding to the user's business deteriorates, thus failing to reliably guarantee the function's performance.
[0103] Furthermore, the technical problem this application aims to solve is that the resource configuration of the function instance migration scheme is unreasonable and the migration time is long, which can easily affect the performance of the migrated function instances. Also, the recommended resource configuration scheme has shortcomings; it only considers the resource dimension and not the function instance performance dimension, which can easily lead to performance degradation of function instances due to resource limitations.
[0104] Therefore, this application proposes an application processing method to address the primary technical problem, which can effectively and promptly ensure application performance. In this application, the application refers to code used to complete user business functions, such as the aforementioned functions or user tasks. The execution carrier for functions is a Pod, while the execution carrier for user tasks is not limited.
[0105] The above application processing method is applied to a communication system. The communication system is a master-slave structure, which includes a master node (or master device) and at least two child nodes (or child devices). The at least two child nodes include a first child node and a second child node, and the first child node runs at least one application.
[0106] For example, the number of master nodes can be one or more, generally one of the master nodes acts as the master node, and the remaining master nodes serve as backup master nodes.
[0107] This application embodiment also provides an application processing method, which can be executed by a sub-node in the above-described communication system, or by a chip in the sub-node.
[0108] The application further provides an application processing method, which can be executed by the master node in the communication system or by a chip in the master node.
[0109] Exemplarily, the communication system can be applied to a distributed cluster (server cluster) and is a resource management technical solution considering resource utilization and performance. That is, the communication system includes at least one master node (server) and at least two slave nodes (servers).
[0110] Exemplarily, the communication system can also be an Internet of Things (IOT) system. That is, the communication system is a master-slave mode IOT system including a master node and at least two slave nodes (i.e., slave nodes). The method of the application can actively migrate user tasks running on the slave nodes. When the resource utilization of a slave node is 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 the performance decline and also not to reduce the resource utilization of the slave node too much.
[0111] Reference Figure 2A , Figure 2A A system architecture diagram 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.
[0112] Exemplarily, each slave node of the communication system of the embodiment of the application is provided with an information acquisition module, a resource recommendation module, a resource adjustment module and a migration management module, and at least one application program runs on the slave node. Figure 2A The slave nodes are exemplified by slave node 1 and slave node 2. The master node is provided with a rescheduling module. Further, the master node can be selectively provided with an information acquisition module, a resource recommendation module, a resource adjustment module and a migration management module. In this case, the master node can serve as one of the slave nodes of the communication system. Among them:
[0113] 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, resource utilization information of a slave node, etc. Exemplarily, the information acquisition module collects information of the application program and the slave node to acquire the at least one information.
[0114] The resource recommendation module is configured to determine resource configuration recommendation parameters of an application program based on time delay information of the application program and resource utilization information of the application program.
[0115] The resource adjustment module is configured to perform parameter configuration on the application based on the resource configuration recommendation parameter.
[0116] The migration management module is configured to be responsible for migration management of the application, to actively trigger migration of the application, and to ensure that performance is not degraded during migration, that is, when resource utilization of the child node 1 is greater than or equal to a first preset threshold, and a performance index (for example, obtained based on time delay information of the application) of the first application of the child node 1 meets a performance degradation condition, a second application is determined from the application 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, and the migration request including a resource request value of the second application.
[0117] 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. As shown in Figure 2A , the second application in the child node 1 is migrated to the child node 2 for running.
[0118] Further, the information acquisition module can report the acquired information to the rescheduling module of the master node for use by the rescheduling module. Illustratively, 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, the second child node being a migration target child node of the second application.
[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. Illustratively, 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, the second child node being a migration target child node of the second application.
[0120] Reference Figure 2B , Figure 2BAnother application processing method system architecture diagram is provided for embodiments of the application; in the embodiments of the application, the sub-nodes in the communication system are taken as sub-node 1 and sub-node 2, and the application is taken as a function, in addition to obtaining various related information of the function itself (such as time delay information, resource utilization information, etc.) and the resource utilization information of the sub-nodes to realize the migration judgment of the function; since the function instance is the carrier of the function running, it can also be to obtain various related information of the function instance, and to perform function migration judgment based on the various related information of the function instance and the resource utilization information of the sub-nodes, at this time, the function resource adjustment is to adjust the configuration of the function instance, and the function migration is to create a new function instance on a new sub-node. Therefore, Figure 2B The functions of each module in the application are as follows:
[0121] The information obtaining module is configured to obtain time delay information of the function instance, resource utilization information of the function instance, and resource utilization information of the sub-nodes. 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.
[0122] 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.
[0123] The resource adjustment module is configured to perform resource adjustment on 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.
[0124] The migration management module is configured to be responsible for migration management of the function instance, to actively trigger function instance migration, and to ensure that the performance is not degraded during the migration process. Wherein, the migration of the function instance is the migration of the function. Specifically, when the resource utilization rate of the sub-node 1 is greater than or equal to a first preset threshold, and the performance index (for example, obtained based on the time delay information of the function instance) of the first function instance of the sub-node 1 meets the performance degradation condition, a second function instance is determined from the function instance of the sub-node 1; and a migration request is sent to the rescheduling module, the migration request is used to request to migrate the second function instance, and the migration request includes a resource request value of the second function instance.
[0125] The rescheduling module is configured to receive the migration request sent by the migration management module, and to select a suitable sub-node to place the second function instance. For example, Figure 2BAs shown, the second function instance in the child node 1 is migrated to the child node 2 for running, specifically, the child node 1 exits the original second function instance after creating the second function instance in the child node 2.
[0126] The function instance Pod pool is used to carry the function instance and includes at least one Pod to run at least one function instance.
[0127] Reference Figure 2C , Figure 2C An implementation form of an application processing method provided by an embodiment of the present application is shown in the figure; 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 program is improved, and a second-level response can be realized. As another example, the information acquisition module, the resource recommendation module and the resource adjustment module can also be arranged in the resource management component.
[0128] As Figure 2C shown, 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.
[0129] The child node of the communication system is taken as an example, and the first child node includes a resource management component and other software and hardware resources such as CPU and MEM.
[0130] 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).
[0131] The application processing method provided by the embodiment of the present application is described in detail below.
[0132] Reference Figure 3 , Figure 3 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 child nodes, the at least two child nodes include a first child node and a second child node, and at least one application program runs on the first child node. In the embodiment of the present application, the execution subject of the application processing method is taken as an example of the first child node and the master node, and the application processing method includes the following steps:
[0133] 301. The first child node acquires the resource utilization rate of the first child node and the performance index of the first application program, and the at least one application program includes the first application program.
[0134] Specifically, 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 unit (CPU) resources, and the storage resources include memory (MEM) resources and external storage resources, and the memory includes random access memory (RAM). Therefore, the resource utilization of the child node refers to the utilization of the hardware resources. Taking the CPU resources as an example, assuming that the child node has 16 CPUs, and only 8 CPUs are utilized, the CPU utilization of the child node is 50%.
[0135] 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.
[0136] For another 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 a function instance, and the performance of the function is indirectly represented by the performance indicator of the function instance.
[0137] For example, the performance degradation times of the application program can be determined based on the time delay information of the application program, and details are described below, which are not repeated here.
[0138] For example, the first child node can collect the resource utilization information of itself and the time delay information of the first application program, to obtain the resource utilization 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 time delay information. For another example, the first child node can also obtain the resource utilization 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 of the first child node and the performance indicator of the first application program is not limited.
[0139] 302、When the resource utilization 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.
[0140] Specifically, the specific value of the first preset threshold value can be determined according to actual conditions. Similarly, the performance degradation condition can be set according to the specific conditions and actual conditions of the performance indicator, which is not limited.
[0141] When the first child node confirms that the application program needs to be migrated based on the resource utilization and the performance indicator, the first child node determines the second application program 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.
[0142] 303、the first sub-node sends a migration request to the master node, the migration request being used to request migration of the second application, the migration request comprising a resource request value of the second application.
[0143] Specifically, a corresponding migration request is generated for each second application, the application having a resource size of a resource request value of the second application, and the migration request is sent to the master node to trigger migration of the second application.
[0144] 304、the master node determines a 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, the second sub-node having a remaining resource greater than or equal to the resource request value of the second application.
[0145] Specifically, for each migration request, a second sub-node is determined based on the resource request value.
[0146] 305、the master node sends migration confirmation information to the first sub-node, the migration confirmation information comprising identification information of the second sub-node.
[0147] Specifically, the master node sends the identification information of the second sub-node to the first sub-node to inform the first sub-node to migrate the second application to the second sub-node. Exemplarily, the first sub-node can migrate the second application to the second sub-node in a performance lossless (non-degrading) manner.
[0148] 306、the first sub-node receives the migration confirmation information.
[0149] Specifically, the first sub-node can determine to migrate the second application to the second sub-node based on the migration confirmation information.
[0150] In the communication system of the embodiments of the present application, the first sub-node determines whether to actively trigger migration of an application based on a resource utilization rate of the first sub-node and a performance index of the application. When the resource utilization rate of the first sub-node is greater than or equal to a first preset threshold and the performance index of the first application meets a performance degradation condition, the first sub-node actively triggers migration of the application, i.e., the first sub-node sends a migration request to the master node to request migration of the second application. The master node determines a second sub-node from sub-nodes other than the first sub-node among the at least two sub-nodes based on a resource request value of the second application, and returns identification information of the second sub-node to the first sub-node, so that the first sub-node knows to migrate the second application to the second sub-node, thereby reducing resource utilization pressure of the first sub-node and timely and effectively guaranteeing performance of an application running in the first sub-node.
[0151] The application program processing method of the embodiments of the present application can actively perceive the change of resource utilization of the sub-node and the change of performance of the application program, to actively select and trigger the application program migration, realize the adaptive management of the node application program, can quickly respond to the migrated application program, reduce the performance degradation of the application program in the sub-node caused by resource competition, and ensure the performance of the application program is not degraded.
[0152] In a possible implementation, before step 301, the reference Figure 4A , Figure 4A A specific flowchart of an application program processing method provided by the embodiments of the present application; the above-mentioned application program processing method further includes the following steps:
[0153] 307, the first sub-node acquires the time delay information of the first application program, and the resource utilization information of the first application program.
[0154] Specifically, the time delay information of the first application program is information directly or indirectly representing the time delay condition of the first application program, and the specific information type is not limited. For example, the time delay information of the first application program includes the execution time delay of the first application program, the migration time length of the first application program or the average request per second (i.e. how many user requests come per second) of the first application program.
[0155] For example, when the application program 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, and the time delay condition of the function is indirectly represented by the time delay information of the function instance.
[0156] And the resource utilization information of the first application program is information directly or indirectly representing the resource utilization condition of the first application program, and the specific information type is not limited. For example, the resource utilization information of the first application program includes the resource usage (CPU usage or MEM usage, etc.), the total CPU flow limiting time or the flow limiting times, etc.
[0157] For example, when the application program 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, and the resource utilization condition of the function is indirectly represented by the resource utilization information of the function instance.
[0158] Exemplarily, Figure 4AIn the embodiment, taking the information acquisition module, the resource recommendation module and the resource adjustment module integrated in the resource management component as an example, after deployment is completed, the information acquisition module in the resource management component of the first sub-node will start to collect information, including collecting the time delay information of the application program and the resource utilization information of the application program. For example, the information acquisition module can monitor and collect the resource utilization information of the application program at a first period (the specific value of the first period can be set according to actual conditions, for example, 1 second, etc.), and cache to the internal memory and the external memory. In addition, for the collection of the time delay information of the application program, the information acquisition module will record the end-to-end execution time of the request (that is, the execution time delay of the application program) when the application program completes the user request, and record the migration time length of the application program from starting to migration to the end of migration (if there is no migration record of the application program, the migration time length can be a default value), and cache to the internal memory and the external memory. In addition, the information acquisition module can also collect the resource utilization information of the sub-node at the first period.
[0159] 308. The first sub-node determines the resource configuration recommendation parameter of the first application program based on the time delay information and the resource utilization information.
[0160] 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.
[0161] For example, the resource recommendation module in the resource management component in the first sub-node statistically analyzes 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 internal 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.
[0162] 309. The first sub-node performs parameter configuration on the first application program based on the resource configuration recommendation parameter.
[0163] 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 parameter configuration of the function can be the process of configuring the function instance, and at this time, the above-mentioned resource configuration recommendation parameter of the first application program is the resource configuration recommendation parameter of the function instance.
[0164] 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 acquires the resource utilization rate of the first sub-node and the performance index of the first application program.
[0165] 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. The first sub-node can be any sub-node in the communication system, and the parameter configuration process of the application programs of other sub-nodes in the communication system is the same as the parameter configuration process of the application programs of the first sub-node, which is not described herein.
[0166] Exemplarily, the first sub-node further obtains resource utilization information of the first sub-node, and 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 obtaining 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.
[0167] Exemplarily, the master node can send the time delay information of the application program C uploaded by the sub-node A and / or the resource utilization information of the application program C to the sub-node B, and when the sub-node B cannot obtain the related information of the application program C temporarily, the related information of the application program C of the sub-node A can be directly used as the related information of the application program C corresponding to the sub-node B, so as to ensure that the sub-node B successfully obtains the related information of the application program.
[0168] In a possible implementation, the resource utilization information includes resource usage of the first application program, and the resource usage can be CPU usage or MEM usage, which is not limited herein. The resource configuration recommendation parameter includes a resource configuration recommendation value of the first application program. Correspondingly, when the resource usage is CPU usage, the resource configuration recommendation value is a CPU resource configuration recommendation value; and when the resource usage is MEM usage, the resource configuration recommendation value is a MEM resource configuration recommendation value. The step 308 specifically includes the following steps.
[0169] 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.
[0170] 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 program, and the second normal distribution information corresponding to the resource usage can be determined based on the resource usage of the first application program.
[0171] 382. The first sub-node determines an initial resource configuration recommendation value of the first application program based on the first normal distribution information and the second normal distribution information.
[0172] 383. The first sub-node determines a 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.
[0173] In this embodiment, the first child node can determine the 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 of the first application, and finally determine the resource configuration recommendation value of the first application in combination with 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 this embodiment, the resource compensation is performed on the application according to the actual situation of the application to determine the resource configuration recommendation value of the application, which not only does not waste the resources of the first child node, but also effectively guarantees the performance of the application and ensures the user's application experience.
[0174] Reference Figure 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 determined.
[0175] In a possible implementation, reference Figure 4A In the step 302, the first child node determines the second application from the at least one application, which specifically includes the following steps:
[0176] 321. The first child node determines the priority order of the at least one application.
[0177] Specifically, the higher the sensitivity of the application to the time delay, 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 time delay sensitivity.
[0178] 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.
[0179] Specifically, the resource utilization of the first sub-node is less than a second preset threshold after the second application program is migrated. The specific value of the second preset threshold can be set according to actual conditions, and is not particularly limited. The first preset threshold and the second preset threshold can be the same or different.
[0180] For example, the migration management module can select the application program with the last priority in the first sub-node as the second application program in sequence, the number of the second application programs is one or more, until the resource utilization of the first sub-node is less than the second preset threshold after the second application program is migrated.
[0181] In the embodiments of the present application, the first sub-node preferentially migrates the application program with low time delay 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 delay sensitivity, such as the service level objective (SLO) or service level agreement (SLA) of the application program.
[0182] For another example, when the application program is a function, since the function instance is the running carrier of the function, the first sub-node can determine the second function from the at least one function as the second application program is determined from the at least one function, and migrate the second function; or the first sub-node can determine the second function instance from the at least one function instance as the second application program is determined from the at least one function instance, and migrate the second function instance. The number of the second function or the second function instance is one or more. Wherein, migrating the function is equivalent to migrating the function instance.
[0183] Further, referring to Figure 4A , the migration management module generates a migration request for the second application program, and sends the migration request to the master node, the migration request including 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, to migrate the second application program. The specific migration process can be referred to the related description of the following Figure 4E .
[0184] 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 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. 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.
[0185] For any application, the resource request value of the application is obtained based on the resource configuration recommended value of the application and the migration compensation resource value, and the migration compensation resource value is obtained based on the time delay information of the application and the resource usage of the application.
[0186] In the embodiment, the resource compensation for the time delay caused by the migrated application is used to determine the resource request value of the application, which can guarantee the performance of the application after migration, improve the processing capacity of the application after migration, alleviate the performance impact of the migration process on the application, and ensure the user's application experience.
[0187] In a possible implementation, the second child node is determined by the master node 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.
[0188] In the embodiment, the master node determines the second child node 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 that has resources to run the second application, i.e., the remaining resources of the second child node are greater than or equal to the resource request value of the second application, so as to ensure that the second application can be reliably run after being migrated.
[0189] The specific process of determining the resource configuration recommended value of the application and the migration of the application is described below.
[0190] Reference Figure 4B , Figure 4B A resource recommendation adjustment flowchart of a function is provided for the embodiments of the application. In the embodiments of the application, the application is taken as an example of a function, the resource configuration recommended value of the function is taken as the resource configuration recommended value of a function instance, the time delay information of the function is taken as the time delay information of the function instance, the performance indicator of the function is taken as the performance indicator of the function instance, and the resource utilization information of the function is taken as the resource utilization information of the function instance. Illustratively, in a communication system, the information acquisition module, the resource recommendation module, and the resource adjustment module in the child nodes are arranged in a resource management component, which can realize the adaptive adjustment and configuration of the function instance resources of the child nodes, is responsible for the information collection of the function instance and the child nodes, the resource recommendation of the function instance, and the resource adjustment of the function instance, and a rescheduling module is deployed on the control plane of the master node and is responsible for the selection of the target node of the function instance during the migration of the function instance.
[0191] The flow of the adaptive adjustment and configuration of the function instance resources includes the following steps:
[0192] 1. The information acquisition module periodically collects resource utilization information of the current function instance, end-to-end execution time of the function instance and migration duration of the function instance at a first period (e.g., 1 second), and caches the collected data in the memory.
[0193] Specifically, the child node receives a user request to trigger the 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 embodiments of the present application, the resource utilization information of the function instance includes the resource usage of the function instance.
[0194] 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 the resource configuration recommendation value of the function instance based on the normal distribution adaptive resource recommendation algorithm of the above statistical data, wherein the calculation steps of the recommendation algorithm are as follows:
[0195] (a) Obtain the second normal distribution information corresponding to the resource usage of the function instance. In the embodiments of the present application, the second normal distribution information is taken as an example of a normal distribution graph. For example, the normal distribution graph of the resource usage of the function instance is obtained by using the resource usage of the function instance in the past all time, and the reference Figure 4C , Figure 4C is a normal distribution graph of the resource usage of the function instance provided by an embodiment of the present application. The above past all time refers to the time from the start of the running of the function instance to the reading time, and the second normal distribution information is obtained based on the read data, that is, the normal distribution graph corresponding to the resource usage of the function instance, which includes the cumulative percentage and the corresponding Z-score (Z-Score). When the resource usage of the function instance is CPU usage, the normal distribution graph corresponding to the resource usage is the normal distribution graph of the CPU usage; when the resource usage of the function instance is MEM usage, the normal distribution graph of the resource usage is the normal distribution graph of the MEM usage.
[0196] (b) Obtain the first normal distribution information corresponding to the latency information of the function instance. In the embodiments of the present application, the first normal distribution information includes normal distribution graphs corresponding to latency information of at least three time windows. For example, the three time windows can be understood as three different time lengths, such as past all time, past K hours and past T minutes; or past all time, past W days and past V hours, and the specific time window can be defined according to the actual situation.
[0197] For example, the normal distribution graphs corresponding to the end-to-end execution time of the function instance in different time windows in the past are counted, and the reference Figure 4D , Figure 4DA normal distribution diagram of end-to-end execution time of a function instance of different time windows provided for embodiments of the present application; the time windows are divided into three, 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.
[0198] (c) determining an initial resource configuration recommendation value of the function instance based on the first normal distribution information and the second normal distribution information; determining a resource configuration recommendation value of the function instance based on the initial resource configuration recommendation value and a resource compensation coefficient of the function instance.
[0199] Exemplarily, referring to Figure 4D , according to the end-to-end execution time value S 3σ of 3σ in the normal distribution diagram of the short time window 3σ , the mean μ and the standard deviation σ of the middle time window and the long time window are respectively calculated S M = μ + 3σ. L , the corresponding calculation formula is as follows: Zscore = (S 3σ - μ) / σ.
[0200] Based on ZscoreM and ZscoreL, the final Zscore = (1-α)*Zscore L + α*Zscore M is calculated by a weighted manner, and the Zscore is mapped to the cumulative percentage of the normal distribution diagram of the resource usage of the function instance, and the resource usage corresponding to the quantile value is used as the initial resource configuration recommendation value R. Wherein α is a configurable weight, and the value range is [0, 1]. As Figure 4C shown, assuming Zscore = 2, the initial resource configuration recommendation value R is the resource usage corresponding to the 97.7% quantile of the cumulative percentage of the function resource usage.
[0201] The resource configuration recommendation value Rf of the function instance = R*(1+β), wherein β is a resource compensation coefficient of the function instance, and the specific value of β can be set according to the actual situation. For example, for a time-sensitive function instance, β>0. And for a time-insensitive function instance, β≤0. For different resource usage types (CPU or MEM, etc.), β can also be set to different values.
[0202] For how to distinguish the time-sensitive function instance, the function instance can be specified by the user as a time-sensitive function instance; or according to the end-to-end execution time value S 3σwhether less than a set latency sensitive threshold L thresh old to determine, when S 3σ <L threshold the function instance is a latency sensitive function instance; and when S 3σ ≥L threshold the function instance is a latency insensitive function instance.
[0203] Exemplarily, the value of β can also be determined in combination with the resource utilization of the child node, and the specific determination method is not limited. For example, the F% quantile value of the resource utilization of the child node in a short time window of the function instance is used as an index, when the F% quantile value of the resource utilization of the child node ≤ threshold TP, the value of β of the latency sensitive function instance is 0.1 (which can also be other numerical values), and the value of β of the latency insensitive function instance is 0 (which can also be other numerical values). When the F% quantile value of the resource utilization of the child node > TP, the value of β of the latency sensitive function instance is 0.15 (which can also be other numerical values), and the value of β of the latency insensitive function instance is -0.1 (which can also be other numerical values). The specific value of F can be set according to actual conditions, and is not particularly limited.
[0204] 3. Exemplarily, after the resource adjustment module receives the resource configuration recommendation 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 pass operation, that is, it is directly determined that the current cgroups parameter can be modified; or it can be judged whether the difference between the current cgroups parameter and the resource configuration recommendation 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.
[0205] In the embodiments of the present application, according to the changes of the resource utilization and the latency performance of the function instance, the normal distribution adaptive resource recommendation algorithm based on the resource utilization and the latency information statistical data of the function instance is used to realize the adaptive resource adjustment management of the function instance of the child node, 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 child node is improved, and the resource utilization of the child node is improved.
[0206] In addition, the normal distribution adaptive resource recommendation algorithm based on the resource utilization and the latency information statistical data of the function instance is used to recommend a resource configuration recommendation 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 migration process on the function instance can be alleviated.
[0207] The resource recommendation algorithm described above is a normal distribution adaptive resource recommendation algorithm based on the resource utilization and latency information statistics of function instances. Its recommendation process can be applied not only to the migration process of function instances, but also to the execution process of function instances.
[0208] After the resource adjustment module sets the recommended resource configuration values for the application, running the application will trigger the migration management module on the child node to perform self-checks on changes in the child node's resource utilization and application latency information, and determine whether to actively trigger application migration. (Reference) Figure 4E , Figure 4E A flowchart of function migration is provided for an embodiment of this application; the application takes a function as an example, and the child node takes child node 1 as an example. The specific steps are as follows:
[0209] 1. Autonomous management of function instances and migration determination.
[0210] In this embodiment, the resource configuration of a function is exemplified by the resource configuration of a function instance. After the resource adjustment of the function instance is completed, child node 1 actively detects the load status of child node 1 and the latency information changes of the function instance. If it is found that the resource utilization of child node 1 is greater than or equal to the set first preset threshold X, and there is a performance indicator of the function instance that meets the performance degradation condition (the performance degradation condition is, for example, the end-to-end execution time of the function instance continuously deteriorates N times), then the active migration process of the function instance is triggered.
[0211] (a) The migration management module on child node 1 senses the current load of the child node and the latency information of the function instance. If it finds that the resource utilization of the child node is greater than or equal to X (e.g., 65%) and the performance of a certain function instance continues to deteriorate N times, if the conditions are not met, the decision is not to perform the active migration operation of the function instance in this round; otherwise, the active migration operation of the function instance is performed (continue to step 2).
[0212] The resource utilization rate of a child node can be calculated based on its load. For example, if a child node has 64 CPUs and only uses 32 CPUs, then the resource utilization rate is 50%.
[0213] For example, if the end-to-end execution time of a function instance is greater than the end-to-end execution time (or a fixed value) of the previous decision, or if the difference between the two exceeds a preset difference (5%), it is considered a degradation of the function instance.
[0214] (b), the function instances are sorted according to priorities of the functions to obtain a sorted function instance queue, and the priorities mainly include user-defined function instance priorities, time delay sensitivities of the function instances, resource usage of the function instances or migration time lengths of the function instances. For example, the higher the time delay sensitivity of the function instance is, the higher the priority is. The higher the resource usage of the function instance is, the higher the priority is. The longer the migration time length of the function instance is, the higher the priority is.
[0215] (c), low-priority function instances are selected from the sorted function instance queue in sequence as the migrated function instances and added to the migration queue until the resource utilization of the subnode is reduced to below the second preset threshold S (for example, S is 60% or S is equal to X).
[0216] 2) For each function instance in the migration queue, the migration management module on the subnode 1 requests the resource recommendation module to recommend a resource request value Rm with a migration compensation resource 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:
[0217] (a), according to historical end-to-end execution time data and resource usage data of the function instance, a function instance average processing rate-resource usage fitting curve: Resource = F (PPS) is constructed, and PPS is the average processing rate of the function instance.
[0218] For example, the resource usage of the function instance is taken as 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.
[0219] (b), in the embodiment of the application, the time delay information collected by the information acquisition module of the subnode 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 of the function instance collected by the information acquisition module of the subnode 1 (historically collected or a default value) and the average per-second request QPS of the function instance, 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).
[0220] (c), the end-to-end execution time value in the 3σ of the normal distribution diagram (as shown in Figure 4D ) of the short time window is used as the expectation Elantency Epps lantency Pn / E lantency .
[0221] (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 compensation required after the migration of the function instance, i.e., the migration compensation resource value Rs.
[0222] (e), the size of the resource request value Rm of the function instance is the resource configuration recommendation value Rf calculated by the dynamic self-adaptive function instance resource recommendation algorithm plus the migration compensation resource value Rs of the function instance, i.e., Rm=Rf+Rs.
[0223] 3, after the rescheduling module receives the migration request of the function instance, a suitable sub-node is selected as a target node to place the migrated function instance according to the resource usage of the current node cluster, and the target node resource is reserved for the function instance to ensure that the function instance can be successfully migrated to the target node; after the decision is successful, the migration management module of the source node (the node where the migrated function instance is located) is notified to perform lossless instance live migration. Illustratively, after the rescheduling module decides successfully, the rescheduling module sends a confirmation migration message to the migration management module of the sub-node 1, and the confirmation migration message includes the identification information of the target node.
[0224] 4, after the migration management module of the sub-node 1 receives the confirmation migration message, the migration management module of the target node is notified to create a new function instance according to the recommended resource request value Rm. Reference Figure 4E , the target node is taken as an example of the sub-node 2.
[0225] 5, the target node creates a new function instance according to the resource request value Rm of the function instance. After the new function instance on the target node is pulled up, it will take over all new user requests and process them.
[0226] 6, the target node notifies the migration management module of the source node that the new instance has been pulled up and run, and the old function instance can be prepared to exit.
[0227] 7, the migration management module of the source node forwards the function requests in the current cache that have not been executed to the new function instance.
[0228] 8, after the old function instance in the source node ends the processing of the last function request, the old function instance is exited, and thus the migration of the function instance, i.e., the migration of the function, is completed.
[0229] 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 creating the user task 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 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 based on the relevant information of the user task to be migrated, the user task accepting a user request to execute the 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 the user task 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.
[0230] 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 throttling time of the CPU 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. It is referred to Figure 4F , Figure 4F A flowchart for determining a resource configuration recommendation parameter is provided for the embodiments 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 a 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.
[0231] Specifically, the step 308 further includes the following steps:
[0232] 384、The first sub-node determines a first burst resource compensation coefficient based on the total throttling time of the CPU 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 throttling time trottled_time to the throttling frequency nr_throttled.
[0233] Specifically, the first burst resource compensation coefficient C1 can be the average throttling time of the application program (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.
[0234] 385、The first sub-node determines a second burst resource compensation coefficient C2 based on the first normal distribution information.
[0235] 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.
[0236] For example, based on Rf_cpu, C1 and C2, the CPU burst resource configuration recommendation value Bf of the application program can be calculated, for example, Bf = Rf_cpu*(1+max(C2,0))+C1. For another example, the CPU burst resource configuration recommendation value Bf of the application program can also be calculated based on the configurable parameter γ, Rf_cpu, C1 and C2. For example, Bf = (Rf_cpu*γ)*(1+max(C2,0))+C1. Wherein, γ can be configured differently according to different application programs. For example, the function of the application program, the γ of the function instance of the latency-sensitive type is greater than the γ of the function instance of the latency-insensitive type.
[0237] In this embodiment, the first burst resource compensation coefficient is determined based on the CPU throttling information of the first application program, 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 program. 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.
[0238] For example, referring to Figure 4G , Figure 4G A second burst resource compensation coefficient calculation example diagram provided for an embodiment of the present application; the normal distribution mean μ L of the long time window is mapped 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 obtain the second burst resource compensation coefficient C2 = P3σ -Pμ L .
[0239] In the embodiments of the present application, the numbering of steps does not limit the execution order between steps, and the numbering of steps is only for distinguishing different steps.
[0240] The device provided in the present application will be described in detail below.
[0241] Figure 5 A structure diagram of a sub-node provided in an embodiment of the present application is shown in the figure. Figure 5 The sub-node shown can be used to implement the above-mentioned Figure 3 The function of the first sub-node in the application program processing method embodiment shown in the figure can also achieve the beneficial effects possessed by the above-mentioned 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 the electronic device.
[0242] As shown in the figure, Figure 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-mentioned 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-mentioned application program processing method embodiment, and the module can be implemented by software, hardware, firmware, or any combination thereof, in whole or in part.
[0243] When the sub-node 500 is used to implement the function of the first sub-node in the above-mentioned application program processing method embodiment, the acquisition module 510 is used to acquire the resource utilization of the first sub-node and the performance index of the first application program. The at least one application program includes the first application program. The processing module 520 is used 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 index of the first application program meets the performance degradation condition. The sending module 530 is used 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 including a resource request value of the second application program. The receiving module 540 is used to receive the migration confirmation information sent by the master node. The migration confirmation information includes identification information of a second sub-node, and the remaining resources of the second sub-node are greater than or equal to the resource request value of the second application program.
[0244] The child node 500 determines whether to actively trigger the migration of the application 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 the first preset threshold, and the performance indicator of the first application meets the performance degradation condition, the second application is migrated to the second child node to reduce the resource utilization pressure of the first child node, and the performance of the application running in the first child node is effectively ensured in time.
[0245] In a possible implementation, the processing module 520 is specifically configured to determine the 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 at the back of the order is taken as the second application. When the second application is migrated, the resource utilization of the first child node is less than the second preset threshold.
[0246] In a possible implementation, before the acquisition module 510 acquires the resource utilization of the first child 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 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 further configured to perform parameter configuration on the first application based on the resource configuration recommendation parameter.
[0247] In a possible implementation, the resource utilization information includes the 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 initial resource configuration recommendation value of the first application is determined based on the first normal distribution information and the second normal distribution information. The resource configuration recommendation value of the first application is determined based on the initial resource configuration recommendation value and a resource compensation coefficient of the first application.
[0248] In a possible implementation, the resource configuration recommendation value is a CPU resource configuration recommendation value. The resource utilization information further includes a total CPU throttling time of the first application and a throttling frequency. The resource configuration recommendation parameter further includes a CPU burst resource configuration recommendation value of the first application. The processing module 520, in the determination of the resource configuration recommendation parameter of the first application based on the time delay information and the resource utilization information, specifically determines a first burst resource compensation coefficient based on the total CPU throttling time and the throttling frequency, where the first burst resource compensation coefficient is a ratio of the total CPU throttling time to the throttling frequency. A second burst resource compensation coefficient is determined based on the first normal distribution information. The CPU burst resource configuration recommendation value is determined based on the CPU resource configuration recommendation value, the first burst resource compensation coefficient, and the second burst resource compensation coefficient.
[0249] 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, where 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.
[0250] In a possible implementation, the second child node is determined based on the resource request value of the second application and resource utilization information of child nodes other than the first child node.
[0251] The above modules can be understood in the description of the application program processing method embodiments, which will not be repeated here.
[0252] Figure 6 A structure diagram of a master node provided in the embodiments of the present application is shown in FIG. 6. Figure 6 The master node shown in FIG. 6 can be used to implement the master node in the above Figure 3 application program processing method embodiments, and thus can achieve the beneficial effects of the above method embodiments. In the embodiments of the present application, the master node can be an electronic device, or a module (such as a chip) applied in an electronic device.
[0253] 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 configured to implement the functions of the master node in the above Figure 6 application program 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 program processing method embodiments, which can be implemented by software, hardware, firmware, or any combination thereof, in whole or in part.
[0254] When the master node 600 is configured to implement the function of the master node in the above-mentioned application processing method embodiment, the receiving module 610 is configured to receive a migration request sent by the first sub-node, wherein the migration request comprises a resource request value of a second application, and the at least one application comprises the second application. The processing module 620 is configured to determine 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. The sending module 630 is configured to send migration confirmation information to the first sub-node, wherein the migration confirmation information comprises identification information of the second sub-node.
[0255] 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 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 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 running in the first sub-node.
[0256] For the introduction of each module, please refer to the description of the above-mentioned application processing method embodiment, which will not be repeated here.
[0257] The application further provides a communication system, which comprises Figure 6 The master node and the at least two sub-nodes shown in the figure, wherein the at least two sub-nodes comprise Figure 5 The first sub-node and the second sub-node shown in the figure.
[0258] Reference Figure 7 , Figure 7 A structural schematic diagram of a communication device provided by the embodiment of the application; the communication device 700 comprises a memory 701, a processor 702, a communication interface 704 and a bus 703. Wherein the memory 701, the processor 702 and the communication interface 704 are communicatively connected with each other through the bus 703.
[0259] Optionally, the communication device 700 further comprises a display screen (not shown), which is communicatively connected with 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.
[0260] 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 programs, and when the programs stored in the memory 701 are executed by the processor 702, the processor 702 and the communication interface 704 are configured to perform each step executed by the first sub-node or the master node in the application program processing method of any one of the embodiments of the present application.
[0261] 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, configured to execute related programs to implement the functions required to be performed by the units in the first sub-node or the master node of any one of the embodiments of the present application, or to execute the application program processing method of any one of the embodiments of the present application.
[0262] The processor 702 can also be an integrated circuit chip having a processing capability of signals. In the implementation process, each step of the application program processing method of any one of the embodiments of the present application can be completed by the integrated logic circuit of hardware 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 devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams 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 according to any one of the embodiments of the present application can be directly embodied by a hardware processor to be executed, or 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, an electrically erasable programmable memory, a register, or other mature storage media 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 one of the embodiments of the present application, or to execute the application program processing method of any one of the embodiments of the present application.
[0263] The communication interface 704 uses a transceiving device such as, but not limited to, a transceiver to enable communication between the communication device 700 and other devices or communication networks. For example, latency information or resource utilization information can be obtained through the communication interface 704.
[0264] The bus 703 can include a path that carries information between the various components of the communication device 700 (e.g., the memory 701, the processor 702, the communication interface 704).
[0265] 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 described apparatus embodiments are merely schematic. The division of the units is merely a logical function division. There can be another division manner for the actual implementation, for example, multiple 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 can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.
[0266] 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 multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0267] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can be physically present separately, or two or more units can be integrated into one unit.
[0268] 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.
[0269] 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 processing method, characterized in that, A first child node is applied in a communication system, the communication system including 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, the first child node running at least one application; the method includes: Obtain the resource utilization rate of the first child node and the performance metrics of the first application, wherein the at least one application includes the first application; When the resource utilization rate is greater than or equal to a first preset threshold and the performance index meets the performance degradation condition, a second application is determined from the at least one application. A migration request is sent to the master node. The migration request is used to request the migration of the second application. The migration request includes the resource request value of the second application. The system receives migration confirmation information sent by the master node. The migration confirmation information includes the identification information of the second child node, and the remaining resources of the second child node are greater than or equal to the resource request value of the second application.
2. The method according to claim 1, characterized in that, Determining the second application from the at least one application includes: Determine the priority order of the at least one application, wherein the higher the sensitivity of the application to latency, the higher the priority of the application; Based on the priority order, at least one application ranked lower is selected as the second application, wherein when the second application is migrated, the resource utilization rate of the first child node is less than a second preset threshold.
3. The method according to claim 1 or 2, characterized in that, Before obtaining the resource utilization rate of the first child node and the performance metrics of the first application, the method further includes: Obtain the latency information and resource utilization information of the first application; Based on the latency information and the resource utilization information, the recommended resource configuration parameters for the first application are determined; The first application is configured with parameters based on the recommended resource configuration parameters.
4. The method according to claim 3, characterized in that, The resource utilization information includes the resource usage of the first application; the resource configuration recommendation parameters include the recommended resource configuration values for the first application. The step of determining the recommended resource configuration parameters for the first application based on the latency information and the resource utilization information includes: Determine the first normal distribution information corresponding to the latency information and the second normal distribution information corresponding to the resource usage; The recommended initial resource configuration value for the first application is determined based on the first normal distribution information and the second normal distribution information; The recommended resource configuration value for the first application is determined based on the initial recommended resource configuration value and the resource compensation coefficient of the first application.
5. The method according to claim 4, characterized in that, The recommended resource configuration value is the recommended value for the CPU resource configuration of the central processing unit; the resource utilization information also includes the total CPU throttling time and the number of times the first application was throttled; the recommended resource configuration parameter also includes the recommended value for the CPU burst resource configuration of the first application; The step of determining the recommended resource configuration parameters for the first application based on the latency information and the resource utilization information further includes: A first burst resource compensation coefficient is determined based on the total CPU throttling time and the number of times the CPU was throttled. The first burst resource compensation coefficient is the ratio of the total CPU throttling time to the number of times the CPU was throttled. The resource compensation coefficient for the second outbreak is determined based on the first normal distribution information. The recommended CPU burst resource configuration value is determined based on the recommended CPU resource configuration 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 is the first application. The resource request value is obtained based on the resource configuration recommendation value and migration compensation resource value of the first application. The migration compensation resource value is obtained based on the latency information and resource usage of the first application.
7. The method according to any one of claims 1-6, characterized in that, The second child node is determined based on the resource request value and the resource utilization information of the at least two child nodes other than the first child node.
8. An application processing method, characterized in that, A master node is applied in a communication system, the communication system further including at least two child nodes, the at least two child nodes including a first child node and a second child node, the first child node running at least one application; the method includes: Receive a migration request sent by the first child node, the migration request including a resource request value of the second application, the at least one application including the second application; In response to the migration request, the second child node is determined from the at least two child nodes other than the first child node, and the remaining resources of the second child node are greater than or equal to the resource request value of the second application. Send migration confirmation information to the first child node, the migration confirmation information including the identification information of the second child node.
9. An application processing method, characterized in that, The method is applied to a communication system, which includes a master node and at least two child nodes, the at least two child nodes including a first child node and a second child node, wherein at least one application runs on the first child node; the method includes: The first child node obtains the resource utilization rate of the first child node and the performance indicators of the first application, wherein the at least one application includes the first application; When the resource utilization rate is greater than or equal to a first preset threshold and the performance index meets the performance degradation condition, the first sub-node determines the second application from the at least one application. The first child node sends a migration request to the master node. The migration request is used to request the migration of the second application, and the migration request includes the resource request value of the second application. In response to the migration request, the master node determines the second child node from among the at least two child nodes excluding the first child node, wherein the remaining resources of the second child node are greater than or equal to the resource request value of the second application. The master node sends migration confirmation information to the first child node, and the migration confirmation information includes the identification information of the second child node; The first child node receives the migration confirmation information.
10. A communication system, characterized in that, The system includes a master node and at least two child nodes, the at least two child nodes including a first child node and a second child node, wherein the first child node runs at least one application; wherein... The first child node is used to obtain the resource utilization rate of the first child node and the performance indicators of the first application, wherein the at least one application includes the first application; When the resource utilization rate is greater than or equal to a first preset threshold and the performance index meets the performance degradation condition, the first sub-node is further configured to determine a second application from the at least one application. The first child node is also used to send a migration request to the master node, the migration request being used to request the migration of the second application, the migration request including the resource request value of the second application; The master node is configured to respond to the migration request by determining the second child node from among the at least two child nodes excluding the first child node, wherein the remaining resources of the second child node are greater than or equal to the resource request value of the second application. The master node is also used to send migration confirmation information to the first child node, the migration confirmation information including the identification information of the second child node; The first child node is also used to receive the migration confirmation information.
11. A child node, characterized in that, The sub-node includes a unit or module for performing the method according to any one of claims 1-7.
12. A master node, characterized in that, The master node includes a unit or module for performing the method of claim 8.
13. A communication device, characterized in that, The method includes a processor and a memory, wherein the processor and the memory are connected together, wherein the memory is used to store program code, and the processor is used to call the program code to perform the method as described in any one of claims 1-8.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is executed by a processor to implement the method as described in any one of claims 1-8.