WO2024119763A1 - 一种容器集群算力调度方法及相关装置 - Google Patents
一种容器集群算力调度方法及相关装置 Download PDFInfo
- Publication number
- WO2024119763A1 WO2024119763A1 PCT/CN2023/101216 CN2023101216W WO2024119763A1 WO 2024119763 A1 WO2024119763 A1 WO 2024119763A1 CN 2023101216 W CN2023101216 W CN 2023101216W WO 2024119763 A1 WO2024119763 A1 WO 2024119763A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- computing
- application copy
- application
- resource
- node
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000012216 screening Methods 0.000 claims abstract description 8
- 238000001514 detection method Methods 0.000 claims description 79
- 238000004590 computer program Methods 0.000 claims description 12
- 230000004044 response Effects 0.000 abstract description 10
- 230000000694 effects Effects 0.000 abstract description 4
- 238000005259 measurement Methods 0.000 abstract 2
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present application relates to the technical field of container clusters, and in particular to a method for scheduling computing power of a container cluster; it also relates to a container cluster computing power scheduling device, equipment, computer non-volatile readable storage medium, and container cluster.
- the purpose of this application is to provide a container cluster computing power scheduling method that can balance the differences between application copies, so that each application copy has a consistent response speed to the maximum extent, thereby improving the overall consistency experience of the container cluster.
- Another purpose of this application is to provide a container cluster computing power scheduling device, equipment, computer non-volatile readable storage medium and container cluster, all of which have the above technical effects.
- the embodiment of the present application provides a container cluster computing power scheduling method, including:
- the actual resource requirements of the application copy are determined according to the original resource request of the application copy and the computing power detection value of the target computing resource of the computing node, including:
- the actual resource requirement of the application copy when deploying the application copy to the computing node is determined.
- the application copy when the application copy is deployed to the computing node, it is determined based on the comparison result that the actual resource requirements of the application copy include:
- the actual resource demand of the application copy is kept consistent with the original resource request of the application copy.
- the application copy when the application copy is deployed to the computing node, it is determined based on the comparison result that the actual resource requirements of the application copy include:
- the actual resource requirement of the application copy when the application copy is deployed to the computing node is calculated according to the preset strategy.
- calculating the actual resource requirements of the application copy when deploying the application copy to the computing node includes:
- x demand represents the actual resource demand
- m represents the baseline computing power of the computing resources
- n represents the computing power detection value of the computing resources
- x represents the computing resource amount requested by the original resource.
- deploying the application replica to the screened computing nodes includes:
- the best computing node is selected from the selected computing nodes;
- selecting the optimal computing node from the screened computing nodes includes:
- the computing node with the largest remaining memory is selected from the filtered computing nodes as the optimal computing node.
- selecting the optimal computing node from the screened computing nodes includes:
- a computing node with the least number of running services is selected from the filtered computing nodes as the optimal computing node.
- a computing node with computing resources closest to the resource requirements is selected from among the computing nodes, and the application copy is deployed to the selected computing node.
- a computing node is selected from the computing nodes that meet part of the actual resource requirements according to the number of resource requirements met, and the application copy is deployed to the selected computing node.
- a computing node is selected from the computing nodes that meet part of the actual resource requirements, and the application copy is deployed to the selected computing node.
- receiving the computing power detection value of each computing resource reported by each computing node includes:
- the computing nodes that meet the actual resource requirements of the current application copy are recorded to form a candidate computing node directory, so that when deploying an application copy with the same original resource request as the current application copy, a computing node can be selected from the candidate computing node directory.
- the embodiment of the present application further provides a container cluster computing power scheduling device, including:
- An acquisition module is used to obtain the computing power detection value of the target computing resource of each computing node
- a determination module used to determine the actual resource requirements of the application copy when deploying the application copy to the computing node according to the original resource request of the application copy and the computing power detection value of the target computing resource of the computing node;
- a screening module is used to screen out computing nodes that meet the actual resource requirements of the application replica from various computing nodes;
- the deployment module is used to deploy application copies to the selected computing nodes and allocate instances for the application copies on the computing nodes. The amount of computing resources required to meet actual resource requirements.
- the present application also provides a container cluster computing power scheduling device, including:
- a processor is used to implement the steps of any of the above container cluster computing power scheduling methods when executing a computer program.
- an embodiment of the present application further provides a computer non-volatile readable storage medium, on which a computer program is stored.
- a computer program is stored on which a computer program is stored.
- the present application embodiment further provides a container cluster, including:
- the cluster control center is used to obtain the computing power detection value of the target computing resources of each computing node
- the container cluster computing power scheduling method includes: obtaining the computing power detection value of the target computing resource of each computing node; determining the actual resource demand of the application copy when deploying the application copy to the computing node according to the original resource request of the application copy and the computing power detection value of the target computing resource of the computing node; screening out the computing nodes that meet the actual resource demand of the application copy from each computing node; deploying the application copy to the screened computing nodes, and allocating the computing resources required for the actual resource demand to the application copy on the computing nodes.
- the container cluster computing power scheduling method performs differentiated computing power scheduling according to the actual computing power of each computing node and the original resource request of the application copy, rather than simply allocating the same number of CPU cores, memory, GPU memory and other computing resources to the application copy. This can ensure that each application copy has a consistent response speed and experience to the greatest extent possible, thereby improving the consistency experience of the container cluster.
- the container cluster computing power scheduling device, equipment, computer non-volatile readable storage medium and container cluster provided in the embodiments of the present application all have the above-mentioned technical effects.
- FIG1 is a schematic diagram of a flow chart of a container cluster computing power scheduling method provided in an embodiment of the present application
- FIG2 is a schematic diagram of a container cluster computing power scheduling provided in an embodiment of the present application.
- FIG3 is a schematic diagram of a container cluster computing power scheduling device provided in an embodiment of the present application.
- FIG4 is a schematic diagram of a container cluster computing power scheduling device provided in an embodiment of the present application.
- FIG5 is a schematic diagram of a computer non-volatile readable storage medium provided in an embodiment of the present application.
- the core of this application is to provide a container cluster computing power scheduling method that can balance the differences between application copies, so that each application copy has a consistent response speed to the maximum extent, thereby improving the overall consistency experience of the container cluster.
- Another core of this application is to provide a container cluster computing power scheduling device, equipment, computer non-volatile readable storage medium and container cluster, all of which have the above technical effects.
- FIG. 1 is a flow chart of a method for scheduling computing power of a container cluster provided in an embodiment of the present application.
- the method includes:
- the computing resources of the computing node include CPU, memory, GPU (Graphics Processing Unit), hard disk, etc.
- a computing power detection device can be deployed at each computing node.
- the computing power detection device executes a computing power detection function to detect the computing power of the computing node's CPU, memory, GPU and other computing resources, obtain the computing power detection values of the CPU, memory, GPU and other computing resources, and report the computing power detection values of each computing resource to the cluster control center.
- the cluster control center receives and stores the computing power detection values of the computing resources reported by each computing node.
- Each computing node can report the computing power detection value of each computing resource regularly, and the cluster control center receives the computing power detection value of each computing resource regularly reported by each computing node.
- computing power refers to the real computing power of computing resources.
- the computing power of computing resources can be measured.
- the real computing power of a core can be measured.
- computing power can be calculated based on the host.
- the resource architecture and configuration are calculated using corresponding algorithms.
- a computing resource computing power network as shown in Table 1 can be formed.
- the CPU score is the computing power detection value of the CPU
- the memory score is the computing power detection value of the memory
- the disk read and write score is the computing power detection value of the disk
- the xx score refers to the computing power detection value of other computing resources.
- computing resources also include GPU, etc., which are not listed one by one here.
- the computing power detection device used to detect the computing power detection value of computing resources such as CPU and memory can adopt an existing device that can realize the computing power detection function.
- the specific process of the computing power detection device detecting and obtaining the computing power detection value is not described in detail in this application, and reference can be made to the relevant introduction of the existing device that can realize the computing power detection function.
- the CPU performance is detected by the CPU benchmark tool to obtain the CPU computing power detection value.
- the application orchestration and scheduling device in the cluster control center schedules the application copy, it obtains the original resource request of the application copy and the computing power detection value of the target computing resource.
- the target computing resource refers to the computing resource requested in the original resource request of the application copy. For example, if the original resource request of the application copy is CPU 4 cores and memory 30M, the target computing resources are CPU and memory.
- S102 Determine, according to the original resource request of the application copy and the computing power detection value of the target computing resource of the computing node, the actual resource requirement of the application copy when deploying the application copy to the computing node;
- this embodiment determines the actual resource requirement of the application copy when deploying the application copy to a certain computing node based on the original resource request of the application copy and the computing power detection value of the target computing resources of each computing node.
- the actual resource requirements of the application copy are determined according to the original resource request of the application copy and the computing power detection value of the target computing resource of the computing node, including:
- the actual resource requirement of the application copy when deploying the application copy to the computing node is determined.
- the original resource request of the application replica can be regarded as a resource request based on the baseline computing power.
- the actual resource demand of the application replica can be regarded as a resource request based on the actual computing power detection value.
- an application copy requests a 4-core CPU
- the application copy requests a 4-core CPU with a computing power of the benchmark computing power.
- the actual computing power of the CPU is significantly different from the benchmark computing power, it can be considered that the application copy will have a greater impact on the response speed of the application copy when it is deployed to the computing node.
- the actual computing power of the CPU is slightly different from the benchmark computing power, it can be considered that the application copy will have a less impact on the response speed of the application copy when it is deployed to the computing node.
- the actual resource requirement of the application copy should be greater than the original resource request.
- the actual resource requirement of the application copy can be a 6-core CPU.
- the actual resource requirements of the application copy may include:
- the actual resource demand of the application copy is kept consistent with the original resource request of the application copy;
- the actual resource requirement of the application copy when the application copy is deployed to the computing node is calculated according to the preset strategy.
- the size of the preset threshold can be set differently. If the difference between the computing power detection value of the computing resource and the baseline computing power of the computing resource is less than the preset threshold, the actual resource demand of the application copy is kept consistent with the original resource request of the application copy. If the difference between the computing power detection value of the computing resource and the baseline computing power of the computing resource is not less than the preset threshold, the actual resource demand of the application copy when the application copy is deployed to the computing node is calculated according to the preset strategy.
- the principle of the preset strategy can be that the greater the difference between the computing power detection value of the computing resource of the computing node and the baseline computing power of the computing resource, the greater the actual resource demand of the application copy deployed to this computing node. Under this principle, those skilled in the art can make differential settings for the preset strategy, that is, for the specific calculation method.
- calculating the actual resource requirements of the application copy when deploying the application copy to the computing node includes:
- x demand represents the actual resource demand
- m represents the baseline computing power of the computing resources
- n represents the computing power detection value of the computing resources
- x represents the computing resource amount requested by the original resource.
- the original resource request of the application replica is CPU2 cores
- the CPU computing power detection value of a computing node is 50
- the CPU baseline computing power is 100
- S103 Filter out computing nodes that meet the actual resource requirements of the application replica from the computing nodes;
- S104 Deploy the application replica to the filtered computing nodes, and allocate computing resources required by actual resource demands to the application replica on the computing nodes.
- the actual resource requirements of the application replica when the application replica is scheduled on this compute node can be calculated. If the compute node can meet the actual resource requirements of the application replica when it is deployed on this compute node, then the compute node can be deployed to the compute node. Meeting the actual resource requirements of the application replica means meeting all resource requirements in the actual resource requirements at the same time.
- meeting the actual resource requirements means meeting both 4-core CPU and 30M memory.
- deploying the application replica to the screened computing nodes includes:
- the best compute node is selected from the selected compute nodes
- selecting the optimal computing node from the screened computing nodes includes:
- the computing node with the largest remaining memory is selected from the filtered computing nodes as the optimal computing node.
- the criterion for the optimal computing node is the largest remaining memory. For each computing node that can meet the actual resource requirements when the application copy is deployed to this computing node, the computing node with the largest remaining memory is the optimal computing node.
- the application copy is deployed to this unique optimal computing node. If there is multiple optimal computing nodes, an optimal computing node can be randomly selected and the application copy is deployed to the selected optimal computing node. Compute node. If there are multiple optimal compute nodes, you can also select an optimal compute node based on other factors and deploy the application replica to the selected optimal compute node. For example, based on the number of services running on the optimal compute node, select the optimal compute node with the least number of services running from each optimal compute node.
- selecting the optimal computing node from the screened computing nodes includes:
- a computing node with the least number of running services is selected from the filtered computing nodes as the optimal computing node.
- the standard of the optimal computing node in the embodiment of the present application is that the least services are running. For each computing node that can meet the actual resource requirements when the application copy is deployed to this computing node, the computing node with the least services running is the optimal computing node.
- the application copy is deployed to this unique optimal computing node. If there is multiple optimal computing nodes, an optimal computing node can be randomly selected from them and the application copy is deployed to the selected optimal computing node. If there are multiple optimal computing nodes, other factors can be combined to select an optimal computing node and deploy the application copy to the selected optimal computing node. For example, based on the remaining memory of the optimal computing node, the optimal computing node with the most remaining memory is selected from each optimal computing node.
- a computing node with computing resources closest to the resource requirements is selected from among the computing nodes, and the application copy is deployed to the selected computing node.
- the two computing nodes cannot meet the actual resource requirements of the application replicas. If one computing node has an idle 3-core CPU and the other computing node has an idle 2-core CPU, then the computing node with an idle 3-core CPU is selected and the application replica is deployed to the computing node with an idle 3-core CPU.
- a computing node is selected from the computing nodes that meet part of the actual resource requirements according to the number of resource requirements met, and the application copy is deployed to the selected computing node.
- the actual resource requirements are 4-core CPU, 30M memory and 100M GPU memory.
- One computing node has only an idle 4-core CPU, one computing node has only 30M memory, and one computing node has 30M memory and 100M GPU memory. Therefore, the computing node with 30M memory and 100M GPU memory is selected and the application replica is deployed to the computing node with 30M memory and 100M GPU memory.
- a computing node is selected from the computing nodes that meet part of the actual resource requirements, and the application replica is deployed to the selected computing node.
- the actual resource requirements are both 4-core CPU and 30M memory.
- One computing node has only an idle 4-core CPU, and the other has only 30M memory.
- the CPU has a higher priority than the memory.
- the computing node with an idle 4-core CPU is selected, and the application replica is deployed to the computing node with an idle 4-core CPU.
- the priorities of different computing resources can be customized in advance.
- the application scheduling device obtains the priority of each computing resource and performs the above operations accordingly.
- the computing nodes that meet the actual resource requirements of the current application copy are recorded to form a candidate computing node directory, so that when deploying an application copy with the same original resource request as the current application copy, a computing node can be selected from the candidate computing node directory.
- next application copy there are three computing nodes that meet the actual resource requirements of the current application copy. These three computing nodes are recorded to form a candidate computing node directory.
- a computing node that has not deployed an application copy can be directly selected from the candidate computing node directory, and the next application copy can be deployed to this computing node. There is no need to perform steps S101 to S104 for the next application copy at this time, and the deployment of the application copy can be completed more quickly.
- the container cluster computing power scheduling method provided in the embodiment of the present application performs differentiated computing power scheduling according to the actual computing power of each computing node and the original resource request of the application copy, rather than simply allocating the same number of CPU cores, memory, GPU memory and other computing resources to the application copy. This can ensure that each application copy has a consistent response speed and experience to the greatest extent possible, thereby improving the consistency experience of the container cluster.
- the present application also provides a container cluster computing power scheduling device, and the device described below can be referred to in correspondence with the method described above.
- Figure 3 is a schematic diagram of a container cluster computing power scheduling device provided by the present application embodiment. As shown in Figure 3, the device includes:
- An acquisition module 10 is used to obtain a computing power detection value of a target computing resource of each computing node
- a determination module 20 configured to determine the actual resource requirements of the application copy when deploying the application copy to the computing node according to the original resource request of the application copy and the computing power detection value of the target computing resource of the computing node;
- a screening module 30 is used to screen out computing nodes that meet the actual resource requirements of the application replica from the computing nodes;
- the deployment module 40 is used to deploy the application replica to the screened computing nodes, and allocate computing resources required by actual resource requirements to the application replica on the computing nodes.
- the determination module 20 includes:
- a comparison unit used to compare the computing power detection value of the computing resource with the benchmark computing power
- the determination unit is used to determine, according to the comparison result, the actual resource requirement of the application copy when the application copy is deployed to the computing node.
- the determining unit includes:
- the maintaining unit is used to keep the actual resource demand of the application copy consistent with the original resource request of the application copy if the difference between the computing power detection value of the computing resource and the benchmark computing power of the computing resource is less than a preset threshold.
- the determining unit includes:
- the computing unit is used to calculate the actual resource requirements of the application copy when deploying the application copy to the computing node according to the preset strategy if the difference between the computing power detection value of the computing resource and the baseline computing power of the computing resource is not less than a preset threshold.
- the computing unit is specifically used for:
- x demand represents the actual resource demand
- m represents the baseline computing power of the computing resources
- n represents the computing power detection value of the computing resources
- x represents the computing resource amount requested by the original resource.
- the deployment module 40 includes:
- a screening unit configured to select an optimal computing node from the screened computing nodes when there are multiple computing nodes that meet the actual resource requirements of the application copy;
- Deployment unit used to deploy application replicas to the optimal computing node.
- the screening unit is specifically used for:
- the computing node with the largest remaining memory is selected from the filtered computing nodes as the optimal computing node.
- the screening unit is specifically used for:
- a computing node with the least number of running services is selected from the filtered computing nodes as the optimal computing node.
- the first selection module is used to select a computing node with computing resources closest to the resource requirements from among the computing nodes if all computing nodes cannot meet all resource requirements in the actual resource requirements, and deploy the application copy to the selected computing node.
- the second selection module is used to select a computing node from the computing nodes that meet some of the resource requirements in the actual resource requirements according to the number of resource requirements met if there are computing nodes that meet some of the resource requirements in the actual resource requirements, and The application replicas are deployed to the selected compute nodes.
- the third selection module is used to select computing nodes from the computing nodes that meet some of the actual resource requirements according to the priority of the satisfied resource requirements if there are computing nodes that meet some of the actual resource requirements, and deploy the application copy to the selected computing node.
- the priority acquisition module is used to obtain the priority of each resource requirement.
- the receiving module is used to receive the computing power detection value of each computing resource reported by each computing node.
- the receiving module is specifically used for:
- the benchmark computing power acquisition module is used to obtain the benchmark computing power of each computing resource.
- the recording module is used to record the computing nodes that meet the actual resource requirements of the current application copy and form a directory of candidate computing nodes so that when deploying an application copy with the same original resource request as the current application copy, a computing node can be selected from the directory of candidate computing nodes.
- An embodiment of the present application also provides a container cluster computing power scheduling device.
- the device includes a memory 1 and a processor 2.
- Memory 1 used for storing computer programs
- Processor 2 is used to execute the computer program to implement the following steps:
- Obtain the computing power detection value of the target computing resource of each computing node determine the actual resource demand of the application copy when deploying the application copy to the computing node based on the original resource request of the application copy and the computing power detection value of the target computing resource of the computing node; filter out the computing nodes that meet the actual resource demand of the application copy from each computing node; deploy the application copy to the filtered computing nodes, and allocate the computing resources required for the actual resource demand to the application copy on the computing nodes.
- the present application also provides a computer non-volatile readable storage medium, as shown in FIG5.
- the volatile readable storage medium 5 stores a computer program 51.
- the computer program 51 is executed by the processor, the following steps can be implemented:
- Obtain the computing power detection value of the target computing resource of each computing node determine the actual resource demand of the application copy when deploying the application copy to the computing node based on the original resource request of the application copy and the computing power detection value of the target computing resource of the computing node; filter out the computing nodes that meet the actual resource demand of the application copy from each computing node; deploy the application copy to the filtered computing nodes, and allocate the computing resources required for the actual resource demand to the application copy on the computing nodes.
- the computer non-volatile readable storage medium may include: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), magnetic disk or optical disk and other media that can store program codes.
- ROM read-only memory
- RAM random access memory
- magnetic disk or optical disk and other media that can store program codes.
- the embodiment of the present application also provides a container cluster, including a cluster control center and a plurality of computing nodes;
- the cluster control center is used to obtain the computing power detection value of the target computing resources of each computing node
- the steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two.
- the software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本申请公开了一种容器集群算力调度方法,涉及容器集群技术领域,包括:获取各计算节点的目标计算资源的算力检测值;根据应用副本的原始资源请求与计算节点的目标计算资源的算力检测值,确定将应用副本部署到计算节点时,应用副本的实际资源需求;从各计算节点中筛选出满足应用副本的实际资源需求的计算节点;将应用副本部署到筛选出的计算节点,并在计算节点为应用副本分配实际资源需求所需的计算资源量。该方法能够平衡应用副本间的差异,使每个应用副本最大限度的有一致性的响应速度,进而提升容器集群整体的一致性体验。本申请还公开了一种容器集群算力调度装置、设备、计算机非易失性可读存储介质以及容器集群,均具有上述技术效果。
Description
相关申请的交叉引用
本申请要求于2022年12月06日提交中国专利局,申请号为202211554106.7,申请名称为“一种容器集群算力调度方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及容器集群技术领域,特别涉及一种容器集群算力调度方法;还涉及一种容器集群算力调度装置、设备、计算机非易失性可读存储介质以及容器集群。
部署容器集群时并不能保证容器集群中的各主机节点配置完全一致。其中的一个原因是因为不同时期采购的服务器,即使架构相同其算力也会存在差异,有代际差距,有厂商差异。随着以飞腾、鲲鹏为代表的非X86架构的处理器的广泛应用,一云多芯片需求愈发强烈。一云多芯片是指一朵云上存在多种CPU(Central Processing Unit,中央处理器)架构,即一个容器集群内存在多种CPU架构。针对上述场景,现有的K8s容器集群只能分配相同的计算资源,无法进行差异化的分配计算资源。简单的分配相同的计算资源,会导致多应用副本时表现不一致,有的应用副本响应慢,有的应用副本响应快,容器集群的一致性体验差。另外,相关技术公开的技术方案都是基于资源使用率进行任务的下发或者容器的部署,都是资源使用率的调度。然而,资源使用率与算力是不同的概念,二者有本质的区别,基于资源使用率进行任务下发等操作时,其默认的是设备的算力都是完全一样的,只是资源使用率存在差别。这样在一云多芯的场景下,依旧存在无法进行差异化的分配计算资源的问题。
发明内容
本申请的目的是提供一种容器集群算力调度方法,能够平衡应用副本间的差异,使每个应用副本最大限度的有一致性的响应速度,进而提升容器集群整体的一致性体验。本申请的另一个目的是提供一种容器集群算力调度装置、设备、计算机非易失性可读存储介质以及容器集群,均具有上述技术效果。
为解决上述技术问题,本申请实施例提供了一种容器集群算力调度方法,包括:
获取各计算节点的目标计算资源的算力检测值;
根据应用副本的原始资源请求与计算节点的目标计算资源的算力检测值,确定将应用副本部署到计算节点时,应用副本的实际资源需求;
从各计算节点中筛选出满足应用副本的实际资源需求的计算节点;
将应用副本部署到筛选出的计算节点,并在计算节点为应用副本分配实际资源需求所需的计算资源量。
在本申请的一些实施例中,根据应用副本的原始资源请求与计算节点的目标计算资源的算力检测值,确定将应用副本部署到计算节点时,应用副本的实际资源需求包括:
比较计算资源的算力检测值与基准算力;
根据比较结果,确定将应用副本部署到计算节点时,应用副本的实际资源需求。
在本申请的一些实施例中,根据比较结果,确定将应用副本部署到计算节点时,应用副本的实际资源需求包括:
若计算资源的算力检测值与计算资源的基准算力的差值小于预设阈值,则保持应用副本的实际资源需求与应用副本的原始资源请求一致。
在本申请的一些实施例中,根据比较结果,确定将应用副本部署到计算节点时,应用副本的实际资源需求包括:
若计算资源的算力检测值与计算资源的基准算力的差值不小于预设阈值,则根据预设策略,计算得到将应用副本部署到计算节点时,应用副本的实际资源需求。
在本申请的一些实施例中,根据预设策略,计算得到将应用副本部署到计算节点时应用副本的实际资源需求包括:
根据x需求=(m-n)/m*x+x,计算得到将应用副本部署到计算节点时,应用副本的实际资源需求;
x需求表示实际资源需求,m表示计算资源的基准算力,n表示计算资源的算力检测值,x表示原始资源请求的计算资源量。
在本申请的一些实施例中,将应用副本部署到筛选出的计算节点包括:
当满足应用副本的实际资源需求的计算节点为多个时,从筛选出的各计算节点中选取最优计算节点;
将应用副本部署到最优计算节点。
在本申请的一些实施例中,从筛选出的各计算节点中选取最优计算节点包括:
从筛选出的计算节点中选取剩余内存最大的计算节点作为最优计算节点。
在本申请的一些实施例中,从筛选出的各计算节点中选取最优计算节点包括:
从筛选出的计算节点中选取运行的服务最少的计算节点作为最优计算节点。
在本申请的一些实施例中,还包括:
若各计算节点均不能满足实际资源需求中的所有资源需求,则从各计算节点中挑选计算资源量最接近资源需求的计算节点,并将应用副本部署到挑选出的计算节点。
在本申请的一些实施例中,还包括:
若存在满足实际资源需求中部分资源需求的计算节点,则根据满足的资源需求的数量,从满足实际资源需求中部分资源需求的计算节点中挑选计算节点,并将应用副本部署到所挑选的计算节点。
在本申请的一些实施例中,还包括:
若存在满足实际资源需求中部分资源需求的计算节点,则根据满足的资源需求的优先级,从满足实际资源需求中部分资源需求的计算节点中挑选计算节点,并将应用副本部署到所挑选的计算节点。
在本申请的一些实施例中,还包括:
获取各资源需求的优先级。
在本申请的一些实施例中,还包括:
接收各计算节点上报的各项计算资源的算力检测值。
在本申请的一些实施例中,接收各计算节点上报的各项计算资源的算力检测值包括:
接收各计算节点定时上报的各项计算资源的算力检测值。
在本申请的一些实施例中,还包括:
获取各计算资源的基准算力。
在本申请的一些实施例中,还包括:
记录满足当前的应用副本的实际资源需求的计算节点,形成备选计算节点目录,以当部署与当前的应用副本的原始资源请求相同的应用副本时,从备选计算节点目录中选取计算节点。
为解决上述技术问题,本申请实施例还提供了一种容器集群算力调度装置,包括:
获取模块,用于获取各计算节点的目标计算资源的算力检测值;
确定模块,用于根据应用副本的原始资源请求与计算节点的目标计算资源的算力检测值,确定将应用副本部署到计算节点时,应用副本的实际资源需求;
筛选模块,用于从各计算节点中筛选出满足应用副本的实际资源需求的计算节点;
部署模块,用于将应用副本部署到筛选出的计算节点,并在计算节点为应用副本分配实
际资源需求所需的计算资源量。
为解决上述技术问题,本申请还提供了一种容器集群算力调度设备,包括:
存储器,用于存储计算机程序;
处理器,用于执行计算机程序时实现如上任一项容器集群算力调度方法的步骤。
为解决上述技术问题,本申请实施例还提供了一种计算机非易失性可读存储介质,计算机非易失性可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上任一项容器集群算力调度方法的步骤。
为解决上述技术问题,本申请实施例还提供了一种容器集群,包括:
集群控制中心与若干计算节点;
集群控制中心,用于获取各计算节点的目标计算资源的算力检测值;
根据应用副本的原始资源请求与计算节点的目标计算资源的算力检测值,确定将应用副本部署到计算节点时,应用副本的实际资源需求;从各计算节点中筛选出满足应用副本的实际资源需求的计算节点;将应用副本部署到筛选出的计算节点,并在计算节点为应用副本分配实际资源需求所需的计算资源量。
本申请实施例所提供的容器集群算力调度方法,包括:获取各计算节点的目标计算资源的算力检测值;根据应用副本的原始资源请求与计算节点的目标计算资源的算力检测值,确定将应用副本部署到计算节点时,应用副本的实际资源需求;从各计算节点中筛选出满足应用副本的实际资源需求的计算节点;将应用副本部署到筛选出的计算节点,并在计算节点为应用副本分配实际资源需求所需的计算资源量。
可见,本申请实施例所提供的容器集群算力调度方法,根据各计算节点的真实的算力以及应用副本的原始资源请求进行差异化的算力调度,而不是为应用副本简单的分配相同的CPU核数、内存数、GPU显存数等计算资源,这样可以使各应用副本最大限度的有一致的响应速度和体验,进而能够提升容器集群的一致性体验。
本申请实施例所提供的容器集群算力调度装置、设备、计算机非易失性可读存储介质以及容器集群均具有上述技术效果。
为了更清楚地说明本申请实施例中的技术方案,下面将对现有技术和实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的
附图。
图1为本申请实施例所提供的一种容器集群算力调度方法的流程示意图;
图2为本申请实施例所提供的一种容器集群算力调度示意图;
图3为本申请实施例所提供的一种容器集群算力调度装置的示意图;
图4为本申请实施例所提供的一种容器集群算力调度设备的示意图;
图5为本申请实施例所提供的一种计算机非易失性可读存储介质的示意图。
本申请的核心是提供一种容器集群算力调度方法,能够平衡应用副本间的差异,使每个应用副本最大限度的有一致性的响应速度,进而提升容器集群整体的一致性体验。本申请的另一个核心是提供一种容器集群算力调度装置、设备、计算机非易失性可读存储介质以及容器集群,均具有上述技术效果。
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
请参考图1,图1为本申请实施例所提供的一种容器集群算力调度方法的流程示意图,参考图1所示,该方法包括:
S101:获取各计算节点的目标计算资源的算力检测值;
计算节点的计算资源包括CPU、内存、GPU(Graphics Processing Unit,图形处理器)、硬盘等。
每个计算节点处可以部署算力检测装置,由算力检测装置执行算力检测函数,对计算节点的CPU、内存、GPU等计算资源的算力进行检测,得到CPU、内存、GPU等计算资源的算力检测值,并将各项计算资源的算力检测值上报给集群控制中心。
集群控制中心接收各计算节点上报的计算资源的算力检测值并存储。其中,各计算节点可定时上报各计算资源的算力检测值,集群控制中心接收各计算节点定时上报的各项计算资源的算力检测值。
区别于资源的使用率,算力是指计算资源真正的计算能力。计算资源的算力可以测算得到。例如,可以测算得到一个核的真实的计算能力。对应到平台产品里,算力可以根据主机
资源的架构和配置,加上相应的算法测算得到。
其中,集群控制中心接收各计算节点上报的各项计算资源的算力检测值后,可形成如表1所示的计算资源算力网络。
表1
表1中CPU分值即为CPU的算力检测值,内存分值即为内存的算力检测值,磁盘读写分值即为磁盘的算力检测值,xx分值指代其他计算资源的算力检测值,除了CPU、内存、磁盘外,计算资源还包括GPU等,在此不再一一列举。
用于检测CPU、内存等计算资源的算力检测值的算力检测装置可以采用现有的能够实现算力检测功能的装置。对于算力检测装置检测得到算力检测值的具体过程,本申请不再赘述,参考现有的能够实现算力检测功能的装置的相关介绍即可。例如,通过CPU跑分工具检测CPU的性能,得到CPU的算力检测值。
集群控制中心中应用编排调度装置进行应用副本调度时,获取应用副本的原始资源请求,以及目标计算资源的算力检测值。目标计算资源是指应用副本的原始资源请求中所请求的计算资源。例如,应用副本的原始资源请求为CPU4核,内存30M,则目标计算资源为CPU与内存。
S102:根据应用副本的原始资源请求与计算节点的目标计算资源的算力检测值,确定将应用副本部署到计算节点时,应用副本的实际资源需求;
为了平衡各应用副本的响应速度,本实施例在获取应用副本的原始资源请求以及获取各计算节点的目标计算资源的算力检测值的基础上,根据应用副本的原始资源请求与计算节点的目标计算资源的算力检测值,确定将应用副本部署到某个计算节点时,应用副本的实际资源需求。
同一个应用副本部署在不同算力的计算节点时,该应用副本的实际资源需求不同。本实施例根据算力的差异,去调整真实的资源诉求,以此达到应用体验更加一致、平衡的效果。
在本申请的一些实施例中,根据应用副本的原始资源请求与计算节点的目标计算资源的算力检测值,确定将应用副本部署到计算节点时,应用副本的实际资源需求包括:
比较目标计算资源的算力检测值与基准算力;
根据比较结果,确定将应用副本部署到计算节点时,应用副本的实际资源需求。
应用副本的原始资源请求可以看作是以基准算力为标准的资源请求。应用副本的实际资源需求可以看作是以实际的算力检测值为标准的资源请求。
获取基准算力,并通过比较计算节点的目标计算资源的算力检测值与基准算力,可以判断出将应用副本部署到该计算节点时,对应用副本的响应速度的影响程度。
例如,应用副本请求4核CPU,可认为应用副本请求的是算力为基准算力的4核CPU。通过比较,如果CPU的实际的算力与基准算力相差较大时,此时可认为将应用副本部署到该计算节点时,对应用副本的响应速度的影响程度较大。如果CPU的实际的算力与基准算力相差较小时,此时可认为将应用副本部署到该计算节点时,对应用副本的响应速度的影响程度较小。
根据比较结果,确定相应的实际资源需求。
例如,如果CPU的实际的算力与基准算力相差较大时,为了使应用副本的响应速度一致,此时应用副本的实际资源需求应该大于原始资源请求,应用副本的实际资源需求可以为6核CPU。
其中,根据比较结果,确定将应用副本部署到计算节点时,应用副本的实际资源需求可以包括:
若计算资源的算力检测值与计算资源的基准算力的差值小于预设阈值,则保持应用副本的实际资源需求与应用副本的原始资源请求一致;
若计算资源的算力检测值与计算资源的基准算力的差值不小于预设阈值,则根据预设策略,计算得到将应用副本部署到计算节点时,应用副本的实际资源需求。
预设阈值的大小可以进行差异化设置。如果计算资源的算力检测值与计算资源的基准算力的差值小于预设阈值,则保持应用副本的实际资源需求与应用副本的原始资源请求一致。如果计算资源的算力检测值与计算资源的基准算力的差值不小于预设阈值,则根据预设策略,计算得到将应用副本部署到计算节点时,应用副本的实际资源需求。预设策略的原则可以是计算节点的计算资源的算力检测值与计算资源的基准算力的差值越大,应用副本部署到此计算节点的实际资源需求越大。在此原则下,对于预设策略即对于具体的计算方式,本领域技术人员可以进行差异性设置。
在本申请的一些实施例中,根据预设策略,计算得到将应用副本部署到计算节点时应用副本的实际资源需求包括:
根据x需求=(m-n)/m*x+x,计算得到将应用副本部署到计算节点时,应用副本的实际资源需求;
x需求表示实际资源需求,m表示计算资源的基准算力,n表示计算资源的算力检测值,x表示原始资源请求的计算资源量。
例如,应用副本的原始资源请求为CPU2核,某个计算节点的CPU的算力检测值为50,CPU的基准算力为100,则x需求=(100-50)/100*2+2=3。即应用副本部署到此计算节点的实际资源需求是CPU3核。
需要说明的是,若利用x需求=(m-n)/m*x+x计算得到实际资源需求是小数时,可以采取进1取整的方式。例如,计算得到的x需求=3.3,此时实际资源需求为4。
S103:从各计算节点中筛选出满足应用副本的实际资源需求的计算节点;
S104:将应用副本部署到筛选出的计算节点,并在计算节点为应用副本分配实际资源需求所需的计算资源量。
针对容器集群中的每一个计算节点,都可以计算得到应用副本调度此计算节点时,应用副本的实际资源需求。如果计算节点能够满足应用副本部署到此计算节点时的实际资源需求,那么可以将计算节点部署到该计算节点。满足应用副本的实际资源需求是指同时满足实际资源需求中的各项资源需求。
例如,实际资源需求为4核CPU,30M内存,那么满足实际资源需求是指同时满足4核CPU与30M内存。
在本申请的一些实施例中,将应用副本部署到筛选出的计算节点包括:
当筛选出的计算节点为多个时,从筛选出的各计算节点中选取最优计算节点;
将应用副本部署到最优计算节点。
如果筛选出的计算节点为1个,即只有一个计算节点能够满足应用副本部署到此计算节点时的实际资源需求。此时将应用副本部署到该唯一筛选出的计算节点。如果筛选出的计算节点为多个,则首先从中选取最优计算节点,然后将应用副本部署到此最优计算节点。
在本申请的一些实施例中,从筛选出的各计算节点中选取最优计算节点包括:
从筛选出的计算节点中选取剩余内存最大的计算节点作为最优计算节点。
本申请实施例中最优计算节点的标准是剩余内存最大。对于能够满足应用副本部署到此计算节点时的实际资源需求的各个计算节点,剩余内存最大的计算节点为最优计算节点。
如果最优计算节点为1个,此时将应用副本部署到此唯一的最优计算节点。如果最优计算节点为多个,此时可以随机从中选取一个最优计算节点,将应用副本部署到选取的此最优
计算节点。如果最优计算节点为多个,此时还可以结合其他因素从中选取一个最优计算节点,并将应用副本部署到选取的此最优计算节点。例如,结合最优计算节点运行的服务的个数,从各最优计算节点中选择运行的服务最少的最优计算节点。
在本申请的一些实施例中,从筛选出的各计算节点中选取最优计算节点包括:
从筛选出的计算节点中选取运行的服务最少的计算节点作为最优计算节点。
本申请实施例中最优计算节点的标准是运行的服务最少。对于能够满足应用副本部署到此计算节点时的实际资源需求的各个计算节点,运行的服务最少的计算节点为最优计算节点。
如果最优计算节点为1个,此时将应用副本部署到此唯一的最优计算节点。如果最优计算节点为多个,此时可以随机从中选取一个最优计算节点,将应用副本部署到选取的此最优计算节点。如果最优计算节点为多个,此时还可以结合其他因素从中选取一个最优计算节点,并将应用副本部署到选取的此最优计算节点。例如,结合最优计算节点剩余的内存,从各最优计算节点中选择剩余的内存最多的最优计算节点。
进一步,在本申请的一些实施例中,还包括:
若各计算节点均不能满足实际资源需求中的所有资源需求,则从各计算节点中挑选计算资源量最接近资源需求的计算节点,并将应用副本部署到挑选出的计算节点。
例如,应用副本部署到某两个计算节点时的实际资源需求均为4核CPU,两个计算节点均不存在空闲的4核CPU,则此时两个计算节点不能够满足应用副本的实际资源需求。如果其中一个计算节点存在空闲的3核CPU,另一个计算节点存在空闲的2核CPU,则此时选择存在空闲的3核CPU的计算节点,并将应用副本部署到存在空闲的3核CPU的计算节点。
进一步,在本申请的一些实施例中,还包括:
若存在满足实际资源需求中部分资源需求的计算节点,则根据满足的资源需求的数量,从满足实际资源需求中部分资源需求的计算节点中挑选计算节点,并将应用副本部署到所挑选的计算节点。
例如,应用副本部署到某三个计算节点时的实际资源需求均为4核CPU,30M内存以及100MGPU显存,一个计算节点只有空闲的4核CPU,一个计算节点只有30M内存,一个计算节点有30M内存与100MGPU显存。因此,此时选择有30M内存与100MGPU显存的计算节点,并将应用副本部署到有30M内存与100MGPU显存的计算节点。
进一步,在本申请的一些实施例中,还包括:
若存在满足实际资源需求中部分资源需求的计算节点,则根据满足的资源需求的优先
级,从满足实际资源需求中部分资源需求的计算节点中挑选计算节点,并将应用副本部署到所挑选的计算节点。
例如,应用副本部署到某两个计算节点时的实际资源需求均为4核CPU,30M内存,一个计算节点只有空闲的4核CPU,一个计算节点只有30M内存,CPU的优先级高于内存,则此时选择有空闲的4核CPU的计算节点,并将应用副本部署到有空闲的4核CPU的计算节点。
不同计算资源的优先级预先可以自定义。应用编排调度装置获取各计算资源的优先级,并据此执行上述操作。
进一步,在本申请的一些实施例中,还包括:
记录满足当前的应用副本的实际资源需求的计算节点,形成备选计算节点目录,以当部署与当前的应用副本的原始资源请求相同的应用副本时,从备选计算节点目录中选取计算节点。
例如,满足当前的应用副本的实际资源需求的计算节点有3个,记录这3个计算节点,形成备选计算节点目录。后续当部署下一个应用副本时,如果下一个应用副本的原始资源请求与当前的该应用副本的原始资源请求相同,此时可以直接从备选计算节点目录中选择一个未部署应用副本的计算节点,并将下一个应用副本部署到此计算节点。针对下一个应用副本此时无需执行步骤S101~S104,可以更快的完成应用副本的部署。
综上,本申请实施例所提供的容器集群算力调度方法,根据各计算节点的真实的算力以及应用副本的原始资源请求进行差异化的算力调度,而不是为应用副本简单的分配相同的CPU核数、内存数、GPU显存数等计算资源,这样可以使各应用副本最大限度的有一致的响应速度和体验,进而能够提升容器集群的一致性体验。
本申请实施例还提供了一种容器集群算力调度装置,下文描述的该装置可以与上文描述的方法相互对应参照。请参考图3,图3为本申请实施例所提供的一种容器集群算力调度装置的示意图,结合图3所示,该装置包括:
获取模块10,用于获取各计算节点的目标计算资源的算力检测值;
确定模块20,用于根据应用副本的原始资源请求与计算节点的目标计算资源的算力检测值,确定将应用副本部署到计算节点时,应用副本的实际资源需求;
筛选模块30,用于从各计算节点中筛选出满足应用副本的实际资源需求的计算节点;
部署模块40,用于将应用副本部署到筛选出的计算节点,并在计算节点为应用副本分配实际资源需求所需的计算资源量。
在上述实施例的基础上,在本申请的一些实施例中,确定模块20包括:
比较单元,用于比较计算资源的算力检测值与基准算力;
确定单元,用于根据比较结果,确定将应用副本部署到计算节点时,应用副本的实际资源需求。
在上述实施例的基础上,在本申请的一些实施例中,确定单元包括:
保持单元,用于若计算资源的算力检测值与计算资源的基准算力的差值小于预设阈值,则保持应用副本的实际资源需求与应用副本的原始资源请求一致。
在上述实施例的基础上,在本申请的一些实施例中,确定单元包括:
计算单元,用于若计算资源的算力检测值与计算资源的基准算力的差值不小于预设阈值,则根据预设策略,计算得到将应用副本部署到计算节点时,应用副本的实际资源需求。
在上述实施例的基础上,在本申请的一些实施例中,计算单元具体用于:
根据x需求=(m-n)/m*x+x,计算得到将应用副本部署到计算节点时,应用副本的实际资源需求;
x需求表示实际资源需求,m表示计算资源的基准算力,n表示计算资源的算力检测值,x表示原始资源请求的计算资源量。
在上述实施例的基础上,在本申请的一些实施例中,部署模块40包括:
筛选单元,用于当满足应用副本的实际资源需求的计算节点为多个时,从筛选出的各计算节点中选取最优计算节点;
部署单元,用于将应用副本部署到最优计算节点。
在上述实施例的基础上,在本申请的一些实施例中,筛选单元具体用于:
从筛选出的计算节点中选取剩余内存最大的计算节点作为最优计算节点。
在上述实施例的基础上,在本申请的一些实施例中,筛选单元具体用于:
从筛选出的计算节点中选取运行的服务最少的计算节点作为最优计算节点。
在上述实施例的基础上,在本申请的一些实施例中,还包括:
第一挑选模块,用于若各计算节点均不能满足实际资源需求中的所有资源需求,则从各计算节点中挑选计算资源量最接近资源需求的计算节点,并将应用副本部署到挑选出的计算节点。
在上述实施例的基础上,在本申请的一些实施例中,还包括:
第二挑选模块,用于若存在满足实际资源需求中部分资源需求的计算节点,则根据满足的资源需求的数量,从满足实际资源需求中部分资源需求的计算节点中挑选计算节点,并将
应用副本部署到所挑选的计算节点。
在上述实施例的基础上,在本申请的一些实施例中,还包括:
第三挑选模块,用于若存在满足实际资源需求中部分资源需求的计算节点,则根据满足的资源需求的优先级,从满足实际资源需求中部分资源需求的计算节点中挑选计算节点,并将应用副本部署到所挑选的计算节点。
在上述实施例的基础上,在本申请的一些实施例中,还包括:
优先级获取模块,用于获取各资源需求的优先级。
在上述实施例的基础上,在本申请的一些实施例中,还包括:
接收模块,用于接收各计算节点上报的各项计算资源的算力检测值。
在上述实施例的基础上,在本申请的一些实施例中,接收模块具体用于:
接收各计算节点定时上报的各项计算资源的算力检测值。
在上述实施例的基础上,在本申请的一些实施例中,还包括:
基准算力获取模块,用于获取各计算资源的基准算力。
在上述实施例的基础上,在本申请的一些实施例中,还包括:
记录模块,用于记录满足当前的应用副本的实际资源需求的计算节点,形成备选计算节点目录,以当部署与当前的应用副本的原始资源请求相同的应用副本时,从备选计算节点目录中选取计算节点。
本申请实施例还提供了一种容器集群算力调度设备,参考图4所示,该设备包括存储器1和处理器2。
存储器1,用于存储计算机程序;
处理器2,用于执行计算机程序实现如下的步骤:
获取各计算节点的目标计算资源的算力检测值;根据应用副本的原始资源请求与计算节点的目标计算资源的算力检测值,确定将应用副本部署到计算节点时,应用副本的实际资源需求;从各计算节点中筛选出满足应用副本的实际资源需求的计算节点;将应用副本部署到筛选出的计算节点,并在计算节点为应用副本分配实际资源需求所需的计算资源量。
对于本申请实施例所提供的设备的介绍请参照上述方法实施例,本申请实施例在此不做赘述。
本申请实施例还提供了一种计算机非易失性可读存储介质,参考图5所示,该计算机非
易失性可读存储介质5上存储有计算机程序51,计算机程序51被处理器执行时可实现如下的步骤:
获取各计算节点的目标计算资源的算力检测值;根据应用副本的原始资源请求与计算节点的目标计算资源的算力检测值,确定将应用副本部署到计算节点时,应用副本的实际资源需求;从各计算节点中筛选出满足应用副本的实际资源需求的计算节点;将应用副本部署到筛选出的计算节点,并在计算节点为应用副本分配实际资源需求所需的计算资源量。
该计算机非易失性可读存储介质可以包括:U盘、移动硬盘、只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
对于本申请实施例所提供的计算机非易失性可读存储介质的介绍请参照上述方法实施例,本申请实施例在此不做赘述。
本申请实施例还提供了一种容器集群,包括集群控制中心与若干计算节点;
集群控制中心,用于获取各计算节点的目标计算资源的算力检测值;
根据应用副本的原始资源请求与计算节点的目标计算资源的算力检测值,确定将应用副本部署到计算节点时,应用副本的实际资源需求;从各计算节点中筛选出满足应用副本的实际资源需求的计算节点;将应用副本部署到筛选出的计算节点,并在计算节点为应用副本分配实际资源需求所需的计算资源量。
对于本申请实施例所提供的容器集群的介绍请参照上述方法实施例,本申请实施例在此不做赘述。
说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置、设备以及计算机非易失性可读存储介质而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申
请的范围。
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。
以上对本申请所提供的技术方案进行了详细介绍。本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围。
Claims (20)
- 一种容器集群算力调度方法,其特征在于,包括:获取各计算节点的目标计算资源的算力检测值;根据应用副本的原始资源请求与所述计算节点的目标计算资源的算力检测值,确定将所述应用副本部署到所述计算节点时,所述应用副本的实际资源需求;从各所述计算节点中筛选出满足所述应用副本的所述实际资源需求的计算节点;将所述应用副本部署到筛选出的所述计算节点,并在所述计算节点为所述应用副本分配所述实际资源需求所需的计算资源量。
- 根据权利要求1所述的容器集群算力调度方法,其特征在于,所述根据应用副本的原始资源请求与所述计算节点的目标计算资源的算力检测值,确定将所述应用副本部署到所述计算节点时,所述应用副本的实际资源需求包括:比较所述计算资源的算力检测值与基准算力;根据比较结果,确定将所述应用副本部署到所述计算节点时,所述应用副本的实际资源需求。
- 根据权利要求2所述的容器集群算力调度方法,其特征在于,所述根据比较结果,确定将所述应用副本部署到所述计算节点时,所述应用副本的实际资源需求包括:若所述计算资源的算力检测值与所述计算资源的基准算力的差值小于预设阈值,则保持所述应用副本的实际资源需求与所述应用副本的原始资源请求一致。
- 根据权利要求2所述的容器集群算力调度方法,其特征在于,所述根据比较结果,确定将所述应用副本部署到所述计算节点时,所述应用副本的实际资源需求包括:若所述计算资源的算力检测值与所述计算资源的基准算力的差值不小于预设阈值,则根据预设策略,计算得到将所述应用副本部署到所述计算节点时,所述应用副本的实际资源需求。
- 根据权利要求4所述的容器集群算力调度方法,其特征在于,所述根据预设策略,计算得到将所述应用副本部署到所述计算节点时所述应用副本的实际资源需求包括:根据x需求=(m-n)/m*x+x,计算得到将所述应用副本部署到所述计算节点时,所述应用副本的实际资源需求;x需求表示所述实际资源需求,m表示所述计算资源的基准算力,n表示所述计算资源的算力检测值,x表示所述原始资源请求的计算资源量。
- 根据权利要求1所述的容器集群算力调度方法,其特征在于,所述将所述应用副 本部署到筛选出的所述计算节点包括:当满足所述应用副本的所述实际资源需求的计算节点为多个时,从筛选出的各所述计算节点中选取最优计算节点;将所述应用副本部署到所述最优计算节点。
- 根据权利要求6所述的容器集群算力调度方法,其特征在于,所述从筛选出的各所述计算节点中选取最优计算节点包括:从筛选出的所述计算节点中选取剩余内存最大的所述计算节点作为所述最优计算节点。
- 根据权利要求6所述的容器集群算力调度方法,其特征在于,所述从筛选出的各所述计算节点中选取最优计算节点包括:从筛选出的所述计算节点中选取运行的服务最少的所述计算节点作为所述最优计算节点。
- 根据权利要求1所述的容器集群算力调度方法,其特征在于,还包括:若各所述计算节点均不能满足所述实际资源需求中的所有资源需求,则从各所述计算节点中挑选计算资源量最接近所述资源需求的计算节点,并将所述应用副本部署到挑选出的所述计算节点。
- 根据权利要求1所述的容器集群算力调度方法,其特征在于,还包括:若存在满足所述实际资源需求中部分资源需求的计算节点,则根据满足的所述资源需求的数量,从满足所述实际资源需求中部分资源需求的计算节点中挑选计算节点,并将所述应用副本部署到所挑选的所述计算节点。
- 根据权利要求1所述的容器集群算力调度方法,其特征在于,还包括:若存在满足所述实际资源需求中部分资源需求的计算节点,则根据满足的所述资源需求的优先级,从满足所述实际资源需求中部分资源需求的计算节点中挑选计算节点,并将所述应用副本部署到所挑选的所述计算节点。
- 根据权利要求11所述的容器集群算力调度方法,其特征在于,还包括:获取各所述资源需求的优先级。
- 根据权利要求1所述的容器集群算力调度方法,其特征在于,还包括:接收各所述计算节点上报的各项计算资源的算力检测值。
- 根据权利要求13所述的容器集群算力调度方法,其特征在于,所述接收各所述计算节点上报的各项计算资源的算力检测值包括:接收各所述计算节点定时上报的各项所述计算资源的算力检测值。
- 根据权利要求2所述的容器集群算力调度方法,其特征在于,还包括:获取各所述计算资源的所述基准算力。
- 根据权利要求1至15任一项所述的容器集群算力调度方法,其特征在于,还包括:记录满足当前的所述应用副本的所述实际资源需求的计算节点,形成备选计算节点目录,以当部署与当前的所述应用副本的所述原始资源请求相同的应用副本时,从所述备选计算节点目录中选取计算节点。
- 一种容器集群算力调度装置,其特征在于,包括:获取模块,用于获取各计算节点的目标计算资源的算力检测值;确定模块,用于根据应用副本的原始资源请求与所述计算节点的目标计算资源的算力检测值,确定将所述应用副本部署到所述计算节点时,所述应用副本的实际资源需求;筛选模块,用于从各所述计算节点中筛选出满足所述应用副本的所述实际资源需求的计算节点;部署模块,用于将所述应用副本部署到筛选出的所述计算节点,并在所述计算节点为所述应用副本分配所述实际资源需求所需的计算资源量。
- 一种容器集群算力调度设备,其特征在于,包括:存储器,用于存储计算机程序;处理器,用于执行所述计算机程序时实现如权利要求1至16任一项所述的容器集群算力调度方法的步骤。
- 一种计算机非易失性可读存储介质,其特征在于,所述计算机非易失性可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至16任一项所述的容器集群算力调度方法的步骤。
- 一种容器集群,其特征在于,包括:集群控制中心与若干计算节点;所述集群控制中心,用于获取各计算节点的目标计算资源的算力检测值;根据应用副本的原始资源请求与所述计算节点的目标计算资源的算力检测值,确定将所述应用副本部署到所述计算节点时,所述应用副本的实际资源需求;从各所述计算节点中筛选出满足所述应用副本的所述实际资源需求的计算节点;将所述应用副本部署到筛选出的所述计算节点,并在所述计算节点为所述应用副本分配所述实际资源需求所需的计算资源量。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211554106.7A CN115562843B (zh) | 2022-12-06 | 2022-12-06 | 一种容器集群算力调度方法及相关装置 |
CN202211554106.7 | 2022-12-06 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024119763A1 true WO2024119763A1 (zh) | 2024-06-13 |
Family
ID=84770305
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/101216 WO2024119763A1 (zh) | 2022-12-06 | 2023-06-20 | 一种容器集群算力调度方法及相关装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115562843B (zh) |
WO (1) | WO2024119763A1 (zh) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115562843B (zh) * | 2022-12-06 | 2023-03-28 | 苏州浪潮智能科技有限公司 | 一种容器集群算力调度方法及相关装置 |
CN116541134B (zh) * | 2023-07-05 | 2023-09-19 | 苏州浪潮智能科技有限公司 | 多架构集群中容器的部署方法及装置 |
CN116991558B (zh) * | 2023-09-22 | 2024-02-02 | 苏州元脑智能科技有限公司 | 算力资源的调度方法及多架构集群、装置、存储介质 |
CN118034941B (zh) * | 2024-04-12 | 2024-06-25 | 深圳市捷易科技有限公司 | 集群算力优化方法、装置、设备及存储介质 |
CN118331751B (zh) * | 2024-06-14 | 2024-08-20 | 济南浪潮数据技术有限公司 | 计算资源分配方法、计算机程序、设备及介质 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200267210A1 (en) * | 2019-02-15 | 2020-08-20 | International Business Machines Corporation | Tool for managing and allocating resources in a clustered computing environment |
CN113296905A (zh) * | 2021-03-30 | 2021-08-24 | 阿里巴巴新加坡控股有限公司 | 调度方法、装置、电子设备、存储介质及软件产品 |
WO2021190482A1 (zh) * | 2020-03-27 | 2021-09-30 | 中国移动通信有限公司研究院 | 算力处理的网络系统及算力处理方法 |
CN113645300A (zh) * | 2021-08-10 | 2021-11-12 | 上海道客网络科技有限公司 | 一种基于Kubernetes集群的节点智能调度方法和系统 |
CN115328663A (zh) * | 2022-10-10 | 2022-11-11 | 亚信科技(中国)有限公司 | 基于PaaS平台进行资源调度的方法、装置、设备和存储介质 |
CN115562843A (zh) * | 2022-12-06 | 2023-01-03 | 苏州浪潮智能科技有限公司 | 一种容器集群算力调度方法及相关装置 |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115391023A (zh) * | 2021-05-25 | 2022-11-25 | 中移雄安信息通信科技有限公司 | 多任务容器集群的计算资源优化方法及装置 |
-
2022
- 2022-12-06 CN CN202211554106.7A patent/CN115562843B/zh active Active
-
2023
- 2023-06-20 WO PCT/CN2023/101216 patent/WO2024119763A1/zh unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200267210A1 (en) * | 2019-02-15 | 2020-08-20 | International Business Machines Corporation | Tool for managing and allocating resources in a clustered computing environment |
WO2021190482A1 (zh) * | 2020-03-27 | 2021-09-30 | 中国移动通信有限公司研究院 | 算力处理的网络系统及算力处理方法 |
CN113296905A (zh) * | 2021-03-30 | 2021-08-24 | 阿里巴巴新加坡控股有限公司 | 调度方法、装置、电子设备、存储介质及软件产品 |
CN113645300A (zh) * | 2021-08-10 | 2021-11-12 | 上海道客网络科技有限公司 | 一种基于Kubernetes集群的节点智能调度方法和系统 |
CN115328663A (zh) * | 2022-10-10 | 2022-11-11 | 亚信科技(中国)有限公司 | 基于PaaS平台进行资源调度的方法、装置、设备和存储介质 |
CN115562843A (zh) * | 2022-12-06 | 2023-01-03 | 苏州浪潮智能科技有限公司 | 一种容器集群算力调度方法及相关装置 |
Also Published As
Publication number | Publication date |
---|---|
CN115562843A (zh) | 2023-01-03 |
CN115562843B (zh) | 2023-03-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2024119763A1 (zh) | 一种容器集群算力调度方法及相关装置 | |
US9965324B2 (en) | Process grouping for improved cache and memory affinity | |
JP6240309B2 (ja) | 仮想ディスクの入出力ポートをスケジューリングするための方法およびデバイス | |
US8424007B1 (en) | Prioritizing tasks from virtual machines | |
WO2018014566A1 (zh) | 一种负载均衡的方法、装置、计算机可读存储介质及系统 | |
EP2437168A2 (en) | Method and device for balancing load of multiprocessor system | |
US8479205B2 (en) | Schedule control program and schedule control method | |
TW201629759A (zh) | 一種cpu資源分配的方法、裝置及電子設備 | |
CN110928661B (zh) | 一种线程迁移方法、装置、设备及可读存储介质 | |
CN112346829A (zh) | 一种用于任务调度的方法及设备 | |
CN109145051A (zh) | 分布式数据库的数据汇总方法及装置和电子设备 | |
WO2014198001A1 (en) | System and method for determining capacity in computer environments using demand profiles | |
CN106775948B (zh) | 一种基于优先级的云任务调度方法及装置 | |
US20190121660A1 (en) | Virtual machine management device and virtual machine management method | |
JP6519111B2 (ja) | データ処理制御方法、データ処理制御プログラムおよびデータ処理制御装置 | |
WO2024120205A1 (zh) | 一种应用性能优化方法、装置、电子设备及存储介质 | |
JP5556498B2 (ja) | 管理装置,ファイルサーバシステム,処理方法及び管理プログラム | |
CN115904671B (zh) | 一种边缘计算环境下的任务调度方法、装置、设备及介质 | |
JP5515889B2 (ja) | 仮想マシンシステム、自動マイグレーション方法および自動マイグレーションプログラム | |
KR101702218B1 (ko) | 역경매 방식 자원할당 장치를 포함하는 하이브리드 클라우드 서버 및 그 자원 할당 방법 및 시스템 | |
CN109582461B (zh) | 一种针对Linux容器的资源部署方法及系统 | |
CN106502786A (zh) | 一种中断分配方法及装置 | |
JP2019046163A (ja) | 情報処理装置、仮想マシン監視プログラム、および情報処理システム | |
JP5641064B2 (ja) | 実行制御プログラム、実行制御装置および実行制御方法 | |
JP6686599B2 (ja) | 画像処理装置、負荷分散方法および負荷分散プログラム |
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: 23899350 Country of ref document: EP Kind code of ref document: A1 |