WO2022105589A1 - 资源调度方法、装置、电子设备和计算机可读介质 - Google Patents

资源调度方法、装置、电子设备和计算机可读介质 Download PDF

Info

Publication number
WO2022105589A1
WO2022105589A1 PCT/CN2021/128048 CN2021128048W WO2022105589A1 WO 2022105589 A1 WO2022105589 A1 WO 2022105589A1 CN 2021128048 W CN2021128048 W CN 2021128048W WO 2022105589 A1 WO2022105589 A1 WO 2022105589A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
cluster
cluster node
container application
monitoring information
Prior art date
Application number
PCT/CN2021/128048
Other languages
English (en)
French (fr)
Inventor
赵茂祥
Original Assignee
上海连尚网络科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海连尚网络科技有限公司 filed Critical 上海连尚网络科技有限公司
Publication of WO2022105589A1 publication Critical patent/WO2022105589A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Definitions

  • Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a resource scheduling method, apparatus, electronic device, and computer-readable medium.
  • resource configuration is performed when the container application is initially deployed, and the resources of the container application cluster are scheduled according to the resource configuration result.
  • the resource requirements of the container application at runtime are not considered, and the allocated resources cannot be dynamically scheduled on demand when the container application is running, resulting in low resource utilization of the devices of the container application cluster;
  • the sensitivity of container applications to different resources is not considered when scheduling resources.
  • a unified scheduling strategy is used for scheduling, resulting in the deployment of container applications.
  • the devices of the cluster nodes with higher frequency are under load.
  • Some embodiments of the present disclosure propose resource scheduling methods, apparatuses, electronic devices, and computer-readable media to solve one or more of the technical problems mentioned in the above background section.
  • some embodiments of the present disclosure provide a resource scheduling method, the method includes: generating target container application type information based on running monitoring information of a target container application; resource requirement information and the priority of each cluster node in the cluster node queue of the container application cluster in which the target container application program is deployed, select the cluster node that meets the predetermined conditions from the above-mentioned cluster node queue as the target cluster node; The resource is scheduled to deploy the container set of the target container application described above to the target cluster node described above.
  • some embodiments of the present disclosure provide a resource scheduling apparatus, the apparatus includes: a generating unit configured to generate target container application type information based on running monitoring information of a target container application; a selecting unit configured to Based on the resource requirement information corresponding to the above target container application type information and the priority of each cluster node in the cluster node queue of the container application cluster in which the above target container application is deployed, select the cluster node that meets the predetermined conditions from the above cluster node queue As the target cluster node; the scheduling unit is configured to schedule the resources of the container application cluster to deploy the container set of the target container application to the target cluster node.
  • some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device on which one or more programs are stored, when one or more programs are stored by one or more The processor executes, causing one or more processors to implement the method described in any implementation manner of the above first aspect.
  • some embodiments of the present disclosure provide a computer-readable medium on which a computer program is stored, wherein, when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.
  • the resource scheduling methods of some embodiments of the present disclosure have the following beneficial effects: through the resource scheduling methods of some embodiments of the present disclosure, the resource utilization rate of the devices of the container application cluster is improved. Specifically, the inventor found that the reason for the low resource utilization rate of the devices of the container application cluster is that the resource requirements of the application program at runtime are not considered, and the allocated resources cannot be performed on demand when the container application program is running. Dynamic scheduling. Based on this, the resource scheduling methods of some embodiments of the present disclosure first generate target container application type information of the target container application according to the running monitoring information of the target container application.
  • a cluster node for deploying the container set of the target container application is selected from the cluster node queue of the container application cluster. Also because the type information of the target container application is generated, the resource requirement information can be determined according to the running monitoring information of the target container application. Thus, the cluster node on which the target container application is deployed can be determined according to the resource requirement information. Finally, the resources of the container application cluster are scheduled to deploy the target container application on the devices of the cluster nodes. In this way, according to the resource requirement information of the target container application at runtime, the allocated resources can be dynamically scheduled when the target container application is running as needed. Further, the resource utilization rate of the device of the container application cluster is improved.
  • FIGS. 1-2 are schematic diagrams of an application scenario of a resource scheduling method according to some embodiments of the present disclosure
  • FIG. 3 is a flowchart of some embodiments of resource scheduling methods according to the present disclosure.
  • FIG. 4 is a flowchart of other embodiments of resource scheduling methods according to the present disclosure.
  • FIG. 5 is a schematic structural diagram of some embodiments of a resource scheduling apparatus according to the present disclosure.
  • FIG. 6 is a schematic structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure.
  • 1-2 are schematic diagrams of an application scenario of the resource scheduling method according to some embodiments of the present disclosure.
  • the computing device 101 may generate target container application type information 103 based on the running monitoring information 102 of the target container application. Then, the computing device 101 may, based on the resource requirement information 104 corresponding to the above target container application type information 103 and the priority of each cluster node in the cluster node queue 105 of the container application cluster in which the above target container application is deployed, from the above cluster node queue In 105 , a cluster node that meets the predetermined condition is selected as the target cluster node 106 . Finally, the computing device 101 may schedule the resources of the above-mentioned container application cluster to deploy the container set 107 of the above-mentioned target container application to the above-mentioned target cluster node 106 .
  • the computing device 101 may acquire the real-time node operation monitoring information set 108 of each cluster node described above. Then, the computing device 101 may arrange the cluster nodes in the cluster node queue 105 based on the real-time node operation monitoring information set 108 .
  • the above computing device 101 may be hardware or software.
  • the computing device When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or can be implemented as a single server or single terminal device.
  • a computing device When a computing device is embodied as software, it may be installed in the hardware devices listed above. It can be implemented, for example, as multiple software or software modules for providing distributed services, or as a single software or software module. There is no specific limitation here.
  • the resource scheduling method includes the following steps:
  • Step 301 based on the running monitoring information of the target container application, generate target container application type information.
  • the execution body of the resource scheduling method may generate target container application type information based on the running monitoring information of the target container application.
  • the above-mentioned execution body can obtain the running monitoring information of the target container application program from the terminal through a wired connection or a wireless connection.
  • the container application type information corresponding to the above-mentioned operation monitoring information in the correspondence table between the operation monitoring information and the container application type information may be determined as the target container application type information in the form of a query table.
  • the target container application may be a container application that is distributed and deployed in a container application cluster (for example, Kubernetes) and needs to be expanded.
  • the above-mentioned operation monitoring information may be resource occupation information of the above-mentioned target container application program during operation.
  • the container application type information (for example, memory-intensive applications) corresponding to the above-mentioned operation monitoring information can be queried through the correspondence table between the operation monitoring information and the container application type information stored locally.
  • the container application type information sent by the terminal device communicatively connected to the above-mentioned execution body may be acquired.
  • the above-mentioned terminal device can query the container application type information corresponding to the above-mentioned operation monitoring information through the stored correspondence table between the operation monitoring information and the container application type information.
  • the target container application type information of the target container application can be generated according to the running monitoring information of the target container application. Further, the resource requirement information of the target container application can be determined.
  • Step 302 based on the resource requirement information corresponding to the target container application type information and the priority of each cluster node in the cluster node queue of the container application cluster in which the target container application is deployed, select a cluster node that meets the predetermined condition from the cluster node queue as the The target cluster node.
  • the above-mentioned execution body may preferentially extract cluster nodes with high priority from the cluster node queue according to the priority of each cluster node in the cluster node queue of the container application cluster in which the above-mentioned target container application program is deployed.
  • the cluster node may be continuously extracted from the cluster node queue.
  • the above-mentioned extracted cluster node may be determined as the target cluster node.
  • the above-mentioned cluster node queue may be a queue composed of each cluster node included in the above-mentioned container application cluster for deploying each container application program.
  • Each cluster node in the above-mentioned cluster node queue may be arranged according to each priority of each cluster node.
  • the above resource requirement information may be resource information of a device required to run the container application corresponding to the target container application type information, and may include required memory.
  • the above-mentioned available resource information may be resource information available after the container application is deployed on the device of the cluster node, and may include available memory. In practice, the above predetermined condition may be "available memory is greater than or equal to the required memory". In this way, the cluster nodes that can deploy the target container application can be determined according to the resource requirement information of the target container application at runtime.
  • the above target container application type information may be "memory-intensive application”.
  • the resource requirement information corresponding to the above target container application type information "memory-intensive application” may be "required memory: 2G”.
  • the above-mentioned cluster node queue may be "cluster node 001, cluster node 002, cluster node 003".
  • the priority of the above-mentioned "cluster node 001" may be "1".
  • the priority of the above-mentioned "cluster node 002" may be “2”.
  • the priority of the above-mentioned "cluster node 003" may be "3".
  • the above-mentioned "1", "2” and “3” can represent the priority from high to low.
  • the available resource information of the device of the above “cluster node 001” may be “available memory: 1.8G”.
  • the available resource information of the device of the above-mentioned “cluster node 002” may be “available memory: 4G”.
  • the available resource information of the device of the above “cluster node 003" may be “available memory: 8G”.
  • the above execution body may first extract “cluster node 001", and in response to the "available memory: 1.8G" of the device of "cluster node 001" being less than the above “required memory: 2G", extract the cluster node “cluster node 002" from the cluster node queue ". In response to the "available memory: 4G” of the device of the "cluster node 002" being greater than the above-mentioned "required memory: 2G", the "cluster node 002" is determined as the target cluster node.
  • Step 303 schedule the resources of the container application cluster to deploy the container set of the target container application to the target cluster node.
  • the above-mentioned executive body may perform allocation and locking processing on the resources of the equipment of the above-mentioned target cluster node in the above-mentioned container application cluster to prevent the resources of the equipment of the above-mentioned target cluster node from being occupied.
  • the container set of the target container application can be deployed on the device of the target cluster node to run the target container application.
  • unlocking processing may be performed on the resources of the device of the target cluster node in the container application cluster, so that the resources of the device of the target cluster node may be scheduled again.
  • the above container set may be a set composed of various containers (for example, a pod of Kubernetes).
  • the above-mentioned target cluster node may be "cluster node 002".
  • the above-mentioned executive body can allocate the resource corresponding to the available resource information "memory: 4G" of the device of the "cluster node 002" to the above-mentioned target container application, and set the occupation identification information of the above-mentioned corresponding resource to indicate that the resource is occupied. occupancy identification information. For example, the occupied identification information "1" can be used to indicate that the resource is occupied.
  • the container set of the target container application can be deployed on the device of the target cluster node "cluster node 002" to run the target container application.
  • the occupation identification information of the resource of the device of the target cluster node "cluster node 002" in the container application cluster may be set as occupation identification information indicating that the resource is not occupied.
  • the occupied identification information "0" may be used to indicate that the resource is occupied.
  • the above-mentioned execution body may acquire real-time node operation monitoring information of each cluster node in the above-mentioned various cluster nodes, and obtain a real-time node operation monitoring information set.
  • the above-mentioned real-time node operation monitoring information may be real-time operation monitoring information of devices of the above-mentioned cluster nodes.
  • the real-time node running monitoring information of "cluster node 001", "cluster node 002" and “cluster node 003" can be [available memory: 1.8G], [available memory: 2G], [available memory: 8G] respectively.
  • the above-mentioned executive body may obtain the real-time node operation monitoring information set of each of the above-mentioned cluster nodes from the terminal through a wired connection or a wireless connection.
  • the foregoing executive body may arrange each cluster node in the foregoing cluster node queue.
  • the above-mentioned execution body may generate a real-time score value of each cluster node in the above-mentioned cluster nodes based on the above-mentioned real-time node operation monitoring information set, and obtain a real-time score value set.
  • the above executive body may determine the ratio of 0.15 between the available memory [1.8G] included in the real-time node operation monitoring information [available memory: 1.8G] of "cluster node 001" and the sum of the above-mentioned available memory [11.8G] as "cluster node 001" ” real-time score value.
  • the above executive body may determine the ratio of 0.17 of the available memory [2G] included in the real-time node operation monitoring information [available memory: 2G] of the "cluster node 002" to the sum of the above-mentioned available memory [11.8G] as the "cluster node 002" Real-time score value.
  • the above executive body may determine the ratio of 0.68 between the available memory [1.8G] included in the real-time node operation monitoring information [available memory: 8G] of "cluster node 003" and the sum of the above-mentioned available memory [11.8G] as "cluster node 003" real-time score value.
  • the resulting set of real-time score values is [0.15, 0.17, 0.68].
  • the above ratio can be retained to two decimal places.
  • the above-mentioned executive body may arrange each cluster node in the above-mentioned cluster node queue.
  • the above-mentioned execution body may sort the real-time score values in the real-time score value set [0.15, 0.17, 0.68] in ascending order to generate a real-time score value sequence [0.15, 0.17, 0.68]. Then, the three cluster nodes "cluster node 001", “cluster node 002" and “cluster node 003" are sequentially added to the empty cluster node queue to arrange each cluster node in the above cluster node queue.
  • the arranged cluster node queue is "cluster node 001, cluster node 002, cluster node 003". In this way, the cluster node queue can be updated after the target container application is deployed on the target cluster node, so that the cluster node can be determined in the subsequent deployment of the container application.
  • the resource scheduling methods of some embodiments of the present disclosure have the following beneficial effects: through the resource scheduling methods of some embodiments of the present disclosure, the resource utilization rate of the devices of the container application cluster is improved. Specifically, the inventor found that the reason for the low resource utilization rate of the devices of the container application cluster is that the resource requirements of the application program at runtime are not considered, and the allocated resources cannot be performed on demand when the container application program is running. Dynamic scheduling. Based on this, the resource scheduling methods of some embodiments of the present disclosure first generate target container application type information of the target container application according to the running monitoring information of the target container application.
  • a cluster node for deploying the container set of the target container application is selected from the cluster node queue of the container application cluster. Also because the type information of the target container application is generated, the resource requirement information can be determined according to the running monitoring information of the target container application. Thus, the cluster node on which the target container application is deployed can be determined according to the resource requirement information. Finally, the resources of the container application cluster are scheduled to deploy the target container application on the devices of the cluster nodes. In this way, according to the resource requirement information of the target container application at runtime, the allocated resources can be dynamically scheduled when the target container application is running as needed. Further, the resource utilization rate of the device of the container application cluster is improved.
  • the process 400 of the resource scheduling method includes the following steps:
  • Step 401 Obtain the operation monitoring information of each historical node of each cluster node of the container application cluster as a historical node operation monitoring information set.
  • the executor on which the resource scheduling method runs may acquire from the terminal through a wired connection or a wireless connection the operation monitoring information of each historical node of each cluster node of the container application cluster as the historical node operation monitoring information set .
  • the above-mentioned historical node operation monitoring information may be resource occupancy information of the equipment of the corresponding cluster node during operation at a historical time point, and may include the node central processor usage rate and the node memory usage rate.
  • the above-mentioned utilization ratio of the central processor of the node may be the utilization ratio of the central processor when the device of the cluster node is running.
  • the above-mentioned node memory usage ratio may be the usage ratio of the memory of the cluster nodes when the device is running.
  • Step 402 input the operation monitoring information into the pre-trained application classification model to generate target container application type information.
  • the above-mentioned execution body may input the above-mentioned operation monitoring information into a pre-trained application classification model to generate target container application type information.
  • the above application classification model can be trained by the following steps:
  • each historical operation monitoring information of each container application in the container application set of the above container application cluster is obtained as a historical operation monitoring information set.
  • the above-mentioned historical operation monitoring information may be resource occupation information of the container application in the operation of the historical time point.
  • an initial application classification model is obtained by training based on the above-mentioned historical operation monitoring information set.
  • the above-mentioned execution body may use the above-mentioned historical operation monitoring information set as a training set, and use a clustering algorithm to train to obtain an initial application classification model.
  • an initial application classification model can be trained using the "K-Means" clustering algorithm. There is no limitation on the setting of the clustering algorithm here.
  • the third step is to train an application classification model based on the pre-labeled annotation history operation monitoring information set and the above-mentioned initial application classification model.
  • the above-mentioned pre-marked historical operation monitoring information set may be each historical operation monitoring information marked with container application type information, and may include each historical operation monitoring information group divided into different categories.
  • a silhouette coefficient (Silhouette Coefficient) method can be used to evaluate the clustering effect of each historical operation monitoring information group to determine the model parameters.
  • the above model parameter may be the number of categories of clusters. Specifically, the category number with the largest silhouette coefficient of the corresponding historical operation monitoring information group may be selected from the above different category numbers as a model parameter of the application program classification model to determine the application program classification model. It can be understood that the value of the above-mentioned number of categories may be an integer in the numerical range [2, 6].
  • Step 403 in response to determining that there is no cluster node queue, perform the following cluster node queue generation steps: based on the historical node operation monitoring information set, generate the score value of each cluster node in each cluster node, and obtain a score value set; The score set and each cluster node corresponding to each score value in the score value set generate a cluster node queue.
  • the execution subject in response to determining that there is no cluster node queue, may perform the following cluster node queue generation steps:
  • a score value of each cluster node in each of the above-mentioned cluster nodes is generated, and a score value set is obtained.
  • the above-mentioned executive body may determine the weighted average of the CPU usage rates of each node included in the above-mentioned historical node operation monitoring information set as the average node CPU load.
  • each cluster node of the above container application cluster may be "cluster node 001, cluster node 002, cluster node 003".
  • the historical node operation monitoring information corresponding to the above "cluster node 001", “cluster node 002" and “cluster node 003" can be respectively [node CPU usage: 60%, node memory usage: 40%], [node CPU usage: 50%, Node memory usage: 30%] and [Node CPU usage: 30%, Node memory usage: 20%].
  • the number of CPU cores corresponding to the above “cluster node 001", “cluster node 002" and “cluster node 003” may be [4 cores], [4 cores] and [8 cores], respectively.
  • the total amount of memory corresponding to the above “cluster node 001", “cluster node 002", and “cluster node 003” may be [4G], [8G], and [16G], respectively.
  • the above-mentioned executive body can determine the average load of the node's central processor by the following formula:
  • MeanCPUuse represents the average load of the central processor of the node.
  • i represents the sequence number of the cluster node in each of the above cluster nodes.
  • n represents the number of cluster nodes included in each of the foregoing cluster nodes.
  • CPUuse i represents the node central processing unit usage rate of the i-th cluster node in each of the above cluster nodes.
  • a i represents the number of central processor cores of the i-th cluster node in each of the above cluster nodes.
  • the average node central processor load determined by the above formula can be:
  • the weighted average of the memory usage rates of each node included in the above historical node operation monitoring information set may be determined as the average node memory load.
  • the above executive body can determine the average node memory load by the following formula:
  • MeanStoreUse represents the average node memory load.
  • i represents the sequence number of the cluster node in each of the above cluster nodes.
  • n represents the number of cluster nodes included in each of the foregoing cluster nodes.
  • StoreUse i represents the node memory usage rate of the i-th cluster node in each of the above cluster nodes.
  • b i represents the total memory of the i-th cluster node in each of the above cluster nodes.
  • the average node memory load determined by the above formula can be:
  • the score value of the cluster node may be generated based on the average load of the central processor of the node and the average load of the memory of the node.
  • the above-mentioned execution body can generate the score value of the above-mentioned cluster node through the following sub-steps:
  • the ratio of the utilization rate of the central processor of the node corresponding to the cluster node to the average load of the central processor of the node is determined as the load score value of the central processor of the node.
  • the above-mentioned executive body may calculate the ratio [1.412] of the node CPU usage rate [node CPU usage rate: 60%] corresponding to the cluster node "cluster node 001" to the above-mentioned node CPU load average [0.425] Determined as the node CPU load score value.
  • the ratio of the node memory usage rate corresponding to the above-mentioned cluster node to the above-mentioned node memory load average value is determined as the node memory load score value.
  • the above executive body may determine the ratio [1.556] of the node memory usage ratio [node memory usage ratio: 40%] corresponding to the cluster node "cluster node 001" to the above-mentioned node memory load average [0.257] as the node central processing unit load score value.
  • the third sub-step is to generate the score value of the cluster node based on the node central processor load score value and the node memory load score value.
  • the above-mentioned execution body can generate the score value of the above-mentioned cluster node by the following formula:
  • Score represents the score value of the above cluster nodes.
  • a represents the load score value of the central processor of the node corresponding to the above cluster node.
  • b represents the memory load score value of the node corresponding to the above cluster node.
  • MeanCPUuse represents the average CPU load of the node.
  • MeanStoreUse represents the average node memory load.
  • the score value of the cluster node "cluster node 001" determined by the above formula may be:
  • the second step is to generate a cluster node queue based on the above score value set and each cluster node corresponding to each score value in the above score value set.
  • the above-mentioned execution body may establish an empty cluster node queue. Then, each score value set in the score value set can be sorted in descending order to generate a score value sequence. Finally, each cluster node corresponding to each score value in the above sequence of score values may be sequentially added to the above-mentioned empty cluster node queue to obtain a cluster node queue.
  • the above set of score values may be [0.337, 0.341, 0.337].
  • the first score value [0.337] corresponds to the cluster node "cluster node 001”.
  • the second score value [0.341] corresponds to the cluster node "cluster node 002”.
  • the third score value [0.337] corresponds to the cluster node "cluster node 003".
  • Each score value set in the score value set can be sorted in descending order to generate a score value sequence [0.341, 0.337, 0.337].
  • the cluster nodes "cluster node 002", “cluster node 001" and “cluster node 003" corresponding to the score values [0.341], [0.337] and [0.337] in the score value sequence can be added to the established Empty cluster node queue.
  • the generated cluster node queue is "cluster node 002, cluster node 001, cluster node 003".
  • steps 401 to 403 solve the technical problem 2 mentioned in the background art, "the sensitivity of the container application to different resources is not considered when scheduling resources, and the sensitivity of container applications to different resources is not considered when scheduling resources.
  • Different types of container applications with different sensitivities are scheduled using a unified scheduling strategy, resulting in a high frequency of load on the devices of the cluster nodes where the container applications are deployed.”
  • the factors that lead to the high frequency of load on the devices of cluster nodes where container applications are deployed are often as follows: When scheduling resources, the sensitivity of container applications to different resources is not considered, and the sensitivity of container applications to different resources varies greatly for different types of resources.
  • the container application is scheduled using a unified scheduling policy.
  • the present disclosure obtains the initial application classification model by training through the acquired historical operation monitoring information of each container application in the container application set of the container application cluster.
  • the application type information of the container application can be determined according to the historical running monitoring information of the container application. Therefore, the application type information of the container application can be determined according to the sensitivity of the container application to different resources.
  • a score value of each cluster node in each cluster node can be generated by using the acquired historical node operation monitoring information set to obtain a score value set.
  • the above score value can reflect the comprehensive load degree of resources of different dimensions of the device of the cluster node, and can further reflect the comprehensive sensitivity of the container application deployed in the device of the cluster node to the resources of different dimensions.
  • a cluster node queue may be generated based on the above score value set and each cluster node corresponding to each score value in the above score value set.
  • the resulting queue of cluster nodes can provide support for cluster node selection when deploying different types of container applications. Therefore, according to the resource requirement information corresponding to the application type information of the container application, the cluster node can be selected from the cluster node queue to deploy the container application, and a unified scheduling strategy can be avoided. This further reduces the frequency of load on the devices of the cluster nodes where the container application is deployed.
  • Step 404 based on the resource requirement information corresponding to the target container application type information and the priority of each cluster node in the cluster node queue of the container application cluster in which the target container application is deployed, select the cluster node that meets the predetermined condition from the cluster node queue as the The target cluster node.
  • Step 405 schedule the resources of the container application cluster to deploy the container set of the target container application to the target cluster node.
  • steps 404-405 for the specific implementation of steps 404-405 and the technical effects brought about, reference may be made to steps 302-303 in those embodiments corresponding to FIG. 3, and details are not repeated here.
  • the process 400 of the resource scheduling method in some embodiments corresponding to FIG. 4 embodies the process of generating target container application type information and generating cluster nodes. Steps to expand the queue.
  • the application type information of the container application can be determined according to the sensitivity of the container application to different resources. Therefore, according to the resource requirement information corresponding to the application type information of the container application, the cluster node can be selected from the cluster node queue to deploy the container application, and a unified scheduling strategy can be avoided. This further reduces the frequency of load on the devices of the cluster nodes where the container application is deployed.
  • the present disclosure provides some embodiments of a resource scheduling apparatus, these apparatus embodiments correspond to those method embodiments shown in FIG. 2 , the apparatus specifically Can be used in various electronic devices.
  • the resource scheduling apparatus 500 in some embodiments includes: a generating unit 501 , a selecting unit 502 and a scheduling unit 503 .
  • the generating unit 501 is configured to generate target container application type information based on the running monitoring information of the target container application.
  • the selection unit 502 is configured to, based on the resource requirement information corresponding to the above-mentioned target container application type information and the priority of each cluster node in the cluster node queue of the container application cluster in which the above-mentioned target container application is deployed, select from the above-mentioned cluster node queues that meet the requirements.
  • Cluster nodes with predetermined conditions are used as target cluster nodes.
  • the scheduling unit 503 is configured to schedule resources of the above-mentioned container application cluster to deploy the container set of the above-mentioned target container application to the above-mentioned target cluster node.
  • the generating unit 501 of the resource scheduling apparatus 500 may be further configured to: input the above operation monitoring information into a pre-trained application classification model to generate target container application type information.
  • the above-mentioned application classification model may be obtained by training through the following steps: acquiring each historical operation monitoring information of each container application in the container application set of the above-mentioned container application cluster as the historical operation monitoring information set ; Based on the above-mentioned historical operation monitoring information set, an initial application classification model is obtained by training; based on the pre-labeled labeled historical operation monitoring information set and the above-mentioned initial application classification model, an application classification model is obtained by training.
  • the resource scheduling apparatus 500 before the generating unit 501 of the resource scheduling apparatus 500, the resource scheduling apparatus 500 further includes: an acquiring unit, configured to acquire the operation monitoring of each historical node of each cluster node of the above-mentioned container application cluster The information is run as a historical node to monitor the information set.
  • the resource scheduling apparatus 500 before the selecting unit 502 of the resource scheduling apparatus 500, the resource scheduling apparatus 500 further includes: an executing unit, configured to, in response to determining that there is no cluster node queue, execute the following cluster node queue generation Steps: based on the above-mentioned historical node operation monitoring information set, generate a score value of each cluster node in the above-mentioned various cluster nodes, and obtain a score value set; based on the above-mentioned score value set and each score value in the above-mentioned score value set corresponds to Each cluster node of , generates a cluster node queue.
  • an executing unit configured to, in response to determining that there is no cluster node queue, execute the following cluster node queue generation Steps: based on the above-mentioned historical node operation monitoring information set, generate a score value of each cluster node in the above-mentioned various cluster nodes, and obtain a score value set; based on the above-mentioned score value set and each score
  • the above-mentioned historical node operation monitoring information may include a node central processor usage rate and a node memory usage rate.
  • the step of generating the cluster node queue of the above execution unit may be further configured to: determine the weighted average of the CPU usage rates of each node included in the above historical node operation monitoring information set as the node The average CPU load; the weighted average of the memory usage rates of each node included in the above-mentioned historical node operation monitoring information set is determined as the average node memory load; the above-mentioned cluster is generated based on the above-mentioned average node CPU load and the above-mentioned node memory load average The node's score value.
  • the step of generating the cluster node queue of the above-mentioned execution unit may be further configured to: determine the ratio of the node central processor usage rate corresponding to the above-mentioned cluster node to the above-mentioned node central processor load average value as The node central processor load score value; the ratio of the node memory usage rate corresponding to the above cluster node to the above node memory load average value is determined as the node memory load score value; based on the above node central processor load score value and the above node memory The load score value, which generates the score value of the above cluster nodes.
  • the resource scheduling apparatus 500 further includes: a real-time node operation monitoring information acquisition unit and an arrangement unit.
  • the real-time node operation monitoring information acquisition unit is configured to acquire real-time node operation monitoring information of each cluster node in the above cluster nodes, and obtain a real-time node operation monitoring information set.
  • the arrangement unit is configured to arrange each cluster node in the cluster node queue based on the real-time node operation monitoring information set.
  • the arranging unit of the resource scheduling apparatus 500 may be further configured to: based on the foregoing real-time node operation monitoring information set, generate a real-time score value of each cluster node in the foregoing respective cluster nodes, and obtain A real-time score value set; based on the above-mentioned real-time score value set, each cluster node in the above-mentioned cluster node queue is arranged.
  • the units recorded in the apparatus 500 correspond to the respective steps in the method described with reference to FIG. 3 . Therefore, the operations, features and beneficial effects described above with respect to the method are also applicable to the apparatus 500 and the units included therein, and details are not described herein again.
  • FIG. 6 a schematic structural diagram of an electronic device (eg, the computing device in FIG. 1 ) 600 suitable for implementing some embodiments of the present disclosure is shown.
  • the electronic device shown in FIG. 6 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.
  • an electronic device 600 may include a processing device (eg, a central processing unit, a graphics processor, etc.) 601 that may be loaded into random access according to a program stored in a read only memory (ROM) 602 or from a storage device 608 Various appropriate actions and processes are executed by the programs in the memory (RAM) 603 . In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored.
  • the processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604.
  • An input/output (I/O) interface 605 is also connected to bus 604 .
  • I/O interface 605 input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration An output device 607 of a computer, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609.
  • Communication means 609 may allow electronic device 600 to communicate wirelessly or by wire with other devices to exchange data. While FIG. 6 shows electronic device 600 having various means, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in FIG. 6 may represent one device, or may represent multiple devices as required.
  • the processes described above with reference to the flowcharts may be implemented as computer software programs.
  • some embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via the communication device 609, or from the storage device 608, or from the ROM 602.
  • the processing device 601 When the computer program is executed by the processing device 601, the above-described functions defined in the methods of some embodiments of the present disclosure are performed.
  • the computer-readable medium described in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, electrical wire, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
  • the client and server can use any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) to communicate, and can communicate with digital data in any form or medium Communication (eg, a communication network) interconnects.
  • HTTP HyperText Transfer Protocol
  • Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (eg, the Internet), and peer-to-peer networks (eg, ad hoc peer-to-peer networks), as well as any currently known or future development network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device.
  • the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device: based on the operation monitoring information of the target container application, generate target container application type information; Based on the resource requirement information corresponding to the above target container application type information and the priority of each cluster node in the cluster node queue of the container application cluster in which the above target container application is deployed, a cluster node that meets the predetermined conditions is selected from the above cluster node queue as A target cluster node; schedules the resources of the above container application cluster to deploy the container set of the above target container application to the above target cluster node.
  • Computer program code for carrying out operations of some embodiments of the present disclosure may be written in one or more programming languages, including object-oriented programming languages - such as Java, Smalltalk, C++, or a combination thereof, Also included are conventional procedural programming languages - such as the "C" language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider to via Internet connection).
  • LAN local area network
  • WAN wide area network
  • an Internet service provider to via Internet connection
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the units described in some embodiments of the present disclosure may be implemented by means of software, and may also be implemented by means of hardware.
  • the described unit may also be provided in the processor, for example, it may be described as: a processor includes a generating unit, a selecting unit and a scheduling unit. Among them, the names of these units do not constitute a limitation of the unit itself under certain circumstances.
  • the scheduling unit can also be described as "scheduling the resources of the above container application cluster to schedule the container set of the above target container application. cells deployed to the above target cluster nodes".
  • exemplary types of hardware logic components include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chips (SOCs), Complex Programmable Logical Devices (CPLDs) and more.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs Systems on Chips
  • CPLDs Complex Programmable Logical Devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本公开的实施例公开了资源调度方法、装置、电子设备和计算机可读介质。该方法的一具体实施方式包括:基于目标容器应用程序的运行监控信息,生成目标容器应用程序类型信息;基于上述目标容器应用程序类型信息对应的资源需求信息和部署上述目标容器应用程序的容器应用集群的集群节点队列中各个集群节点的优先级,从上述集群节点队列中选择符合预定条件的集群节点作为目标集群节点;对上述容器应用集群的资源进行调度以将上述目标容器应用程序的容器集部署至上述目标集群节点。该实施方式提高了容器应用集群的设备的资源利用率。

Description

资源调度方法、装置、电子设备和计算机可读介质 技术领域
本公开的实施例涉及计算机技术领域,具体涉及资源调度方法、装置、电子设备和计算机可读介质。
背景技术
随着计算机技术的发展,各类应用程序产生的数据呈现暴增趋势,需要对容器应用集群(例如,Kubernetes)的资源进行调度以将容器应用程序分布部署在容器应用集群中。目前,在对容器应用集群的资源进行调度时,通常采用的方式为:在初次部署容器应用程序时进行资源配置,根据资源配置结果对容器应用集群的资源进行调度。
然而,当采用上述方式对容器应用集群的资源进行调度时,经常会存在如下技术问题:
第一,未考虑容器应用程序在运行时的资源需求,无法在容器应用程序运行时按需对已分配的资源进行动态调度,导致容器应用集群的设备的资源利用率较低;
第二,对资源进行调度时没有考虑容器应用程序对不同资源的敏感程度,对于对不同资源敏感程度差异较大的不同类型的容器应用程序,采用统一的调度策略进行调度,导致部署容器应用程序的集群节点的设备出现负载的频次较高。
发明内容
本公开的内容部分用于以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。本公开的内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。
本公开的一些实施例提出了资源调度方法、装置、电子设备和计 算机可读介质,来解决以上背景技术部分提到的技术问题中的一项或多项。
第一方面,本公开的一些实施例提供了一种资源调度方法,该方法包括:基于目标容器应用程序的运行监控信息,生成目标容器应用程序类型信息;基于上述目标容器应用程序类型信息对应的资源需求信息和部署上述目标容器应用程序的容器应用集群的集群节点队列中各个集群节点的优先级,从上述集群节点队列中选择符合预定条件的集群节点作为目标集群节点;对上述容器应用集群的资源进行调度以将上述目标容器应用程序的容器集部署至上述目标集群节点。
第二方面,本公开的一些实施例提供了一种资源调度装置,装置包括:生成单元,被配置成基于目标容器应用程序的运行监控信息,生成目标容器应用程序类型信息;选择单元,被配置成基于上述目标容器应用程序类型信息对应的资源需求信息和部署上述目标容器应用程序的容器应用集群的集群节点队列中各个集群节点的优先级,从上述集群节点队列中选择符合预定条件的集群节点作为目标集群节点;调度单元,被配置成对上述容器应用集群的资源进行调度以将上述目标容器应用程序的容器集部署至上述目标集群节点。
第三方面,本公开的一些实施例提供了一种电子设备,包括:一个或多个处理器;存储装置,其上存储有一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现上述第一方面任一实现方式所描述的方法。
第四方面,本公开的一些实施例提供了一种计算机可读介质,其上存储有计算机程序,其中,程序被处理器执行时实现上述第一方面任一实现方式所描述的方法。
本公开的上述各个实施例具有如下有益效果:通过本公开的一些实施例的资源调度方法,容器应用集群的设备的资源利用率有所提高。具体来说,发明人发现,造成容器应用集群的设备的资源利用率较低的原因在于:未考虑应用程序在运行时的资源需求,无法在容器应用程序运行时按需对已分配的资源进行动态调度。基于此,本公开的一些实施例的资源调度方法首先根据目标容器应用程序的运行监控信 息,生成目标容器应用程序的目标容器应用程序类型信息。然后,根据目标容器应用程序类型信息对应的资源需求信息,从容器应用集群的集群节点队列中选择用于部署目标容器应用程序的容器集的集群节点。也因为生成了目标容器应用程序类型信息,可以根据目标容器应用程序运行监控信息确定资源需求信息。从而可以根据资源需求信息确定部署目标容器应用程序的集群节点。最后,对容器应用集群的资源进行调度以将目标容器应用程序部署在集群节点的设备。由此,可以根据目标容器应用程序在运行时的资源需求信息,在目标容器应用程序运行时按需对已分配的资源进行动态调度。进而提高了容器应用集群的设备的资源利用率。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,元件和元素不一定按照比例绘制。
图1-2是根据本公开的一些实施例的资源调度方法的一个应用场景的示意图;
图3是根据本公开的资源调度方法的一些实施例的流程图;
图4是根据本公开的资源调度方法的另一些实施例的流程图;
图5是根据本公开的资源调度装置的一些实施例的结构示意图;
图6是适于用来实现本公开的一些实施例的电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例。相反,提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护 范围。
另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
下面将参考附图并结合实施例来详细说明本公开。
图1-2是本公开的一些实施例的资源调度方法的一个应用场景的示意图。
在图1的应用场景中,首先,计算设备101可以基于目标容器应用程序的运行监控信息102,生成目标容器应用程序类型信息103。然后,计算设备101可以基于上述目标容器应用程序类型信息103对应的资源需求信息104和部署上述目标容器应用程序的容器应用集群的集群节点队列105中各个集群节点的优先级,从上述集群节点队列105中选择符合预定条件的集群节点作为目标集群节点106。最后,计算设备101可以对上述容器应用集群的资源进行调度以将上述目标容器应用程序的容器集107部署至上述目标集群节点106。
可选地,如图2所示,计算设备101可以获取上述各个集群节点的实时节点运行监控信息集108。然后,计算设备101可以基于上述实时节点运行监控信息集108,对上述集群节点队列105中的各个集群节点进行排列。
需要说明的是,上述计算设备101可以是硬件,也可以是软件。当计算设备为硬件时,可以实现成多个服务器或终端设备组成的分布 式集群,也可以实现成单个服务器或单个终端设备。当计算设备体现为软件时,可以安装在上述所列举的硬件设备中。其可以实现成例如用来提供分布式服务的多个软件或软件模块,也可以实现成单个软件或软件模块。在此不做具体限定。
应该理解,图1-2中的计算设备的数目仅仅是示意性的。根据实现需要,可以具有任意数目的计算设备。
继续参考图3,示出了根据本公开的资源调度方法的一些实施例的流程300。该资源调度方法,包括以下步骤:
步骤301,基于目标容器应用程序的运行监控信息,生成目标容器应用程序类型信息。
在一些实施例中,资源调度方法的执行主体(例如图1所示的计算设备)可以基于目标容器应用程序的运行监控信息,生成目标容器应用程序类型信息。实践中,首先,上述执行主体可以通过有线连接方式或者无线连接方式从终端获取目标容器应用程序的运行监控信息。然后,可以以查询表的形式将运行监控信息与容器应用程序类型信息的对应关系表中与上述运行监控信息对应的容器应用程序类型信息确定为目标容器应用程序类型信息。其中,目标容器应用程序可以为分布部署在容器应用集群(例如,Kubernetes)的、需进行扩容的容器应用程序。上述运行监控信息可以为上述目标容器应用程序在运行时的资源占用信息。作为示例,可以通过本地存储的运行监控信息与容器应用程序类型信息的对应关系表,查询与上述运行监控信息对应的容器应用程序类型信息(例如,内存密集型应用)。作为另一个示例,可以获取由与上述执行主体通信连接的终端设备发送的容器应用程序类型信息。其中,上述终端设备可以通过存储的运行监控信息与容器应用程序类型信息的对应关系表,查询与上述运行监控信息对应的容器应用程序类型信息。由此,可以根据目标容器应用程序的运行监控信息,生成目标容器应用程序的目标容器应用程序类型信息。进而可以确定目标容器应用程序的资源需求信息。
步骤302,基于目标容器应用程序类型信息对应的资源需求信息 和部署目标容器应用程序的容器应用集群的集群节点队列中各个集群节点的优先级,从集群节点队列中选择符合预定条件的集群节点作为目标集群节点。
在一些实施例中,首先,上述执行主体可以根据部署上述目标容器应用程序的容器应用集群的集群节点队列中各个集群节点的优先级,从集群节点队列中优先提取优先级高的集群节点。响应于所提取的集群节点的设备的可用资源信息与上述资源需求信息不满足上述预定条件,可以继续从集群节点队列中提取集群节点。响应于所提取的集群节点的设备的可用资源信息与上述资源需求信息满足上述预定条件,可以将上述所提取的集群节点确定为目标集群节点。其中,上述集群节点队列可以为由上述容器应用集群包括的部署各个容器应用程序的各个集群节点组成的队列。上述集群节点队列中的各个集群节点可以是根据各个集群节点的各个优先级排列的。上述资源需求信息可以为运行目标容器应用程序类型信息对应的容器应用程序所需的设备的资源信息,可以包括需求内存。上述可用资源信息可以为集群节点的设备部署容器应用程序后可用的资源信息,可以包括可用内存。实践中,上述预定条件可以为“可用内存大于等于需求内存”。由此,可以根据目标容器应用程序在运行时的资源需求信息,确定能够部署目标容器应用程序的集群节点。
作为示例,上述目标容器应用程序类型信息可以为“内存密集型应用”。上述目标容器应用程序类型信息“内存密集型应用”对应的资源需求信息可以为“需求内存:2G”。上述集群节点队列可以为“集群节点001,集群节点002,集群节点003”。上述“集群节点001”的优先级可以为“1”。上述“集群节点002”的优先级可以为“2”。上述“集群节点003”的优先级可以为“3”。上述“1”、“2”和“3”可以表征由高到低的优先级。上述“集群节点001”的设备的可用资源信息可以为“可用内存:1.8G”。上述“集群节点002”的设备的可用资源信息可以为“可用内存:4G”。上述“集群节点003”的设备的可用资源信息可以为“可用内存:8G”。上述执行主体可以首先提取“集群节点001”,响应于“集群节点001”的设备的“可用内存:1.8G” 小于上述“需求内存:2G”,从集群节点队列中提取集群节点“集群节点002”。响应于“集群节点002”的设备的“可用内存:4G”大于上述“需求内存:2G”,将“集群节点002”确定为目标集群节点。
步骤303,对容器应用集群的资源进行调度以将目标容器应用程序的容器集部署至目标集群节点。
在一些实施例中,首先,上述执行主体可以对上述容器应用集群中的上述目标集群节点的设备的资源进行分配和锁定处理以防止上述目标集群节点的设备的资源被占用。之后,可以按照所分配的资源,将上述目标容器应用程序的容器集部署在上述目标集群节点的设备以运行上述目标容器应用程序。最后,可以对上述容器应用集群中的上述目标集群节点的设备的资源进行解锁处理以使得可以再次调度上述目标集群节点的设备的资源。其中,上述容器集可以为由各个容器组成的集合(例如,Kubernetes的pod)。作为示例,上述目标集群节点可以为“集群节点002”。首先,上述执行主体可以将“集群节点002”的设备的可用资源信息“内存:4G”对应的资源分配给上述目标容器应用程序,以及将上述对应的资源的占用标识信息设置为表征资源已占用的占用标识信息。例如,可以以占用标识信息“1”表征资源已占用。之后,可以按照所分配的资源,将上述目标容器应用程序的容器集部署在上述目标集群节点“集群节点002”的设备以运行上述目标容器应用程序。最后,可以对上述容器应用集群中的上述目标集群节点“集群节点002”的设备的资源的占用标识信息设置为表征资源未占用的占用标识信息。例如,可以以占用标识信息“0”表征资源已占用。由此,实现了在目标容器应用程序运行时按需对已分配的资源进行动态调度。
在一些实施例的一些可选的实现方式中,上述执行主体可以获取上述各个集群节点中每个集群节点的实时节点运行监控信息,得到实时节点运行监控信息集。其中,上述实时节点运行监控信息可以为上述集群节点的设备的实时的运行监控信息。例如,“集群节点001”、“集群节点002”和“集群节点003”的实时节点运行监控信息可以分别为[可用内存:1.8G]、[可用内存:2G]、[可用内存:8G]。实践中, 上述执行主体可以通过有线连接方式或者无线连接方式从终端获取上述各个集群节点的实时节点运行监控信息集。
在一些实施例的一些可选的实现方式中,基于上述实时节点运行监控信息集,上述执行主体可以对上述集群节点队列中的各个集群节点进行排列。实践中,首先,上述执行主体可以基于上述实时节点运行监控信息集,生成上述各个集群节点中每个集群节点的实时得分值,得到实时得分值集。作为示例,“集群节点001”、“集群节点002”和“集群节点003”的实时节点运行监控信息包括的可用内存的和为:1.8G+2G+8G=11.8G。上述执行主体可以将“集群节点001”的实时节点运行监控信息[可用内存:1.8G]包括的可用内存[1.8G]与上述可用内存的和[11.8G]的比值0.15确定为“集群节点001”的实时得分值。上述执行主体可以将“集群节点002”的实时节点运行监控信息[可用内存:2G]包括的可用内存[2G]与上述可用内存的和[11.8G]的比值0.17确定为“集群节点002”的实时得分值。上述执行主体可以将“集群节点003”的实时节点运行监控信息[可用内存:8G]包括的可用内存[1.8G]与上述可用内存的和[11.8G]的比值0.68确定为“集群节点003”的实时得分值。得到的实时得分值集为[0.15,0.17,0.68]。这里,上述比值可以保留至小数点后两位。然后,基于上述实时得分值集,上述执行主体可以对上述集群节点队列中的各个集群节点进行排列。作为示例,首先,上述执行主体可以对实时得分值集[0.15,0.17,0.68]中的各个实时得分值进行升序排列,生成实时得分值序列[0.15,0.17,0.68]。然后,可以将上述实时得分值序列中的3个实时得分值[0.15]、[0.17]和[0.68]对应的3个集群节点“集群节点001”、“集群节点002”和“集群节点003”依次添加至空的集群节点队列,以对上述集群节点队列中的各个集群节点进行排列。排列后的集群节点队列为“集群节点001,集群节点002,集群节点003”。由此,可以在目标集群节点部署目标容器应用程序后对集群节点队列进行更新,以便后续的容器应用程序部署时集群节点的确定。
本公开的上述各个实施例具有如下有益效果:通过本公开的一些实施例的资源调度方法,容器应用集群的设备的资源利用率有所提高。 具体来说,发明人发现,造成容器应用集群的设备的资源利用率较低的原因在于:未考虑应用程序在运行时的资源需求,无法在容器应用程序运行时按需对已分配的资源进行动态调度。基于此,本公开的一些实施例的资源调度方法首先根据目标容器应用程序的运行监控信息,生成目标容器应用程序的目标容器应用程序类型信息。然后,根据目标容器应用程序类型信息对应的资源需求信息,从容器应用集群的集群节点队列中选择用于部署目标容器应用程序的容器集的集群节点。也因为生成了目标容器应用程序类型信息,可以根据目标容器应用程序运行监控信息确定资源需求信息。从而可以根据资源需求信息确定部署目标容器应用程序的集群节点。最后,对容器应用集群的资源进行调度以将目标容器应用程序部署在集群节点的设备。由此,可以根据目标容器应用程序在运行时的资源需求信息,在目标容器应用程序运行时按需对已分配的资源进行动态调度。进而提高了容器应用集群的设备的资源利用率。
进一步参考图4,其示出了资源调度方法的另一些实施例的流程400。该资源调度方法的流程400,包括以下步骤:
步骤401,获取容器应用集群的各个集群节点的各个历史节点运行监控信息作为历史节点运行监控信息集。
在一些实施例中,资源调度方法运行于其上的执行主体可以通过有线连接方式或者无线连接方式从终端获取上述容器应用集群的各个集群节点的各个历史节点运行监控信息作为历史节点运行监控信息集。其中,上述历史节点运行监控信息可以为对应的集群节点的设备在历史时间点的运行中的资源占用信息,可以包括节点中央处理器使用率和节点内存使用率。其中,上述节点中央处理器使用率可以为集群节点的设备运行时中央处理器的使用比率。上述节点内存使用率可以为集群节点的设备运行时内存的使用比率。
步骤402,将运行监控信息输入预先训练的应用程序分类模型以生成目标容器应用程序类型信息。
在一些实施例中,上述执行主体可以将上述运行监控信息输入预 先训练的应用程序分类模型以生成目标容器应用程序类型信息。实践中,上述应用程序分类模型可以通过以下步骤训练得到:
第一步,获取上述容器应用集群的容器应用程序集中各个容器应用程序的各个历史运行监控信息作为历史运行监控信息集。其中,上述历史运行监控信息可以为容器应用程序在历史时间点的运行中的资源占用信息。
第二步,基于上述历史运行监控信息集,训练得到初始应用程序分类模型。作为示例,上述执行主体可以将上述历史运行监控信息集作为训练集,采用聚类算法训练得到初始应用程序分类模型。例如,可以采用“K-Means”聚类算法训练得到初始应用程序分类模型。这里对于聚类算法的设定,不做限定。
第三步,基于预标注的标注历史运行监控信息集和上述初始应用程序分类模型,训练得到应用程序分类模型。其中,上述预标注的标注历史运行监控信息集可以为标注了容器应用程序类型信息的各个历史运行监控信息,可以包括划分为不同类别数的各个历史运行监控信息组。作为示例,可以采用轮廓系数(Silhouette Coefficient)法对各个历史运行监控信息组的聚类效果进行评估以确定模型参数。上述模型参数可以为聚类的类别数。具体来说,可以从上述不同类别数中选择对应的历史运行监控信息组的轮廓系数最大的类别数作为应用程序分类模型的模型参数以确定应用程序分类模型。可以理解的是,上述类别数的取值可以为数值范围[2,6]内的整数。
步骤403,响应于确定不存在集群节点队列,执行以下集群节点队列生成步骤:基于历史节点运行监控信息集,生成各个集群节点中每个集群节点的得分值,得到得分值集;基于得分值集和得分值集中的各个得分值对应的各个集群节点,生成集群节点队列。
在一些实施例中,上述执行主体可以响应于确定不存在集群节点队列,执行以下集群节点队列生成步骤:
第一步,基于上述历史节点运行监控信息集,生成上述各个集群节点中每个集群节点的得分值,得到得分值集。
实践中,首先,上述执行主体可以将上述历史节点运行监控信息 集包括的各个节点中央处理器使用率的加权平均值确定为节点中央处理器负载均值。作为示例,上述容器应用集群的各个集群节点可以为“集群节点001,集群节点002,集群节点003”。上述“集群节点001”、“集群节点002”和“集群节点003”对应的历史节点运行监控信息可以分别为[节点中央处理器使用率:60%,节点内存使用率:40%]、[节点中央处理器使用率:50%,节点内存使用率:30%]和[节点中央处理器使用率:30%,节点内存使用率:20%]。上述“集群节点001”、“集群节点002”和“集群节点003”对应的中央处理器核数可以分别为[4核]、[4核]和[8核]。上述“集群节点001”、“集群节点002”和“集群节点003”对应的内存总量可以分别为[4G]、[8G]和[16G]。上述执行主体可以通过以下公式确定节点中央处理器负载均值:
Figure PCTCN2021128048-appb-000001
其中,MeanCPUuse表示节点中央处理器负载均值。i表示上述各个集群节点中集群节点的序号。n表示上述各个集群节点所包括的集群节点的数量。CPUuse i表示上述各个集群节点中的第i个集群节点的节点中央处理器使用率。a i表示上述各个集群节点中的第i个集群节点的中央处理器核数。通过上述公式确定的节点中央处理器负载均值可以为:
Figure PCTCN2021128048-appb-000002
然后,可以将上述历史节点运行监控信息集包括的各个节点内存使用率的加权平均值确定为节点内存负载均值。上述执行主体可以通过以下公式确定节点内存负载均值:
Figure PCTCN2021128048-appb-000003
其中,MeanStoreUse表示节点内存负载均值。i表示上述各个集群节点中集群节点的序号。n表示上述各个集群节点所包括的集群节点的数量。StoreUse i表示上述各个集群节点中的第i个集群节点的 节点内存使用率。b i表示上述各个集群节点中的第i个集群节点的内存总量。通过上述公式确定的节点内存负载均值可以为:
Figure PCTCN2021128048-appb-000004
最后,可以基于上述节点中央处理器负载均值和上述节点内存负载均值,生成上述集群节点的得分值。上述执行主体可以通过以下子步骤生成上述集群节点的得分值:
第一子步骤,将上述集群节点对应的节点中央处理器使用率与上述节点中央处理器负载均值的比值确定为节点中央处理器负载得分值。作为示例,上述执行主体可以将集群节点“集群节点001”对应的节点中央处理器使用率[节点中央处理器使用率:60%]与上述节点中央处理器负载均值[0.425]的比值[1.412]确定为节点中央处理器负载得分值。
第二子步骤,将上述集群节点对应的节点内存使用率与上述节点内存负载均值的比值确定为节点内存负载得分值。作为示例,上述执行主体可以将集群节点“集群节点001”对应的节点内存使用率[节点内存使用率:40%]与上述节点内存负载均值[0.257]的比值[1.556]确定为节点中央处理器负载得分值。
第三子步骤,基于上述节点中央处理器负载得分值和上述节点内存负载得分值,生成上述集群节点的得分值。作为示例,上述执行主体可以通过以下公式生成上述集群节点的得分值:
Figure PCTCN2021128048-appb-000005
其中,Score表示上述集群节点的得分值。a表示上述集群节点对应的节点中央处理器负载得分值。b表示上述集群节点对应的节点内存负载得分值。MeanCPUuse表示节点中央处理器负载均值。MeanStoreUse表示节点内存负载均值。通过上述公式确定的上述集群节点“集群节点001”的得分值可以为:
Figure PCTCN2021128048-appb-000006
第二步,基于上述得分值集和上述得分值集中的各个得分值对应的各个集群节点,生成集群节点队列。
实践中,首先,上述执行主体可以建立空的集群节点队列。然后,可以将得分值集中的各个得分值集降序排列,生成得分值序列。最后,可以将上述得分值序列中的各个得分值对应的各个集群节点依次添加至上述空的集群节点队列中,得到集群节点队列。例如,上述得分值集可以为[0.337,0.341,0.337]。第1个得分值[0.337]对应集群节点“集群节点001”。第2个得分值[0.341]对应集群节点“集群节点002”。第3个得分值[0.337]对应集群节点“集群节点003”。可以将得分值集中的各个得分值集降序排列,生成得分值序列[0.341,0.337,0.337]。之后,可以依次将得分值序列中的得分值[0.341]、[0.337]和[0.337]对应的集群节点“集群节点002”、“集群节点001”和“集群节点003”添加至建立的空的集群节点队列中。生成的集群节点队列为“集群节点002,集群节点001,集群节点003”。
步骤401-403的技术方案作为本公开的实施例的一个发明点,解决了背景技术提及的技术问题二“对资源进行调度时没有考虑容器应用程序对不同资源的敏感程度,对于对不同资源敏感程度差异较大的不同类型的容器应用程序,采用统一的调度策略进行调度,导致部署容器应用程序的集群节点的设备出现负载的频次较高”。导致部署容器应用程序的集群节点的设备出现负载的频次较高的因素往往如下:对资源进行调度时没有考虑容器应用程序对不同资源的敏感程度,对于对不同资源敏感程度差异较大的不同类型的容器应用程序,采用统一的调度策略进行调度。如果解决了上述因素,就能达到减少部署容器应用程序的集群节点的设备出现负载的频次的效果。为了达到这一效果,本公开通过获取的容器应用集群的容器应用程序集中各个容器应用程序的各个历史运行监控信息,训练得到初始应用程序分类模型。由此,可以根据容器应用程序的历史运行监控信息,确定容器应用程序的应用程序类型信息。从而可以根据容器应用程序对不同资源的敏感程度,确定容器应用程序的应用程序类型信息。之后,可以响应于确定不存在集群节点队列,通过获取的历史节点运行监控信息集,生成各个集群节点中每个集群节点的得分值,得到得分值集。由此,上述得分值可以反应集群节点的设备的不同维度资源的综合负载程度, 进而可以反应集群节点的设备中部署的容器应用程序对不同维度资源的综合敏感程度。最后,可以基于上述得分值集和上述得分值集中的各个得分值对应的各个集群节点,生成集群节点队列。由此,生成的集群节点队列可以为部署不同类型的容器应用程序时的集群节点选择提供支持。从而可以根据容器应用程序的应用程序类型信息对应的资源需求信息,从集群节点队列选择集群节点以对容器应用程序进行部署,避免采用统一的调度策略。进而减少了部署容器应用程序的集群节点的设备出现负载的频次。
步骤404,基于目标容器应用程序类型信息对应的资源需求信息和部署目标容器应用程序的容器应用集群的集群节点队列中各个集群节点的优先级,从集群节点队列中选择符合预定条件的集群节点作为目标集群节点。
步骤405,对容器应用集群的资源进行调度以将目标容器应用程序的容器集部署至目标集群节点。
在一些实施例中,步骤404-405的具体实现及所带来的技术效果可以参考图3对应的那些实施例中的步骤302-303,在此不再赘述。
从图4中可以看出,与图2对应的一些实施例的描述相比,图4对应的一些实施例中的资源调度方法的流程400体现了对生成目标容器应用程序类型信息和生成集群节点队列进行扩展的步骤。由此,可以根据容器应用程序对不同资源的敏感程度,确定容器应用程序的应用程序类型信息。从而可以根据容器应用程序的应用程序类型信息对应的资源需求信息,从集群节点队列选择集群节点以对容器应用程序进行部署,避免采用统一的调度策略。进而减少了部署容器应用程序的集群节点的设备出现负载的频次。
进一步参考图5,作为对上述各图所示方法的实现,本公开提供了一种资源调度装置的一些实施例,这些装置实施例与图2所示的那些方法实施例相对应,该装置具体可以应用于各种电子设备中。
如图5所示,一些实施例的资源调度装置500包括:生成单元501、选择单元502和调度单元503。其中,生成单元501被配置成基于目 标容器应用程序的运行监控信息,生成目标容器应用程序类型信息。选择单元502被配置成基于上述目标容器应用程序类型信息对应的资源需求信息和部署上述目标容器应用程序的容器应用集群的集群节点队列中各个集群节点的优先级,从上述集群节点队列中选择符合预定条件的集群节点作为目标集群节点。调度单元503被配置成对上述容器应用集群的资源进行调度以将上述目标容器应用程序的容器集部署至上述目标集群节点。
在一些实施例的可选实现方式中,资源调度装置500的生成单元501可以进一步被配置成:将上述运行监控信息输入预先训练的应用程序分类模型以生成目标容器应用程序类型信息。
在一些实施例的可选实现方式中,上述应用程序分类模型可以通过以下步骤训练得到:获取上述容器应用集群的容器应用程序集中各个容器应用程序的各个历史运行监控信息作为历史运行监控信息集;基于上述历史运行监控信息集,训练得到初始应用程序分类模型;基于预标注的标注历史运行监控信息集和上述初始应用程序分类模型,训练得到应用程序分类模型。
在一些实施例的可选实现方式中,在资源调度装置500的生成单元501之前,资源调度装置500还包括:获取单元,被配置成获取上述容器应用集群的各个集群节点的各个历史节点运行监控信息作为历史节点运行监控信息集。
在一些实施例的可选实现方式中,在资源调度装置500的选择单元502之前,资源调度装置500还包括:执行单元,被配置成响应于确定不存在集群节点队列,执行以下集群节点队列生成步骤:基于上述历史节点运行监控信息集,生成上述各个集群节点中每个集群节点的得分值,得到得分值集;基于上述得分值集和上述得分值集中的各个得分值对应的各个集群节点,生成集群节点队列。
在一些实施例的可选实现方式中,上述历史节点运行监控信息可以包括节点中央处理器使用率和节点内存使用率。
在一些实施例的可选实现方式中,上述执行单元的集群节点队列生成步骤可以进一步被配置成:将上述历史节点运行监控信息集包括 的各个节点中央处理器使用率的加权平均值确定为节点中央处理器负载均值;将上述历史节点运行监控信息集包括的各个节点内存使用率的加权平均值确定为节点内存负载均值;基于上述节点中央处理器负载均值和上述节点内存负载均值,生成上述集群节点的得分值。
在一些实施例的可选实现方式中,上述执行单元的集群节点队列生成步骤可以进一步被配置成:将上述集群节点对应的节点中央处理器使用率与上述节点中央处理器负载均值的比值确定为节点中央处理器负载得分值;将上述集群节点对应的节点内存使用率与上述节点内存负载均值的比值确定为节点内存负载得分值;基于上述节点中央处理器负载得分值和上述节点内存负载得分值,生成上述集群节点的得分值。
在一些实施例的可选实现方式中,资源调度装置500还包括:实时节点运行监控信息获取单元和排列单元。其中,实时节点运行监控信息获取单元被配置成获取上述各个集群节点中每个集群节点的实时节点运行监控信息,得到实时节点运行监控信息集。排列单元被配置成基于上述实时节点运行监控信息集,对上述集群节点队列中的各个集群节点进行排列。
在一些实施例的可选实现方式中,资源调度装置500的排列单元可以进一步被配置成:基于上述实时节点运行监控信息集,生成上述各个集群节点中每个集群节点的实时得分值,得到实时得分值集;基于上述实时得分值集,对上述集群节点队列中的各个集群节点进行排列。
可以理解的是,该装置500中记载的诸单元与参考图3描述的方法中的各个步骤相对应。由此,上文针对方法描述的操作、特征以及产生的有益效果同样适用于装置500及其中包含的单元,在此不再赘述。
下面参考图6,其示出了适于用来实现本公开的一些实施例的电子设备(例如图1中的计算设备)600的结构示意图。图6示出的电子设备仅仅是一个示例,不应对本公开的实施例的功能和使用范围带 来任何限制。
如图6所示,电子设备600可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。
通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许电子设备600与其他设备进行无线或有线通信以交换数据。虽然图6示出了具有各种装置的电子设备600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。图6中示出的每个方框可以代表一个装置,也可以根据需要代表多个装置。
特别地,根据本公开的一些实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的一些实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的一些实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开的一些实施例的方法中限定的上述功能。
需要说明的是,本公开的一些实施例中记载的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有 一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开的一些实施例中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开的一些实施例中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:基于目标容器应用程序的运行监控信息,生成目标容器应用程序类型信息;基于上述目标容器应用程序类型信息对应的资源需求信息和部署上述目标容器应用程序的容器应用集群的集群节点队列中各个集群节点的优先级,从上述集群节点队列中选择符合预定条件的集群节点作为目标集群节点;对上述容器应用集群的资源进行 调度以将上述目标容器应用程序的容器集部署至上述目标集群节点。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的一些实施例的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言-诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言-诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开的一些实施例中的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括生成单元、选择单元和调度单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,调度单元还可以被描述为“对上述容器应用集群的资源进行调度以将上述目标容器应用程序的容器集部署至上述目标集群节点的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部 件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
以上描述仅为本公开的一些较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开的实施例中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开的实施例中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (12)

  1. 一种资源调度方法,包括:
    基于目标容器应用程序的运行监控信息,生成目标容器应用程序类型信息;
    基于所述目标容器应用程序类型信息对应的资源需求信息和部署所述目标容器应用程序的容器应用集群的集群节点队列中各个集群节点的优先级,从所述集群节点队列中选择符合预定条件的集群节点作为目标集群节点;
    对所述容器应用集群的资源进行调度以将所述目标容器应用程序的容器集部署至所述目标集群节点。
  2. 根据权利要求1所述的方法,其中,所述基于目标容器应用程序的运行监控信息,生成目标容器应用程序类型信息,包括:
    将所述运行监控信息输入预先训练的应用程序分类模型以生成目标容器应用程序类型信息。
  3. 根据权利要求2所述的方法,其中,所述应用程序分类模型通过以下步骤训练得到:
    获取所述容器应用集群的容器应用程序集中各个容器应用程序的各个历史运行监控信息作为历史运行监控信息集;
    基于所述历史运行监控信息集,训练得到初始应用程序分类模型;
    基于预标注的标注历史运行监控信息集和所述初始应用程序分类模型,训练得到应用程序分类模型。
  4. 根据权利要求1所述的方法,其中,在所述基于目标容器应用程序的运行监控信息,生成目标容器应用程序类型信息之前,所述方法还包括:
    获取所述容器应用集群的各个集群节点的各个历史节点运行监控信息作为历史节点运行监控信息集。
  5. 根据权利要求4所述的方法,其中,在所述从所述集群节点队列中选择符合预定条件的集群节点作为目标集群节点之前,所述方法还包括:
    响应于确定不存在集群节点队列,执行以下集群节点队列生成步骤:
    基于所述历史节点运行监控信息集,生成所述各个集群节点中每个集群节点的得分值,得到得分值集;
    基于所述得分值集和所述得分值集中的各个得分值对应的各个集群节点,生成集群节点队列。
  6. 根据权利要求5所述的方法,其中,所述历史节点运行监控信息包括节点中央处理器使用率和节点内存使用率;以及
    所述基于所述历史节点运行监控信息集,生成所述各个集群节点中每个集群节点的得分值,包括:
    将所述历史节点运行监控信息集包括的各个节点中央处理器使用率的加权平均值确定为节点中央处理器负载均值;
    将所述历史节点运行监控信息集包括的各个节点内存使用率的加权平均值确定为节点内存负载均值;
    基于所述节点中央处理器负载均值和所述节点内存负载均值,生成所述集群节点的得分值。
  7. 根据权利要求6所述的方法,其中,所述基于所述节点中央处理器负载均值和所述节点内存负载均值,生成所述集群节点的得分值,包括:
    将所述集群节点对应的节点中央处理器使用率与所述节点中央处理器负载均值的比值确定为节点中央处理器负载得分值;
    将所述集群节点对应的节点内存使用率与所述节点内存负载均值的比值确定为节点内存负载得分值;
    基于所述节点中央处理器负载得分值和所述节点内存负载得分 值,生成所述集群节点的得分值。
  8. 根据权利要求1所述的方法,其中,所述方法还包括:
    获取所述各个集群节点中每个集群节点的实时节点运行监控信息,得到实时节点运行监控信息集;
    基于所述实时节点运行监控信息集,对所述集群节点队列中的各个集群节点进行排列。
  9. 根据权利要求8所述的方法,其中,所述对所述集群节点队列中的各个集群节点进行排列,包括:
    基于所述实时节点运行监控信息集,生成所述各个集群节点中每个集群节点的实时得分值,得到实时得分值集;
    基于所述实时得分值集,对所述集群节点队列中的各个集群节点进行排列。
  10. 一种资源调度装置,包括:
    生成单元,被配置成基于目标容器应用程序的运行监控信息,生成目标容器应用程序类型信息;
    选择单元,被配置成基于所述目标容器应用程序类型信息对应的资源需求信息和部署所述目标容器应用程序的容器应用集群的集群节点队列中各个集群节点的优先级,从所述集群节点队列中选择符合预定条件的集群节点作为目标集群节点;
    调度单元,被配置成对所述容器应用集群的资源进行调度以将所述目标容器应用程序的容器集部署至所述目标集群节点。
  11. 一种电子设备,包括:
    一个或多个处理器;
    存储装置,其上存储有一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-9中任一所述的方法。
  12. 一种计算机可读介质,其上存储有计算机程序,其中,所述程序被处理器执行时实现如权利要求1-9中任一所述的方法。
PCT/CN2021/128048 2020-11-20 2021-11-02 资源调度方法、装置、电子设备和计算机可读介质 WO2022105589A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011311669.4A CN112363813A (zh) 2020-11-20 2020-11-20 资源调度方法、装置、电子设备和计算机可读介质
CN202011311669.4 2020-11-20

Publications (1)

Publication Number Publication Date
WO2022105589A1 true WO2022105589A1 (zh) 2022-05-27

Family

ID=74533706

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/128048 WO2022105589A1 (zh) 2020-11-20 2021-11-02 资源调度方法、装置、电子设备和计算机可读介质

Country Status (2)

Country Link
CN (1) CN112363813A (zh)
WO (1) WO2022105589A1 (zh)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115242704A (zh) * 2022-06-22 2022-10-25 中国电信股份有限公司 网络拓扑数据更新方法、装置和电子设备
CN115277862A (zh) * 2022-06-21 2022-11-01 阿里巴巴(中国)有限公司 基于容器的资源调度方法及装置
CN115361285A (zh) * 2022-07-05 2022-11-18 海南车智易通信息技术有限公司 实现离在线业务混合部署的方法、装置、设备及介质
CN115828231A (zh) * 2022-10-28 2023-03-21 广州汽车集团股份有限公司 应用程序运行方法、装置、车辆以及存储介质
CN116319322A (zh) * 2023-05-16 2023-06-23 北京国电通网络技术有限公司 电力设备节点通信连接方法、装置、设备和计算机介质
CN116719614A (zh) * 2023-08-11 2023-09-08 中国电信股份有限公司 虚拟机监视器选择方法、装置、计算机设备和存储介质
CN116974744A (zh) * 2023-03-14 2023-10-31 福州创星通信息科技有限公司 一种用于共享空间的交互控制系统与交互控制方法
CN117798936A (zh) * 2024-02-29 2024-04-02 卡奥斯工业智能研究院(青岛)有限公司 机械臂集群的控制方法、装置、电子设备及存储介质

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112363813A (zh) * 2020-11-20 2021-02-12 上海连尚网络科技有限公司 资源调度方法、装置、电子设备和计算机可读介质
CN113553180B (zh) * 2021-07-20 2023-10-13 唯品会(广州)软件有限公司 一种容器的调度方法、装置及电子设备
CN113590317A (zh) * 2021-07-27 2021-11-02 杭州朗和科技有限公司 离线业务的调度方法、装置、介质和计算设备
CN113656046A (zh) * 2021-08-31 2021-11-16 北京京东乾石科技有限公司 一种应用部署方法和装置
CN116541152A (zh) * 2023-07-05 2023-08-04 杭州金智塔科技有限公司 基于多方联合计算的任务处理方法以及系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108519911A (zh) * 2018-03-23 2018-09-11 上饶市中科院云计算中心大数据研究院 一种基于容器的集群管理系统中资源的调度方法和装置
CN109753356A (zh) * 2018-12-25 2019-05-14 北京友信科技有限公司 一种容器资源调度方法、装置及计算机可读存储介质
CN111190718A (zh) * 2020-01-07 2020-05-22 第四范式(北京)技术有限公司 实现任务调度的方法、装置及系统
US20200267212A1 (en) * 2019-02-15 2020-08-20 International Business Machines Corporation Method for managing and allocating resources in a clustered computing environment
CN111813545A (zh) * 2020-06-29 2020-10-23 北京字节跳动网络技术有限公司 一种资源配置方法、装置、介质和设备
CN112363813A (zh) * 2020-11-20 2021-02-12 上海连尚网络科技有限公司 资源调度方法、装置、电子设备和计算机可读介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108519911A (zh) * 2018-03-23 2018-09-11 上饶市中科院云计算中心大数据研究院 一种基于容器的集群管理系统中资源的调度方法和装置
CN109753356A (zh) * 2018-12-25 2019-05-14 北京友信科技有限公司 一种容器资源调度方法、装置及计算机可读存储介质
US20200267212A1 (en) * 2019-02-15 2020-08-20 International Business Machines Corporation Method for managing and allocating resources in a clustered computing environment
CN111190718A (zh) * 2020-01-07 2020-05-22 第四范式(北京)技术有限公司 实现任务调度的方法、装置及系统
CN111813545A (zh) * 2020-06-29 2020-10-23 北京字节跳动网络技术有限公司 一种资源配置方法、装置、介质和设备
CN112363813A (zh) * 2020-11-20 2021-02-12 上海连尚网络科技有限公司 资源调度方法、装置、电子设备和计算机可读介质

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115277862A (zh) * 2022-06-21 2022-11-01 阿里巴巴(中国)有限公司 基于容器的资源调度方法及装置
CN115242704A (zh) * 2022-06-22 2022-10-25 中国电信股份有限公司 网络拓扑数据更新方法、装置和电子设备
CN115242704B (zh) * 2022-06-22 2023-08-11 中国电信股份有限公司 网络拓扑数据更新方法、装置和电子设备
CN115361285A (zh) * 2022-07-05 2022-11-18 海南车智易通信息技术有限公司 实现离在线业务混合部署的方法、装置、设备及介质
CN115361285B (zh) * 2022-07-05 2024-02-23 海南车智易通信息技术有限公司 实现离在线业务混合部署的方法、装置、设备及介质
CN115828231A (zh) * 2022-10-28 2023-03-21 广州汽车集团股份有限公司 应用程序运行方法、装置、车辆以及存储介质
CN116974744A (zh) * 2023-03-14 2023-10-31 福州创星通信息科技有限公司 一种用于共享空间的交互控制系统与交互控制方法
CN116974744B (zh) * 2023-03-14 2024-05-17 福州创星通信息科技有限公司 一种用于共享空间的交互控制系统与交互控制方法
CN116319322A (zh) * 2023-05-16 2023-06-23 北京国电通网络技术有限公司 电力设备节点通信连接方法、装置、设备和计算机介质
CN116319322B (zh) * 2023-05-16 2023-09-12 北京国电通网络技术有限公司 电力设备节点通信连接方法、装置、设备和计算机介质
CN116719614A (zh) * 2023-08-11 2023-09-08 中国电信股份有限公司 虚拟机监视器选择方法、装置、计算机设备和存储介质
CN117798936A (zh) * 2024-02-29 2024-04-02 卡奥斯工业智能研究院(青岛)有限公司 机械臂集群的控制方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN112363813A (zh) 2021-02-12

Similar Documents

Publication Publication Date Title
WO2022105589A1 (zh) 资源调度方法、装置、电子设备和计算机可读介质
CN109947565A (zh) 用于分配计算任务的方法和装置
CN114610474B (zh) 一种异构超算环境下多策略的作业调度方法及系统
CN112114950A (zh) 任务调度方法和装置、以及集群管理系统
CN110149282B (zh) 流量调度方法和装置
CN112559125A (zh) 容器应用迁移方法、装置、电子设备和计算机可读介质
CN113722056A (zh) 任务调度方法、装置、电子设备和计算机可读介质
CN113553160A (zh) 用于人工智能物联网的边缘计算节点任务调度方法及系统
CN113722055A (zh) 数据处理方法、装置、电子设备和计算机可读介质
CN111580974A (zh) Gpu实例分配方法、装置、电子设备和计算机可读介质
CN109783236A (zh) 用于输出信息的方法和装置
CN110009101A (zh) 用于生成量化神经网络的方法和装置
CN112182374B (zh) 库存控制方法、装置、电子设备和计算机可读介质
CN111694672B (zh) 资源分配方法、任务提交方法、装置、电子设备和介质
CN113408970B (zh) 用户信息生成方法、装置、电子设备和计算机可读介质
CN111898061B (zh) 搜索网络的方法、装置、电子设备和计算机可读介质
CN109885400A (zh) 用于发送指令的方法和装置
CN109684059A (zh) 用于监控数据的方法及装置
CN111694670B (zh) 资源分配方法、装置、设备和计算机可读介质
CN114035861A (zh) 集群配置方法、装置、电子设备和计算机可读介质
CN112527454A (zh) 容器组调度方法、装置、电子设备和计算机可读介质
CN112711609A (zh) 用于集成和管理自动化数据流系统的方法、装置和系统
CN116757443B (zh) 新型配电网电力线损率预测方法、装置、电子设备和介质
CN110471752A (zh) 任务执行方法、装置、电子设备以及计算机可读存储介质
WO2023155425A1 (zh) 调货方法、装置、电子设备和计算机可读介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21893737

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21893737

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 171023)