Scheduling method and device of NUMA architecture
By receiving container resource requests in the NUMA architecture, obtaining NUMA resource information of the node cluster, and scheduling the container to the NUMA node that meets the resource request, the problem of low container scheduling efficiency in the NUMA architecture in the prior art is solved, and better scheduling effect is achieved.
Patent Information
- Application Number
- CN202411813918.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-28
AI Technical Summary
In the NUMA architecture, it is difficult for the existing technology to effectively schedule containers, resulting in more memory cross-access and low cache hit rate, which affects service performance.
By receiving the resource request from the user to create a container, obtain the NUMA resource information of the node cluster, find out whether there are nodes with free resources that meet the resource request, and schedule the container to the NUMA node that meets the resource request, and update the NUMA resource information.
It realizes that NUMA resource idle situation is considered from a global perspective, allowing the container to perceive the use of NUMA resource during the scheduling stage, and the decision container can be scheduled to nodes with sufficient idle resources in the entire machine to achieve better scheduling effect.
Smart Images

Figure CN119728696A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a scheduling method and device for a NUMA architecture. Background Art
[0002] In the NUMA (Non Uniform Memory Access) architecture, the CPU (Central Processing Unit) is divided into multiple nodes, each with its own independent memory space. The nodes communicate with each other through high-speed interconnections. The speed at which the CPU accesses the memory of different types of nodes is different. The speed of accessing the local node is the fastest, and the speed of accessing the remote node is the slowest. That is, the access speed is related to the distance between the nodes. The farther the distance, the slower the access speed, that is, non-uniform.
[0003] In the NUMA architecture, if there are many cross-accesses to memory and the cache hit rate is low, in order to control the running location of the process or avoid the NUMA effect and other scenarios, it is necessary to bind the process to the same NUMA CPU to avoid service performance degradation. In the prior art, the node agent (such as kubelet) generally identifies the NUMA node information of the host machine and allocates the local container to the idle NUMA node. Summary of the invention
[0004] The embodiments of the present disclosure provide a scheduling method and device for a NUMA architecture.
[0005] In a first aspect, an embodiment of the present disclosure provides a scheduling method for a NUMA architecture, the method comprising: receiving a resource request initiated based on a user creating a container; obtaining NUMA resource information of a node cluster, wherein the nodes in the node cluster include at least one NUMA; searching the NUMA resource information to determine whether there is a first node in the node cluster with NUMA idle resources that satisfies the resource request; in response to determining that there is a first node, installing the container to the NUMA in the first node that satisfies the resource request, and updating the NUMA resource information of the NUMA of the installed container.
[0006] In a second aspect, an embodiment of the present disclosure provides a scheduling method for a NUMA architecture, comprising: a receiving module, configured to receive a resource request initiated based on a user creating a container; an acquiring module, configured to acquire NUMA resource information of a node cluster, wherein the nodes in the node cluster include at least one NUMA; a first searching module, configured to search for NUMA resource information and determine whether there is a first node in the node cluster with NUMA idle resources satisfying the resource request; a first installation module, configured to, in response to determining that there is a first node, install the container to the NUMA in the first node that satisfies the resource request, and update the NUMA resource information of the NUMA of the installed container.
[0007] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0008] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.
[0009] In a fifth aspect, an embodiment of the present disclosure proposes a computer program product, including a computer program, which implements the method described in any implementation manner in the first aspect when executed by a processor.
[0010] The method provided by the above-mentioned embodiment of the present disclosure considers the idle situation of NUMA resources from a global perspective, allows the container to perceive the resource usage of NUMA during the scheduling stage, and decides during scheduling that the container can be scheduled to a node with sufficient idle resources of the entire machine, and at the same time decides the idle NUMA allocated to the container, so as to achieve better scheduling effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0012] Figure 1 is a flowchart of an embodiment of a scheduling method for a NUMA architecture according to the present disclosure;
[0013] Figure 2 is a flowchart of another embodiment of a scheduling method for a NUMA architecture according to the present disclosure;
[0014] Figure 3 It is a schematic diagram of resource reporting;
[0015] Figure 4This is a schematic diagram of the interaction between the components of container scheduling;
[0016] Figure 5 is the scheduler flow chart;
[0017] Figure 6 is a structural schematic diagram of an embodiment of a scheduling device for a NUMA architecture according to the present disclosure;
[0018] Figure 7 It is a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION
[0019] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0020] It should be noted that in the technical solution of the present invention, the collection / collection, update, analysis, use, transmission, storage and other aspects of user personal information involved are in compliance with the provisions of relevant laws and regulations, are used for legal and reasonable purposes, are not shared, leaked or sold outside of these legal uses, and are subject to supervision and management by national regulatory authorities. Necessary measures should be taken for user personal information to selectively block the use or access to personal information data to prevent illegal access to such personal information data, ensure that persons who have access to personal information data comply with the provisions of relevant laws and regulations, and ensure the security of user personal information. In addition, once these user personal information data are no longer needed, the risks should be minimized by limiting or even prohibiting data collection and / or deleting data.
[0021] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0022] Figure 1 A process 100 of an embodiment of a scheduling method for a NUMA architecture according to the present disclosure is shown. The scheduling method for the NUMA architecture includes the following steps:
[0023] Step 101: receiving a resource request initiated by a user to create a container.
[0024] In this embodiment, a user can create a container. After obtaining the container, the user can apply for resources for the container by initiating a resource request. The resources applied for in the resource request are sufficient to install the container.
[0025] Step 102: Obtain NUMA resource information of the node cluster.
[0026] In this embodiment, after receiving the resource request, NUMA resource information of the node cluster may be obtained.
[0027] In the NUMA architecture, the CPU can be divided into multiple nodes, which can form a node cluster. Each node can include at least one NUMA.
[0028] The data model can be used to describe the NUMA resource information of the node. Usually, the data model of NUMA resource information can be defined by using K8s's CRD (Custom Resource Definitions). Among them, Kubernetes, referred to as K8s, is an open source for managing containerized applications on multiple hosts in the cloud platform. The goal of Kubernetes is to make the deployment of containerized applications simple and efficient. Kubernetes provides a mechanism for application deployment, planning, updating, and maintenance. CRD is a powerful Kubernetes API (Application Programming Interface) extension mechanism. CRD allows users to create and manage custom resources that are not part of the Kubernetes standard API. CRD makes Kubernetes not only limited to built-in resources, but also supports user-defined resource types. The core idea of CRD is to extend the functionality of Kubernetes through a declarative API, define your own resource structure, and then operate these custom resources like Kubernetes built-in resources.
[0029] A node agent (such as kubelet) runs on each node in the node cluster. The node agent can register with the api-server when it starts, and then periodically report the NUMA resource information of the node to the api-server. Among them, kubelet is an agent component on the Kubernetes worker node, running on each node. Kubelet is the main service on the worker node, regularly receiving new or modified Pod specifications from the kube-apiserver component, and ensuring that the Pod and its containers run under the expected specifications. At the same time, this component acts as a monitoring component of the worker node and reports the operating status of the host to the kube-apiserver. NUMA resource information may include but is not limited to at least one of the following: NUMA name, resource name, total resource amount, resource usage, etc., to provide calculation data for the scheduler (such as kube-scheduler). For resource usage, the node agent will immediately report and update this field whenever the scheduler installs a container.
[0030] Step 103 , searching NUMA resource information to determine whether there is a first node in the node cluster with NUMA idle resources that satisfies the resource request.
[0031] In this embodiment, traversing the NUMA resource information of the node cluster can determine whether there is a first node in the node cluster with NUMA idle resources that satisfies the resource request. If there is a first node in the node cluster, step 104 is executed.
[0032] For a node in a node cluster, the NUMA resource information of the node can be searched. Determine whether there is a NUMA with free NUMA resources in the node that satisfies the resource request. If so, the node is determined as the first node; if not, continue to search for the next node in the node cluster. This cycle is repeated until the first node is found or the node cluster is traversed. Among them, there is a NUMA in the first node where the sum of the resources corresponding to the resource request and the resource usage is not greater than the total amount of resources. In other words, there is a NUMA in the first node with enough free resources to install the container, thereby avoiding the container crossing processes and crossing NUMAs.
[0033] Step 104, in response to determining that the first node exists, installing the container to a NUMA in the first node that satisfies the resource request, and updating NUMA resource information of the NUMA where the container is installed.
[0034] In this embodiment, when there is a first node in the node cluster, the container may be installed to a NUMA in the first node that satisfies the resource request, and the NUMA resource information of the NUMA where the container is installed may be updated.
[0035] The scheduler may install the container on the NUMA in the first node that satisfies the resource request, and the node agent may bind the process to the NUMA in the first node that satisfies the resource request. Subsequently, the scheduler calculates the updated resource usage of the NUMA in which the container is installed, and the node agent reports it. The updated resource usage of the NUMA in which the container is installed is equal to the sum of the resource usage of the NUMA in which the container is installed before the update and the resource corresponding to the resource request.
[0036] The method provided by the above-mentioned embodiment of the present disclosure considers the idle situation of NUMA resources from a global perspective, allows the container to perceive the resource usage of NUMA during the scheduling stage, and decides during scheduling that the container can be scheduled to a node with sufficient idle resources of the entire machine, and at the same time decides the idle NUMA allocated to the container, so as to achieve better scheduling effect.
[0037] Figure 2 A process 200 of another embodiment of a scheduling method for a NUMA architecture according to the present disclosure is shown. The scheduling method for the NUMA architecture includes the following steps:
[0038] Step 201: receiving a resource request initiated by a user to create a container.
[0039] In this embodiment, a user can create a container. After obtaining the container, the user can apply for resources for the container by initiating a resource request. The resources applied for in the resource request are sufficient to install the container.
[0040] Step 202: Obtain NUMA resource information of the node cluster.
[0041] In this embodiment, after receiving the resource request, NUMA resource information of the node cluster may be obtained.
[0042] In the NUMA architecture, the CPU can be divided into multiple nodes, which can form a node cluster. Each node can include at least one NUMA.
[0043] The data model can be used to describe the NUMA resource information of the node. Usually, the CRD of K8s can be used to define the data model of NUMA resource information. Among them, Kubernetes, referred to as K8s, is an open source for managing containerized applications on multiple hosts in the cloud platform. The goal of Kubernetes is to make the deployment of containerized applications simple and efficient. Kubernetes provides a mechanism for application deployment, planning, updating, and maintenance. CRD is a powerful Kubernetes API extension mechanism. CRD allows users to create and manage custom resources that are not part of the Kubernetes standard API. CRD makes Kubernetes not only limited to built-in resources, but also supports user-defined resource types. The core idea of CRD is to extend the functionality of Kubernetes through a declarative API, define your own resource structure, and then operate these custom resources like Kubernetes built-in resources.
[0044] A node agent (such as kubelet) runs on each node in the node cluster. The node agent can register with the api-server when it starts, and then periodically report the NUMA resource information of the node to the api-server. Among them, kubelet is an agent component on the Kubernetes worker node, running on each node. Kubelet is the main service on the worker node, regularly receiving new or modified Pod specifications from the kube-apiserver component, and ensuring that the Pod and its containers run under the expected specifications. At the same time, this component acts as a monitoring component of the worker node and reports the operating status of the host to the kube-apiserver. NUMA resource information may include but is not limited to at least one of the following: NUMA name, resource name, total resource amount, resource usage, etc., to provide calculation data for the scheduler (such as kube-scheduler). For resource usage, the node agent will immediately report and update this field whenever the scheduler installs a container.
[0045] Step 203 , searching NUMA resource information to determine whether there is a first node in the node cluster with NUMA idle resources that satisfies the resource request.
[0046] In this embodiment, traversing the NUMA resource information of the node cluster can determine whether there is a first node in the node cluster with NUMA idle resources that meets the resource request. If the first node exists in the node cluster, execute step 204. If the first node does not exist in the node cluster, execute step 205.
[0047] For a node in a node cluster, the NUMA resource information of the node can be searched. Determine whether there is a NUMA with free NUMA resources in the node that satisfies the resource request. If so, the node is determined as the first node; if not, continue to search for the next node in the node cluster. This cycle is repeated until the first node is found or the node cluster is traversed. Among them, there is a NUMA in the first node where the sum of the resources corresponding to the resource request and the resource usage is not greater than the total amount of resources. In other words, there is a NUMA in the first node with enough free resources to install the container, thereby avoiding the container crossing processes and crossing NUMAs.
[0048] Step 204, in response to determining that the first node exists, install the container to the NUMA of the first node that satisfies the resource request, and update the NUMA resource information of the NUMA where the container is installed.
[0049] In this embodiment, when there is a first node in the node cluster, the container may be installed to a NUMA in the first node that satisfies the resource request, and the NUMA resource information of the NUMA where the container is installed may be updated.
[0050] The scheduler may install the container on the NUMA in the first node that satisfies the resource request, and the node agent may bind the process to the NUMA in the first node that satisfies the resource request. Subsequently, the scheduler calculates the updated resource usage of the NUMA in which the container is installed, and the node agent reports it. The updated resource usage of the NUMA in which the container is installed is equal to the sum of the resource usage of the NUMA in which the container is installed before the update and the resource corresponding to the resource request.
[0051] Step 205 , in response to determining that the first node does not exist, searching NUMA resource information to determine whether there is a second node in the node cluster with idle resources that meet the resource request.
[0052] In this embodiment, when the first node does not exist in the node cluster, NUMA resource information can be searched to determine whether there is a second node in the node cluster with idle resources that meet the resource request. If the second node exists in the node cluster, step 206 is executed.
[0053] For a node in a node cluster, the NUMA resource information of the node can be searched. Determine whether the idle resources of the entire machine of the node meet the resource request. If so, the node is determined as the second node; if not, continue to search for the next node in the node cluster. This cycle is repeated until the second node is found or the node cluster is traversed. Among them, the idle resources of the entire machine are equal to the sum of all NUMA idle resources of the node. The sum of the used amount of all NUMA resources of the second node and the resources corresponding to the resource request is not greater than the total amount of all NUMA resources of the second node. In other words, the idle resources of the entire machine of the second node are sufficient to install the container.
[0054] Step 206: In response to determining that the second node exists, the container is installed to satisfy the NUMA in the second node, and the NUMA resource information of the second node is updated.
[0055] In this embodiment, when there is a second node in the node cluster, the container can be installed to the NUMA of the second node, and the NUMA resource information of the second node can be updated. For example, if the container applies for 2C, and node-0 and node-1 of the node NUMA each have 1C left, the container can be installed across NUMA.
[0056] The method provided by the above-mentioned embodiment of the present disclosure considers the idle situation of NUMA resources from a global perspective, allows the container to perceive the resource usage of NUMA during the scheduling stage, and decides during scheduling that the container can be scheduled to a node with sufficient idle resources of the entire machine, and at the same time decides the idle NUMA allocated to the container, so as to achieve better scheduling effect.
[0057] Figure 3 Figure 2 shows a schematic diagram of resource reporting. Figure 3 As shown in the figure, NodeA to NodeN all run kubelet. Through their respective kubelets, NodeA to NodeN can report their respective NUMA node information to kube-apiserver.
[0058] Figure 4 Figure 1 shows a schematic diagram of the interaction between the various components of container scheduling. Figure 4 As shown in the figure, first, the user creates a container. Then, the kube-apiserver is queried to determine whether there is an idle NUMA on node NodeA. The container is scheduled to the idle NUMA on node NodeA through kube-scheduler. The container is created on NodeA according to the specified NUMA.
[0059] Figure 5 The scheduler flow chart is shown in FIG. Figure 5 As shown, the scheduler process is as follows:
[0060] In the first step, the user creates a container and obtains container application resources.
[0061] The second step is to obtain the NodeResourceTopology resources reported by the node cluster.
[0062] The third step is to find out whether there is free NUMA resources in NodeResourceTopology to satisfy the container application. The calculation formula is: container application resources + used <= allocatable.
[0063] Step 4: If the condition is true, the node and the NUMA can install the container and record the information on the container; otherwise, try other nodes.
[0064] Step 5: deduct NUMA resources and update the NUMA used field in the NodeResourceTopology resource. The calculation formula is: used = used + container application resources.
[0065] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a scheduling device for a NUMA architecture. Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic equipment.
[0066] like Figure 6As shown, the scheduling device 600 of the NUMA architecture provided in this embodiment includes a receiving module 601, an acquisition module 602, a first search module 603 and a first device module 604. The receiving module 601 is configured to receive a resource request initiated based on a user creating a container; the acquisition module 602 is configured to obtain NUMA resource information of a node cluster, wherein the nodes in the node cluster include at least one NUMA; the first search module 603 is configured to search for NUMA resource information to determine whether there is a first node in the node cluster with NUMA idle resources that satisfies the resource request; the first device module 604 is configured to, in response to determining that there is a first node, install the container to the NUMA in the first node that satisfies the resource request, and update the NUMA resource information of the NUMA where the container is installed.
[0067] In this embodiment, in the scheduling device 600 of the NUMA architecture, the specific processing of the receiving module 601, the obtaining module 602, the first search module 603 and the first device module 604 and the technical effects thereof can be referred to respectively. Figure 1 The relevant descriptions of steps 101 - 104 in the corresponding embodiment are not repeated here.
[0068] In some optional implementations of the present embodiment, the scheduling device 600 of the NUMA architecture also includes: a second search module, configured to search for NUMA resource information in response to determining that the first node does not exist, and determine whether there is a second node in the node cluster with idle resources of the entire machine that meets the resource request; a second installation module, configured to install the container to the NUMA in the second node in response to determining that the second node exists, and update the NUMA resource information of the second node.
[0069] In some optional implementations of this embodiment, the NUMA resource information includes at least one of the following: NUMA name, resource name, total resource amount, and used resource amount.
[0070] In some optional implementations of this embodiment, there exists a NUMA in the first node in which the sum of the resources corresponding to the resource request and the used resources is not greater than the total amount of resources.
[0071] In some optional implementations of this embodiment, the first device module 604 is further configured to: update the updated resource usage of the NUMA of the device container to the sum of the pre-update resource usage of the NUMA of the device container and the resource corresponding to the resource request.
[0072] In some optional implementations of this embodiment, K8s's CRD is used to define the data model of NUMA resource information, and the NUMA resource information is reported through a node agent.
[0073] Reference below Figure 7 , which shows a schematic diagram of the structure of an electronic device (e.g., a server) 700 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0074] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0075] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 7 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0076] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 709, or installed from a storage device 708, or installed from a ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0077] It should be noted that the computer-readable medium described in the 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 may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0078] The computer-readable medium may be included in the electronic device; or it may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: receives a resource request initiated based on a user creating a container; obtains NUMA resource information of a node cluster, wherein the nodes in the node cluster include at least one NUMA; searches for NUMA resource information to determine whether there is a first node in the node cluster with NUMA idle resources that satisfies the resource request; in response to determining that there is a first node, installs the container to the NUMA in the first node that satisfies the resource request, and updates the NUMA resource information of the NUMA where the container is installed.
[0079] Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0080] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0081] The modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a receiving module, an acquisition module, a first search module and a first device module. The names of these modules do not constitute a limitation on the modules themselves in some cases, for example, the receiving module may also be described as a "module for receiving resource requests initiated based on user-created containers".
[0082] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) to form a technical solution.
Claims
1. A scheduling method for a NUMA architecture, comprising: Receive resource requests initiated by users to create containers; Acquire NUMA resource information of a node cluster, wherein a node in the node cluster includes at least one NUMA; Searching the NUMA resource information to determine whether there is a first node in the node cluster with NUMA idle resources that satisfies the resource request; In response to determining that the first node exists, the container is installed to a NUMA in the first node that satisfies the resource request, and NUMA resource information of the NUMA where the container is installed is updated.
2. The method according to claim 1, wherein: The method further comprises: In response to determining that the first node does not exist, searching the NUMA resource information to determine whether there is a second node in the node cluster with whole machine idle resources that meets the resource request; In response to determining that the second node exists, the container is installed to a NUMA in the second node, and NUMA resource information of the second node is updated.
3. The method according to claim 1, wherein: The NUMA resource information includes at least one of the following: NUMA name, resource name, total resource amount, and used resource amount.
4. The method according to claim 3, wherein: In the first node, there exists a NUMA in which the sum of the resource corresponding to the resource request and the resource usage is not greater than the total resource amount.
5. The method according to claim 4, wherein: The updating device updates the NUMA resource information of the NUMA of the container, including: The updated resource usage of the NUMA of the container is updated to the sum of the resource usage of the NUMA of the container before the update and the resource corresponding to the resource request.
6. The method according to any one of claims 1 to 5, wherein: The data model of the NUMA resource information is defined using K8s's CRD, and the NUMA resource information is reported through a node agent.
7. A scheduling device for a NUMA architecture, comprising: A receiving module, configured to receive a resource request initiated based on a user creating a container; An acquisition module is configured to acquire NUMA resource information of a node cluster, wherein a node in the node cluster includes at least one NUMA; A first search module is configured to search the NUMA resource information to determine whether there is a first node in the node cluster where NUMA idle resources satisfy the resource request; The first installation module is configured to, in response to determining that the first node exists, install the container to a NUMA in the first node that satisfies the resource request, and update NUMA resource information of the NUMA where the container is installed.
8. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.