Autonomous system and method for large-scale container cluster based on deep reinforcement learning
By using a resource allocation system based on deep reinforcement learning, the problems of low resource utilization and service quality assurance in container clusters are solved, achieving optimal configuration and efficient utilization of container cluster resources.
Patent Information
- Application Number
- CN202311215604.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-20
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-09-20
AI Technical Summary
Existing container clusters suffer from low resource utilization, inaccurate resource allocation, and an inability to effectively guarantee service quality. Furthermore, existing methods are difficult to apply to complex, general-purpose container cluster environments.
A resource allocation system based on deep reinforcement learning is adopted. Through a data acquisition agent module, a resource allocation calculation module, a hardware mapper, and a scheduler, reinforcement learning methods are used to allocate container resources and optimize the resource utilization and service quality of the container cluster.
Without affecting container services, it improves cluster resource utilization, provides more room for adjustment, ensures service quality, avoids intrusive measurement of business operations, and achieves optimal resource allocation.
Smart Images

Figure CN117194034B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a large-scale container cluster autonomous system and method based on deep reinforcement learning. Background Technology
[0002] With the continuous development of cloud computing technology, container clusters, as a new type of cloud computing architecture, have gradually become a hot topic in the cloud computing field. A container cluster is a highly available and scalable cluster system formed by combining multiple containers to provide more stable and efficient services. The development of container clusters can be traced back to around 2000, when the Linux operating system began to support container technology. However, due to the limitations of hardware and network environments at the time, container clusters were not widely adopted. With the continuous development of cloud computing technology, especially the emergence of Docker container technology, container clusters have gradually become a hot topic in the cloud computing field. Currently, container clusters have become one of the mainstream technologies in the cloud computing field and have been widely used. However, container clusters also have some problems in their application, the most significant of which is low resource utilization and the inability to provide effective quality of service guarantees. While there are many containers in a container cluster, the resource utilization among them is not high, with many containers having a resource utilization rate of only around 10%, leading to resource waste. Simply limiting the hardware resources of containers can result in the inability to guarantee the quality of service for critical containers. To address the aforementioned issues, patent CN113849294A discloses a system and method for scaling up and down Kubernetes pods. This method obtains custom resource files, generates automatically elastic scaling objects, and periodically queries real-time process metrics of pods within nodes to determine whether to scale up or down. However, this system's resource scaling solution relies on simple metric comparisons and cannot accurately limit container resource usage to the optimal level. Furthermore, it lacks awareness and optimization of service quality at the scheduling level, resulting in a lack of holistic approach. Similarly, patent CN116069512A also utilizes reinforcement learning, disclosing a serverless efficient resource allocation method and system based on reinforcement learning. This method minimizes resource configuration consumption in serverless systems while ensuring set performance latency targets by observing the relationship between tail latency, decision frequency, and resource efficiency. However, this method uses tail latency as the optimization target. In complex and general container business cluster environments, the complexity of the business makes tail latency difficult to measure, and different businesses have different definitions, making this method, applicable in serverless environments with high business similarity, difficult to migrate to general container cluster environments.
[0003] A container cluster is a system for managing and deploying containers. A container is a lightweight virtualization technology that packages an application and its dependencies into a portable container, enabling rapid deployment and scaling. A container cluster is a collection of multiple containers that can be managed and deployed using container orchestration tools. A container cluster typically consists of multiple nodes, each capable of running multiple containers. Container clusters can automatically manage and schedule containers for better performance and resource utilization. They also provide high availability and fault tolerance to ensure the stability and reliability of applications. Deep reinforcement learning is an artificial intelligence technique that combines deep learning and reinforcement learning. It can be used to solve complex decision-making problems, such as games, robot control, and autonomous driving. The core idea of deep reinforcement learning is to find the optimal action policy through continuous trial and error to maximize cumulative reward. Deep reinforcement learning typically includes components such as environment, state, action, reward, and policy. The training process includes steps such as sampling, training the policy network, calculating cumulative reward, and updating the value network. Deep reinforcement learning is a highly advanced artificial intelligence technique that can provide effective solutions to decision-making problems in various fields. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of existing technologies by providing a large-scale autonomous system and method for container clusters based on deep reinforcement learning. This invention utilizes deep reinforcement learning networks to achieve adaptive allocation of container resources, effectively improving the resource utilization and service quality of container clusters.
[0005] The objective of this invention is achieved through the following technical solution: A first aspect of this invention provides a large-scale container cluster autonomous system based on deep reinforcement learning, comprising:
[0006] The data acquisition agent module is used to collect system metrics data such as CPU utilization, cache space, memory space and bandwidth, and average cycles per instruction from the container cluster; maintain and update the system metrics of each container service; receive resource query requests sent by the resource allocation calculation module, and return the corresponding query results to the resource allocation calculation module; wherein, the resource query request includes the system identifier of the corresponding container service, and the resource query request return body contains the system metrics corresponding to the queried container service;
[0007] The resource allocation calculation module is used to send resource query requests to the data acquisition agent module to query system indicator data, and analyze and process the received system indicator data to obtain the operating rules and performance characteristics of the container cluster nodes; use the value network to evaluate the service quality of the nodes where the containers are located to obtain evaluation results; formulate corresponding resource allocation schemes based on performance characteristics and evaluation results, and send the resource allocation schemes of each container service to the hardware mapper.
[0008] The hardware mapper is used to receive the resource allocation schemes of each container service from the resource allocation calculation module and map the resource allocation schemes to the hardware nodes.
[0009] An API server provides API interfaces for managing and monitoring the status and performance of container cluster nodes. These API interfaces include various types, such as those for querying node status, querying application performance metrics, and modifying resource allocation schemes.
[0010] The scheduler obtains information about the application to be scheduled from the API server, obtains cluster node resource information from the data acquisition agent module, obtains the service quality evaluation results of the node where the container is located from the resource allocation calculation module, and schedules the application to the optimal container node based on the node resource information and evaluation results.
[0011] Furthermore, the analysis and processing of the received system indicator data to obtain the operating patterns and performance characteristics of the container cluster nodes specifically includes: using reinforcement learning methods to model and obtain the correspondence between resource allocation schemes and the impact on application performance, and formulating resource allocation schemes; wherein the modeling of reinforcement learning methods includes defining the state space, action space, reward function, and state transition.
[0012] Furthermore, the quality of service includes the number of times the average number of cycles per instruction exceeds a threshold and the amount of resources used;
[0013] The value network comprises an input layer, a shared hidden layer, an agent-specific hidden layer, and an output layer. The input layer receives state observation data from agents, including system metric data. One or more shared hidden layers are added to the value network to process the agent state observation data collected by the current node. After the shared hidden layers, one or more agent-specific hidden layers are added to each agent to process the agent's information and make resource allocation decisions based on its own state observation data. The output layer generates a score for the current node's resource allocation for each agent, representing the service quality of the current container service as an evaluation result.
[0014] Furthermore, the step of scheduling the application to the optimal container node based on node resource information and evaluation results specifically includes: the scheduler scoring the resource matching degree between all candidate nodes and the current container to obtain a matching degree score; obtaining the service quality evaluation result of the node where the container is located from the resource allocation calculation module, and scoring the service quality of the container node based on the evaluation result to obtain a service quality score; weighted summing of the matching degree score and service quality score of each container node to obtain a comprehensive score for each container node, and selecting the container node corresponding to the maximum value of the comprehensive score as the optimal container node.
[0015] A second aspect of this invention provides an autonomous method for a large-scale container cluster autonomous system based on deep reinforcement learning, comprising the following steps:
[0016] (1) The API server receives the user's request to add a container service; the scheduler obtains the application information to be scheduled from the API server, obtains the cluster node resource information of the container cluster from the data collection agent module, and obtains the evaluation result of the service quality of the node where the container is located from the resource allocation calculation module; based on the node resource information and the evaluation result of the service quality of the container node, the application is scheduled to the optimal container node.
[0017] (2) The data acquisition agent module collects system indicator data of the container deployment node; the resource allocation calculation module sends a resource query request for the container system indicators to the data acquisition agent module; the data acquisition agent module returns the corresponding query results to the resource allocation calculation module; the resource allocation calculation module calculates the resource allocation scheme, provides the service quality evaluation results of the node where the container is located, and sends the resource allocation scheme of each container service to the hardware mapper.
[0018] (3) The hardware mapper maps the resource allocation scheme obtained by the resource allocation calculation module to the hardware node. The data acquisition agent module and the resource allocation calculation module calculate the service quality of the node where the container is located again, and use the comparison value of the two service quality as the reward function to update the network parameters of the deep reinforcement learning network.
[0019] The beneficial effects of this invention are as follows: This invention uses reinforcement learning to provide optimal container resource configuration without affecting container services, effectively improving the resource utilization of the cluster; This invention does not rely on components that deeply intrude on business operations, such as tail latency measurement; This invention does not rely on historical data of containers; This invention optimizes resources at the scheduling level, which, compared to solutions that only allow for scaling up and down of node containers, provides a wider range of adjustment space and further improves resource utilization. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the cluster autonomous system architecture of the present invention;
[0021] Figure 2 A schematic diagram of a deep reinforcement learning network;
[0022] Figure 3 A schematic diagram of the process for optimizing scheduler nodes. Detailed Implementation
[0023] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims. It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not intended to limit this application.
[0024] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0025] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "in response to determination," or "includes." Moreover, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process or method. Without further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0026] See Figure 1 The autonomous system for large-scale container clusters based on deep reinforcement learning of the present invention includes a data acquisition agent module, a resource allocation calculation module, a hardware mapper, an API server, and a scheduler.
[0027] In this embodiment, the data acquisition agent module is used to collect system indicator data such as CPU utilization, cache space, memory space and bandwidth, and cycle per instruction (CPI) from the container cluster; maintain and update the system indicators of each container service; receive resource query requests sent by the resource allocation calculation module, and return the corresponding query results to the resource allocation calculation module; wherein, the resource query request includes the system identifier of the corresponding container service, and the resource query request return body contains the system indicators corresponding to the queried container service.
[0028] Furthermore, system identifiers include information such as the domain name of the container service, the node corresponding to the Pod, and the deployed application.
[0029] It should be understood that container services refer to applications deployed based on API components of container orchestration systems (such as Kubernetes), such as Deployments and StatefulSets. These applications are packaged into a whole through network and storage sharing, i.e., the Pod concept in Kubernetes. The underlying layer uses several containers to process tasks. These containers include Docker and other container technologies that implement CRI (Container Runtime Interface), and use Kubernetes' Service mechanism to provide services externally in a unified manner. Gateways and service discovery are often used to expose the container service's Service to the outside world in the form of a domain name. For example, in the container service practices of a large internet company, the domain name would be called Appkey, which corresponds to the system identifier of the application (APP).
[0030] Furthermore, the principle used to collect system metric data such as CPU utilization, cache space, memory space and bandwidth, and CPI from the container cluster is similar to that of pmu_exporter. It can directly read the hardware counter registers on the computer motherboard to query the required system metrics such as CPU, memory, and CPI. Using the Prometheus time-series database to store the time-series data for each system metric allows for the maintenance and updating of system metrics for each container service. After reading the hardware counter data, it is formatted into a format that the Prometheus time-series database can understand, such as the Exposition format. This allows for the customization of the Prometheus time-series database exporter, exposing an HTTP endpoint so that the Prometheus time-series database can retrieve system metric data. It ensures that the endpoint returns system metric data in the correct format and complies with the requirements of the Prometheus time-series database, deploying the custom exporter to the target environment and ensuring that the Prometheus time-series database can access it. Resource query requests are made through the HTTP API interface provided by the Prometheus time-series database, allowing queries for system metric data via HTTP requests.
[0031] In this embodiment, the resource allocation calculation module sends a resource query request to the data acquisition agent module to query system indicator data such as CPU utilization, cache, memory space and bandwidth, and analyzes and processes the received system indicator data to obtain the operating rules and performance characteristics of the container cluster nodes; it uses a value network to evaluate the service quality of the nodes where the containers are located to obtain evaluation results; it formulates corresponding resource allocation schemes based on performance characteristics and evaluation results, and sends the resource allocation schemes of each container service to the hardware mapper.
[0032] Furthermore, the operational patterns and performance characteristics of container cluster nodes specifically include: During the operation of container services, different resource allocation schemes will have different impacts on application performance. For example, online web applications have a large demand for network I / O, caching, and memory bandwidth. When less cache is allocated to them, their service quality will be severely affected, resulting in fluctuations in CPI. By modeling the long-term CPI of the application and calculating a threshold by adding three times the standard deviation to the average CPI, if this threshold is exceeded, the container service can be considered to have been affected.
[0033] Furthermore, the received system indicator data is analyzed and processed to obtain the operational patterns and performance characteristics of the container cluster nodes. Specifically, this includes using reinforcement learning methods to model the relationship between resource allocation schemes and the impact on application performance, and formulating resource allocation schemes. The reinforcement learning modeling method includes defining the state space, action space, reward function, and state transition.
[0034] Specifically, the state space represents various aspects of the problem. For container service optimization, the following state factors can be considered: CPU resource usage, memory bandwidth usage, cache usage, etc. The action space defines the different actions the agent can take. To achieve resource allocation, an action can be a percentage of CPU and memory resources allocated to the container; for example, increasing or decreasing CPU resource allocation, memory bandwidth resource allocation, cache resource allocation, etc., mapping each action to a specific resource allocation percentage. The reward function is used to evaluate the actions taken by the agent and provide rewards or penalties based on the effect of the actions; for example, for container service latency optimization, the reward function is defined as the negative value of the number of times the CPI exceeds the threshold plus the amount of resource savings. Thus, the agent will be encouraged to choose actions to reduce the number of times the CPI exceeds the threshold and minimize system resource usage as much as possible; this reward function can also be considered as the service quality of the container service. State transitions specify how the system state is updated after the agent takes an action. State updates are usually influenced by the action; for example, if the agent reduces memory bandwidth resource allocation, the number of times the CPI exceeds the threshold may increase. The state transition equation is: new resource allocation rate = old utilization rate + the increase in memory bandwidth resources corresponding to the number of times the CPI exceeds the threshold.
[0035] Furthermore, a resource allocation scheme is formulated, and the service quality evaluation results of the nodes where the containers reside are provided, implemented based on a deep reinforcement learning network. A Branch Duel Q Network (BDQ) model with multi-agent continuous action space optimization is selected. Each container service is treated as an agent, and each agent in the multi-agent system is treated as an independent Q-learning agent, with each agent having its own state space and action space. The advantage of this BDQ model for container resource allocation is that it can select the optimal resource allocation scheme based on the container's needs and the node's resource availability, thereby improving system resource utilization and ensuring service quality. Figure 2As shown, each container is treated as an agent. Their state is obtained from the data acquisition agent, and the value of the agent is obtained using a value network. The weighted sum of the values of all agents is used as the evaluation of the node's service quality. Simultaneously, each agent can obtain the state value information of other agents by sharing model parameters. Specifically, system metrics such as CPU utilization and computer hardware counters for the corresponding container are used as the state space, and system resource configuration is used as the action space. Data on CPU utilization, cache space, memory space and bandwidth, CPI, and other metrics for each container application in the current container cluster are obtained from the data acquisition agent module. During training, each agent updates its Q-value function based on its own experience and the experience of other agents, and selects the optimal system resource configuration. Each agent can upload its experience data to the shared model during training. Subsequently, each agent uses its policy network to learn the shared model, obtaining the action space value of the corresponding container. Considering random perturbations, a resource allocation scheme with a higher action space value is used. The hardware mapper sets this scheme as the actual container quota through the container update mechanism. In the next iteration, the optimized state value of the container can be obtained, which can be used to update the network parameters of the value network and the policy network.
[0036] Furthermore, the value network is used to evaluate the service quality of the node hosting the container based on the aforementioned system metric data, thereby obtaining an evaluation result for the container application. Service quality includes the number of times the CPI exceeds the threshold and the amount of resources used. The value network structure includes an input layer, a shared hidden layer, agent-specific hidden layers, and an output layer. At the input layer, for each agent, the input layer should receive observation data representing its state, including system metric data such as CPU utilization, memory bandwidth, and cache state, as well as other information, such as the agent's own identifier to distinguish different agents. One or more shared hidden layers are added to the value network. These shared hidden layers can process state observation data collected from all agents at the current node, which helps agents learn how to cooperate to optimize the overall performance of the node. After the shared hidden layers, one or more agent-specific hidden layers are added for each agent. These agent-specific hidden layers can be used to process agent-specific information so that they can make resource allocation decisions based on their own state and behavior. The output layer generates a score for the current node's resource allocation for each agent, representing the service quality of the current container service, as an evaluation result for the container application. The goal of updating the value network parameters is to minimize the mean squared error (MSE) of the Q-value to approximate the actual cumulative reward. The Q-value is defined as the number of times the CPI exceeds a threshold and the amount of resources used. An experience replay buffer is used to store empirical data on agent-environment interactions. A batch of empirical data is randomly sampled from the buffer. The target Q-value is calculated, typically using a target network. The parameters of the target network are frozen to improve stability. The target Q-value is calculated based on the next state. The loss is calculated as the mean squared error between the current Q-value estimate and the target Q-value. The loss function is typically (target Q-value - current Q-value)^... 2 The parameters of the value network are updated using the gradient of the loss function. Stochastic Gradient Descent (SGD) is used to perform the parameter updates.
[0037] Furthermore, a policy network is used to compute the corresponding resource allocation scheme. The policy network structure is similar to the value network, but the final output layer uses the results of both the hidden layers and the value network as input to generate an action for each agent, representing a resource allocation policy, such as the percentage of CPU and memory resources allocated. The output layer of each agent should match its possible action space. The policy network is used to learn the corresponding resource allocation scheme, and the goal of parameter updates is to maximize the expected cumulative reward. A deterministic policy gradient is used to update the parameters of the policy network. It uses an evaluator network (Critic Network) to estimate the value of state-action pairs for calculating the policy gradient. A batch of empirical data, including state, action, reward, and next state information, is randomly sampled from the experience replay buffer. The policy gradient, i.e., the gradient between the target value and the current policy value, is calculated. The target value is usually the cumulative reward. The policy gradient is used to update the parameters of the policy network. A gradient ascent method is used to update the parameters along the direction of the policy gradient to maximize the expected cumulative reward. The resource allocation scheme that maximizes the cumulative reward is obtained.
[0038] In summary, the resource allocation calculation module obtains system indicator data such as CPU utilization, cache space, memory space and bandwidth, and CPI for each container application in the current container cluster from the data acquisition agent module. It then uses a value network to obtain a service quality score for the container application based on this system indicator data, which serves as the evaluation result. A policy network is then used to calculate the corresponding resource allocation scheme. Finally, a hardware mapper modifies the resource configuration of the container application, and the improved service quality evaluation result is used as the reward function for the deep reinforcement learning network to update its network parameters.
[0039] In this embodiment, the hardware mapper is used to receive the resource allocation scheme of each container service from the resource allocation calculation module and map the resource allocation scheme to the actual hardware node.
[0040] In this embodiment, the API server is used to provide API interfaces so that users can manage and monitor the status and performance of container cluster nodes through the API interfaces. The API interfaces include various types, such as API interfaces for querying node status, API interfaces for querying application performance metrics, and API interfaces for modifying resource allocation schemes.
[0041] In this embodiment, the scheduler is used to obtain application information to be scheduled from the API server; obtain container cluster node resource information from the data acquisition agent module; obtain the evaluation results of the value network on the service quality of the node where the container is located from the resource allocation calculation module; and schedule the application to the optimal container node according to the node resource information and the evaluation results.
[0042] Furthermore, based on node resource information and evaluation results, the application is scheduled to the optimal container node. Specifically, this includes: the scheduler scores the resource matching degree between all candidate nodes and the current container to obtain a matching score; the service quality evaluation result of the node where the container is located is obtained from the resource allocation calculation module, and the service quality of the container node is scored based on the evaluation result to obtain a service quality score; the matching score and service quality score of each container node are weighted and summed to obtain a comprehensive score for each container node, and the container node with the maximum comprehensive score is selected as the optimal container node.
[0043] Specifically, the scheduler, based on the traditional resource-aware scheduling strategy, adds awareness of node service quality, optimizing resource utilization and service quality from the perspective of the container cluster. For example... Figure 3 As shown, upon receiving a container scheduling request, the scheduler first scores all candidate nodes based on their resource matching with the current container. Different matching calculation methods can be used, such as the minimum request algorithm, where the closer the node's remaining resources are to its resource request, the higher the score. Next, a score is given based on the node's service quality, directly derived from the value network score on the node, ensuring that container deployment to a node does not interfere with other container services. Finally, the two scores for each node are weighted and summed, and the container node with the higher score is selected as the optimal container node.
[0044] It is worth mentioning that the present invention also provides an autonomous method for a large-scale container cluster autonomous system based on the above-mentioned deep reinforcement learning.
[0045] See Figure 1 The autonomous method described in this embodiment of the invention specifically includes the following steps:
[0046] (1) The API server receives the user's request to add a container service; the scheduler obtains the application information to be scheduled from the API server, obtains the cluster node resource information of the container cluster from the data acquisition agent module, and obtains the evaluation result of the service quality of the node where the container is located from the resource allocation calculation module; based on the node resource information and the evaluation result of the service quality of the container node, the application is scheduled to the optimal container node.
[0047] (2) The data acquisition agent module collects system indicator data such as CPU utilization, cache space, memory space and bandwidth, and CPI of the container deployment node; the resource allocation calculation module sends a resource query request for the container system indicators to the data acquisition agent module; the data acquisition agent module returns the corresponding query results to the resource allocation calculation module; the resource allocation calculation module calculates the resource allocation scheme, provides the service quality evaluation results of the node where the container is located, and sends the resource allocation scheme of each container service to the hardware mapper.
[0048] (3) The hardware mapper maps the resource allocation scheme obtained by the resource allocation calculation module to the actual hardware node. The data acquisition agent module and the resource allocation calculation module calculate the service quality of the node where the container is located again, and use the comparison value of the two service quality as the reward function to update the network parameters of the deep reinforcement learning network.
[0049] Specifically, the autonomous method includes: ① The user initiates a container deployment request to the API server; ② The scheduler obtains the application information to be scheduled from the API server; ③ The scheduler obtains the system resource information of the candidate nodes from the data acquisition agent module; ④ The scheduler obtains the service quality evaluation results of the candidate nodes from the resource allocation calculation module; ⑤ The scheduler schedules the application to the optimal node based on the node resource information and the node service quality evaluation results; ⑥ The data acquisition agent module collects data on indicators such as CPU utilization, cache space, memory space and bandwidth, and CPI of the container deployment node; ⑦ The resource allocation calculation module sends a query request for container system indicators to the data acquisition agent module, and the data acquisition agent module returns the query results to the resource allocation calculation module; ⑧ The resource allocation calculation module calculates the resource allocation scheme and provides the service quality evaluation results of the node where the container is located; ⑨ The resource allocation calculation module sends the resource allocation scheme of each container service to the hardware mapper.
[0050] After receiving a container deployment request, the optimal container node selection mechanism described above has obtained the resource information and service quality assurance information of all candidate nodes. To select the optimal node, all nodes need to be scored. In addition to giving high scores to nodes with high resource requirement matching, nodes with high overall service quality also receive high scores. Finally, the final optimal container node is determined by comparing the weighted scores of both.
[0051] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A large-scale container cluster autonomous system based on deep reinforcement learning, characterized in that, include: The data acquisition agent module is used to collect system metrics data such as CPU utilization, cache space, memory space and bandwidth, and average cycles per instruction from the container cluster. Maintain and update the system metrics for each container service; receive resource query requests sent by the resource allocation and calculation module, and return the corresponding query results to the resource allocation and calculation module; wherein, the resource query request includes the system identifier of the corresponding container service, and the resource query request return body contains the system metrics corresponding to the queried container service; The resource allocation calculation module is used to send resource query requests to the data acquisition agent module to query system indicator data, and analyze and process the received system indicator data to obtain the operating rules and performance characteristics of the container cluster nodes; use the value network to evaluate the service quality of the nodes where the containers are located to obtain evaluation results; formulate corresponding resource allocation schemes based on performance characteristics and evaluation results, and send the resource allocation schemes of each container service to the hardware mapper. The hardware mapper is used to receive the resource allocation schemes of each container service from the resource allocation calculation module and map the resource allocation schemes to the hardware nodes. An API server provides API interfaces for managing and monitoring the status and performance of container cluster nodes. These API interfaces include various types, such as those for querying node status, querying application performance metrics, and modifying resource allocation schemes. The scheduler obtains information about the application to be scheduled from the API server, obtains cluster node resource information from the data acquisition agent module, obtains the service quality evaluation results of the node where the container is located from the resource allocation calculation module, and schedules the application to the optimal container node based on the node resource information and evaluation results.
2. The autonomous system for large-scale container clusters based on deep reinforcement learning according to claim 1, characterized in that, The process of analyzing and processing the received system indicator data to obtain the operating patterns and performance characteristics of container cluster nodes specifically includes: using reinforcement learning methods to model and obtain the correspondence between resource allocation schemes and the impact on application performance, and formulating resource allocation schemes; wherein the modeling of reinforcement learning methods includes defining state space, action space, reward function, and state transition.
3. The autonomous system for large-scale container clusters based on deep reinforcement learning according to claim 1, characterized in that, The quality of service includes the number of times the average number of cycles per instruction exceeds the threshold and the amount of resources used; The value network comprises an input layer, a shared hidden layer, an agent-specific hidden layer, and an output layer. The input layer receives state observation data from agents, including system metric data. One or more shared hidden layers are added to the value network to process the agent state observation data collected by the current node. After the shared hidden layers, one or more agent-specific hidden layers are added to each agent to process the agent's information and make resource allocation decisions based on its own state observation data. The output layer generates a score for the current node's resource allocation for each agent, representing the service quality of the current container service as an evaluation result.
4. The autonomous system for large-scale container clusters based on deep reinforcement learning according to claim 1, characterized in that, The step of scheduling the application to the optimal container node based on node resource information and evaluation results specifically includes: the scheduler scoring the resource matching degree between all candidate nodes and the current container to obtain a matching degree score; obtaining the service quality evaluation result of the node where the container is located from the resource allocation calculation module, and scoring the service quality of the container node based on the evaluation result to obtain a service quality score; weighting and summing the matching degree score and service quality score of each container node to obtain a comprehensive score for each container node, and selecting the container node with the maximum value in the comprehensive score as the optimal container node.
5. An autonomous method for a large-scale container cluster autonomous system based on deep reinforcement learning, as described in any one of claims 1-4, characterized in that, Includes the following steps: (1) The API server receives a user's request to add a container service; The scheduler obtains information about the application to be scheduled from the API server, obtains cluster node resource information from the data acquisition agent module, and obtains the service quality evaluation results of the node where the container is located from the resource allocation calculation module; based on the node resource information and the service quality evaluation results of the container node, the scheduler schedules the application to the optimal container node. (2) The data acquisition agent module collects system indicator data from the container deployment nodes; The resource allocation calculation module sends a resource query request for container system metrics to the data acquisition agent module; The data acquisition agent module returns the corresponding query results to the resource allocation calculation module; The resource allocation calculation module calculates the resource allocation scheme, provides the service quality evaluation results of the node where the container is located, and sends the resource allocation scheme of each container service to the hardware mapper. (3) The hardware mapper maps the resource allocation scheme obtained by the resource allocation calculation module to the hardware node. The data acquisition agent module and the resource allocation calculation module calculate the service quality of the node where the container is located again, and use the comparison value of the two service quality as the reward function to update the network parameters of the deep reinforcement learning network.
Citation Information
Patent Citations
Kubernetes pod capacity expanding and shrinking system and method
CN113849294A
Serverless efficient resource allocation method and system based on reinforcement learning
CN116069512A
Reliable cloud container cluster resource scheduling method and device based on deep reinforcement learning
CN114629906A
Training a student neural network to mimic a mentor neural network with inputs that maximize student-to-mentor disagreement
US20220012595A1
