Service configuration method and device

By obtaining affinity information based on the service history interaction information in a multi-core system, dynamically configure services to the child nodes where the affinity service is located, solving the problem of low data throughput in a multi-core system, and reducing latency and improving throughput The effect of quantity.

CN119396563APending Publication Date: 2025-02-07HUAWEI TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411246992.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The problem of low data throughput due to the non-consistent memory access (Numa) architecture in multi-core systems.

Method used

By obtaining affinity information based on the historical interaction information between services, determining services that have affinity with the target services, and configuring the target services to the child nodes where these affinity services are located, so as to reduce the cross-child nodes Business interaction latency and improve overall system throughput.

Benefits of technology

It effectively reduces the business processing delay and improves the overall system throughput. By dynamically adjusting the business configuration, ensuring that the business runs on the most suitable child nodes according to changes in affinity relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396563A_ABST
    Figure CN119396563A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a service configuration method and device, and the method comprises the steps: configuring a target service to a sub-node to which a service having an affinity relationship with the target service belongs or a sub-node of which the delay with the sub-node meets a condition according to the affinity relationship between services, thereby effectively reducing the service processing time delay, and improving the service processing efficiency. And the system throughput is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of information technology, and in particular to a service configuration method and device. Background Art

[0002] With the development of computer technology, the number of processor cores in computer processors is increasing. In order to avoid the problem of low data throughput caused by multi-core shared memory solutions, non-uniform memory access (Numa) architecture is usually used in multi-core systems to improve system throughput. Summary of the invention

[0003] The present application provides a service configuration method and device. In the method, services are configured by affinity to reduce service processing delay and improve the overall system throughput.

[0004] In a first aspect, the present application provides a service configuration method, comprising: based on historical interaction information between services, obtaining first affinity information, the first affinity information being used to indicate the affinity relationship between services. Based on the first affinity information, determining whether there is an affinity service that has affinity with the target service. The target service is configured to a first target subnode, wherein the first target subnode includes a first subnode and / or a second subnode, the first subnode is a subnode to which the first affinity service that has affinity with the target service belongs, and the second subnode is a subnode whose delay with the first subnode meets a preset condition. In this way, the resources of the services are configured based on the affinity between the services, so that the services with affinity are configured to the same or the nearest subnode, so as to reduce the service interaction delay caused by crossing subnodes and improve the overall throughput of the system.

[0005] Exemplarily, the preset condition may be that the delay (or time delay) with the first subnode is minimal.

[0006] Exemplarily, the first affinity service may refer to one or more affinity services. The first child node may optionally be one or more child nodes. The second child node may optionally be one or more child nodes.

[0007] Exemplarily, the first target sub-node may be the first sub-node, may be the second sub-node, or may be a combination of the first sub-node and the second sub-node.

[0008] In a possible implementation, the method further includes: obtaining second affinity information based on historical interaction information between services up to the present. Based on the second affinity information, determine whether the affinity service with affinity to the target service has changed. If the affinity service with affinity to the target service changes from the first affinity service to the second affinity service, configure the target service to the second target subnode. The second target subnode includes a third subnode and / or a fourth subnode, wherein the third subnode is a subnode to which the second affinity service belongs, and the fourth subnode is a subnode whose delay with the third subnode meets a preset condition. In this way, the affinity of the service may change dynamically during the execution of the service. The present application can dynamically adjust the configuration of the service based on the updated affinity relationship, so that the service can always keep the service with affinity relationship in the same subnode as the affinity relationship changes. Moreover, as the affinity relationship progresses with the service, the acquired affinity is more accurate, which can further improve the throughput.

[0009] In a possible implementation, configuring the target service to the second target subnode includes: modifying the first configuration parameter of the target service to the second configuration parameter; wherein the first configuration parameter is used to indicate that the target service is deployed on the first target subnode, and the second configuration parameter is used to indicate that the target service is deployed on the second target subnode. In this way, the present application completes the dynamic migration of the service by modifying the configuration parameters, so that in the scenario where the affinity of the service changes, the resource configuration of the service can be dynamically adjusted to migrate the service to a more suitable subnode.

[0010] In a possible implementation, the first child node and the second child node belong to the same node, and resources in the node are allocated to the first child node and the second child node, and the resources include processor resources, memory resources, and device resources. In this way, the resource allocation object targeted by this application is the child node in the Node, and a more fine-grained resource allocation can be achieved based on affinity.

[0011] In a possible implementation, the node is a non-consistent memory access Numa architecture, and the first child node and the second child node are non-consistent memory access nodes Numa Node. In this way, the method provided in this application can be applied to a system of Numa architecture, such as a K8s system, or other virtualization system, and this application does not limit it.

[0012] In a possible implementation, the first affinity information is also used to indicate the affinity between services having an affinity relationship, wherein the affinity between the first affinity service and the target service is the highest. Thus, in this application, the higher the affinity, the more frequent the interaction between services, and the delay can be reduced in the child node or close to the child node.

[0013] In a possible implementation, when the first subnode meets the resource requirements of the target business, the first target subnode is the first subnode; or, when the first subnode does not meet the resource requirements of the target business, and there is a subnode that meets the resource requirements of the target business in the node to which the first subnode belongs, the first target subnode is the second subnode, and the second subnode is a subnode that meets the resource requirements of the target business, and the delay between the second subnode and the first subnode meets the preset conditions; or, when a single subnode does not meet the resource requirements of the target business, the first target subnode is a combination of the first subnode and the second subnode, and the resources of the combination of the first subnode and the second subnode meet the resource requirements of the target business. In this way, in the present application, the fewer the number of cross-nodes, the better, which can reduce the frequency of remote access, reduce delays, and improve throughput. And giving priority to affinity when selecting, can further reduce latency and improve throughput.

[0014] In a possible implementation, if there are multiple affinity services with affinity to the target service, and the multiple affinity services belong to different subnodes, configuring the target service to the first target subnode includes: obtaining resource usage of each of the multiple subnodes corresponding to the multiple affinity services; and determining the first target subnode from the multiple subnodes that meet the resource requirements of the target service based on the resource usage of each subnode. In this way, when there are multiple optional subnodes, the corresponding subnode can be selected according to different algorithms and resource states to meet different scenario requirements.

[0015] In a possible implementation, determining a first target subnode from among multiple subnodes that meet the resource requirements of a target business includes: based on a binning algorithm, selecting a subnode with the smallest sequence number as the first target subnode from among the subnodes that meet the resource requirements of the target business; or, based on a load balancing algorithm, selecting a subnode with the smallest load as the first target subnode from among the subnodes that meet the resource requirements of the target business; or, based on the resource requirements of the target business, determining whether the resource requirements of the target business are greater than a preset resource threshold; if the resource requirements of the first target business are greater than the preset resource threshold, determining the first target subnode based on a load balancing algorithm; if the resource requirements of the first target business are less than or equal to the preset resource threshold, determining the first target subnode based on a binning algorithm. In this way, in the case where there are multiple optional subnodes, corresponding subnodes can be selected according to different algorithms and resource states to meet different scenario requirements.

[0016] In a second aspect, the present application provides a service configuration device, comprising: an acquisition module, used to acquire first affinity information based on historical interaction information between services, the first affinity information being used to indicate the affinity relationship between services; a determination module, used to determine whether there is an affinity service having affinity with a target service based on the first affinity information; a configuration module, used to configure the target service to a first target sub-node, wherein the first target sub-node comprises a first sub-node and / or a second sub-node, the first sub-node being a sub-node to which the first affinity service having affinity with the target service belongs, and the second sub-node being a sub-node whose delay with the first sub-node satisfies a preset condition.

[0017] In one possible implementation, the acquisition module is further used to acquire second affinity information based on historical interaction information between the services up to the current time; the determination module is further used to determine whether the affinity service having affinity with the target service has changed based on the second affinity information; the configuration module is further used to configure the target service to the second target sub-node if the affinity service having affinity with the target service changes from the first affinity service to the second affinity service; the second target sub-node includes a third sub-node and / or a fourth sub-node, wherein the third sub-node is a sub-node to which the second affinity service belongs, and the fourth sub-node is a sub-node whose delay with the third sub-node satisfies a preset condition.

[0018] In a possible implementation, the configuration module is specifically used to: modify a first configuration parameter of a target service to a second configuration parameter; wherein the first configuration parameter is used to indicate that the target service is deployed on a first target subnode, and the second configuration parameter is used to indicate that the target service is deployed on a second target subnode.

[0019] In a possible implementation, the first subnode and the second subnode belong to the same node, and resources in the node are allocated to the first subnode and the second subnode, and the resources include processor resources, memory resources, and device resources.

[0020] In a possible implementation, the node is a non-uniform memory access Numa architecture, and the first child node and the second child node are non-uniform memory access nodes Numa Node.

[0021] In a possible implementation manner, the first affinity information is further used to indicate the affinity between services having an affinity relationship, wherein the affinity between the first affinity service and the target service is the highest.

[0022] In one possible implementation, when the first subnode meets the resource requirements of the target business, the first target subnode is the first subnode; or, when the first subnode does not meet the resource requirements of the target business and there is a subnode that meets the resource requirements of the target business in the node to which the first subnode belongs, the first target subnode is the second subnode, and the second subnode is a subnode that meets the resource requirements of the target business and the delay between the second subnode and the first subnode meets a preset condition; or, when no single subnode meets the resource requirements of the target business, the first target subnode is a combination of the first subnode and the second subnode, and the resources of the combination of the first subnode and the second subnode meet the resource requirements of the target business.

[0023] In one possible implementation, if there are multiple affinity services that have affinity with the target service, and the multiple affinity services belong to different sub-nodes, the configuration module is specifically used to: obtain the resource usage of each sub-node among the multiple sub-nodes corresponding to the multiple affinity services; based on the resource usage of each sub-node, determine the first target sub-node from the multiple sub-nodes that meet the resource requirements of the target service.

[0024] In one possible implementation, the configuration module is specifically used to: based on a packing algorithm, select the subnode with the smallest sequence number as the first target subnode from the subnodes that meet the resource requirements of the target business; or, based on a load balancing algorithm, select the subnode with the smallest load as the first target subnode from the subnodes that meet the resource requirements of the target business; or, based on the resource requirements of the target business, determine whether the resource requirements of the target business are greater than a preset resource threshold; if the resource requirements of the first target business are greater than the preset resource threshold, determine the first target subnode based on the load balancing algorithm; if the resource requirements of the first target business are less than or equal to the preset resource threshold, determine the first target subnode based on the packing algorithm.

[0025] In a third aspect, the present application provides a service configuration method, the method comprising: determining a first sub-node set based on the resource requirements of a target service, the first sub-node set comprising a plurality of candidate sub-nodes, the candidate sub-node being a single sub-node, or the candidate sub-node being a combination of a plurality of sub-nodes; wherein each candidate sub-node meets the resource requirements of the target service; determining a target sub-node from the first sub-node set based on a preset algorithm; and configuring the target service to the target sub-node.

[0026] In one possible implementation, if the candidate subnode is a combination of multiple subnodes, determining the first target subnode from the first subnode based on a preset algorithm includes: determining a second subnode set from the first subnode set, wherein one or more candidate subnodes in the second subnode set are candidate subnodes with the smallest delay in the first subnode set; and selecting the target subnode from the second subnode set based on a preset algorithm.

[0027] In one possible implementation, the preset algorithm includes: a packing algorithm, which is used to indicate that the candidate subnode with the smallest sequence number in the first subnode set is the target subnode; or, a load balancing algorithm, which is used to indicate that the candidate subnode with the smallest load in the first subnode set is the target subnode; or, a task aggregation algorithm, which is used to indicate that if the resource demand of the target business is greater than the preset resource threshold, the target subnode is determined based on the load balancing algorithm; if the resource demand of the target business is less than or equal to the preset resource threshold, the target subnode is determined based on the packing algorithm.

[0028] In a fourth aspect, the present application provides a service configuration device, which includes: a determination module, used to determine a first sub-node set based on the resource requirements of a target service, the first sub-node set including multiple candidate sub-nodes, the candidate sub-node is a single sub-node, or the candidate sub-node is a combination of multiple sub-nodes; wherein each candidate sub-node meets the resource requirements of the target service; the determination module is also used to determine a target sub-node from the first sub-node set based on a preset algorithm; and a configuration module is used to configure the target service to the target sub-node.

[0029] In one possible implementation, if the candidate subnode is a combination of multiple subnodes, the determination module is also used to: determine a second subnode set from the first subnode set, wherein one or more candidate subnodes in the second subnode set are candidate subnodes with the smallest delay in the first subnode set; and select the target subnode from the second subnode set based on a preset algorithm.

[0030] In one possible implementation, the preset algorithm includes: a packing algorithm, which is used to indicate that the candidate subnode with the smallest sequence number in the first subnode set is the target subnode; or, a load balancing algorithm, which is used to indicate that the candidate subnode with the smallest load in the first subnode set is the target subnode; or, a task aggregation algorithm, which is used to indicate that if the resource demand of the target business is greater than the preset resource threshold, the target subnode is determined based on the load balancing algorithm; if the resource demand of the target business is less than or equal to the preset resource threshold, the target subnode is determined based on the packing algorithm.

[0031] In a fifth aspect, an embodiment of the present application provides a computer device, comprising: a transceiver / transceiver pin and a processor, and optionally, a memory. The transceiver / transceiver pin, the processor, and the memory communicate with each other through an internal connection path; the processor is used to execute instructions to control the transceiver / transceiver pin to send or receive signals; and the memory is used to store instructions. When the processor executes the instructions, the processor executes the method described in the first aspect or any possible implementation of the first aspect.

[0032] In a sixth aspect, an embodiment of the present application provides a computer-readable medium for storing a computer program, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.

[0033] In a seventh aspect, an embodiment of the present application provides a computer program comprising instructions for executing the method in the first aspect or any possible implementation of the first aspect.

[0034] In an eighth aspect, an embodiment of the present application provides a chip, the chip comprising a processing circuit and a transceiver pin, wherein the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the first aspect or any possible implementation of the first aspect to control the receiving pin to receive a signal and control the sending pin to send a signal.

[0035] In a ninth aspect, the present application provides a service configuration device, including a processor and a memory. The memory stores a computer program, and when the computer program is executed by the processor, the service configuration device executes the method in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 The following is a system architecture diagram of Kubernetes shown as an example;

[0037] Figure 2a An architectural diagram of a node shown as an example;

[0038] Figure 2b An architectural diagram of a node shown as an example;

[0039] Figure 3 The figure is a schematic diagram of Numa Node access shown as an example;

[0040] Figure 4 A flowchart of a business configuration method is shown as an example;

[0041] Figure 5 A flowchart of an exemplary business configuration is shown;

[0042] Figure 6 A schematic diagram of affinity relationship deployment is shown as an example;

[0043] Figure 7 A schematic diagram of a process for dynamically adjusting configuration information of a service is shown as an example;

[0044] Figure 8 A schematic diagram of affinity relationship deployment is shown as an example;

[0045] Fig. 9 A schematic diagram of a flow chart of a preset algorithm shown as an example;

[0046] Fig.10 is a schematic diagram of the structure of an exemplary device;

[0047] Fig.11 Schematic diagram of the structure of the device shown as an example. DETAILED DESCRIPTION

[0048] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0049] First, a brief description of the technical terms and systems that may be involved in this application is given:

[0050] 1)Kubernetes, abbreviated as K8s.

[0051] Kubernetes is a portable, extensible, open source platform for managing containerized workloads and services. Kubernetes has a large and rapidly growing ecosystem with a wide range of services, support, and tools.

[0052] Figure 1 For an example of the Kubernetes system architecture diagram, please refer to Figure 1 The system includes but is not limited to: Application Programming Interface Server (API Server), Node, etc.

[0053] API Sever is used to provide authorization, authentication, access control, API registration and other functions.

[0054] Node is used to provide hardware and software resources to run services. In the embodiment of the present application, the system may include at least one Node, such as Node 1 to Node n, which can be set according to actual needs and is not limited in the present application.

[0055] In the embodiments of the present application, Figure 1The system can be deployed in a computer cluster or a server cluster. Taking a server cluster as an example, the server cluster includes one or more servers. Each Node optionally refers to a server, or a motherboard in a server. Typically, a server includes a motherboard.

[0056] Optionally, in some instances, multiple servers may be integrated into a cabinet to form a large server. In this scenario, each server (or motherboard) may be a Node, that is, a large server includes multiple Nodes. It can be understood that, at the physical level, Nodes may be divided with the motherboard as the smallest granularity.

[0057] 2)Node

[0058] Figure 2a The node architecture diagram is an exemplary diagram, which can be used to describe Figure 1 Any Node in the scene (for example, Node 1). Please refer to Figure 2a ,The resources in Node can be classified into hardware (also called hardware resources) and software (also called software resources).

[0059] Exemplarily, the hardware resources of a Node include but are not limited to: processor, memory, device, etc. Among them, device resources include but are not limited to network card and other resources.

[0060] Exemplarily, the processor is the computing core and control core of the Node. The processor includes one or more processor cores. The processor can be a central processing unit (CPU) or other application specific integrated circuits (ASIC). The processor can also be other general-purpose processors, digital signal processors (DSP), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. In practical applications, a Node includes only one processor or multiple processors.

[0061] The processor is connected to the memory via a double data rate (DDR) bus. Here, different memories may use different data buses to communicate with the processor, so the DDR bus can also be replaced by other types of data buses, and the embodiment of the present application does not limit the bus type.

[0062] Memory is the main memory of Node. Memory is usually used to store various running software, input and output data, etc. in the operating system. In order to improve the access speed of the processor, the memory needs to have the advantage of fast access speed. In traditional computer system architecture, dynamic random access memory (DRAM) is usually used as memory. In addition to DRAM, memory is also other random access memory, such as static random access memory (SRAM), etc. In addition, the memory can also be a read-only memory (ROM). As for the read-only memory, for example, it can be a programmable read only memory (PROM), an erasable programmable read only memory (EPROM), etc. This embodiment does not limit the number and type of memory. In addition, the memory can be configured to have a power-saving function. The power-saving function means that after the system loses power and is powered on again, the data stored in the memory will not be lost. Memory with a power-saving function is called a non-volatile memory.

[0063] Still refer to Figure 2a The software architecture of a Node may be layered, for example, including an operating system and an application layer (for illustrative purposes only, more or fewer layers may be included, and this application does not limit this).

[0064] Exemplarily, the application layer may include, but is not limited to: Kubelet, Container Runtime, Resource-aware operator, and POD, etc.

[0065] Exemplarily, Kubelet is the core component running on each node in the Kubernetes cluster and is responsible for managing the node. Optionally, Kubelet may include but is not limited to: a topology management module (Topology Manager), a device management module (Device Manager), a central processing unit management module (CPU Manager), etc.

[0066] Among them, Topology Manager is used to call each module in Node. The "call" described in the embodiment of the present application can be understood as interacting with the corresponding module through the interface between each module (the interface type provided by each module can be the same or different) to perform data or control signals (or control information, control signaling, etc.).

[0067] Device Manager is used to provide device management policies and manage the device resources corresponding to each POD according to the device management policies.

[0068] CPU Manager is used to provide CPU management policies and manage the processor resources corresponding to each POD according to the CPU management policies.

[0069] Container Runtime, used to respond to runtime POD and container lifecycle events. Optionally, Container Runtime includes but is not limited to: container engine (also known as container runtime interface (Container Runtime Interface, CRI) module), non-consistent memory access runtime interface plug-in (Numa Runtime Interface Plugin, NRIPlugin). It should be noted that the module names and quantities involved in the embodiments of this application are only illustrative examples and are not limited in this application.

[0070] Among them, the container engine is used to provide a CRI interface to interact with Kubelet (specifically, Topology Manager) for data or instructions. The interactive data or instructions between the container engine and Kubelet conform to the format rules of CRI. Of course, the various interface types in the embodiments of this application are only illustrative examples, and may be other types in other systems (such as virtualization scenarios), which are not limited in this application.

[0071] NRIPlugin is used to determine the configuration parameters of the POD and has the authority to modify the configuration parameters of the POD. In an embodiment of the present application, the configuration parameters are optionally saved and transmitted in the form of a specification (spec) file. NRIPlugin can read the Spec file of each POD in this node and modify the configuration parameters in the file. Among them, the configuration parameters include but are not limited to at least one of the following: processor configuration parameters, device configuration parameters, memory configuration parameters, etc. corresponding to the POD. NRIPlugin can modify any parameter corresponding to the POD when creating the POD or when the POD is running to change the hardware resource configuration of the POD, which can also be understood as changing the Numa Node corresponding to the POD, thereby realizing the dynamic adjustment of the configuration parameters of the POD. The specific implementation will be described in detail below. It needs to be explained that, as described above, the Numa Node is associated with the hardware resources. Therefore, in an embodiment of the present application, the modification of the configuration parameters of the POD can be understood as the modification of the hardware resources corresponding to the POD, and can also be understood as the modification of the Numa Node corresponding to the POD. For example, as shown in Figure 2, the hardware resources corresponding to Numa Node0 include Core-0 to Core-3, and the hardware resources corresponding to Numa Node1 include Core-4 to Core-7. Assume that POD1 is configured to Numa Node0 when it is created, and its corresponding configuration parameters indicate that the hardware resources corresponding to POD1 include Core-0 and Core-1, etc. When POD1 is running, NRIPlugin can modify the configuration parameters of POD1 so that the modified configuration parameters indicate that the hardware resources corresponding to POD1 are updated to Core-5 and Core-6. Correspondingly, in this example, POD1 migrated from Numa Node0 to Numa Node1. It can be understood that the configuration of POD from one Numa Node to another Numa Node as described in the embodiments of the present application is equivalent to the update of the hardware resources of POD, which will not be repeated below.

[0072] Resource-aware operator, used to obtain the historical interaction information of POD, and based on the historical interaction information of POD, obtain the affinity information of POD. Among them, the affinity information is used to indicate the affinity relationship between PODs. Optionally, the historical interaction information may include but is not limited to: process ID (PID), thread ID (TID), CPU, memory virtual address (VA), memory physical address (PA), and inter-process socket interaction information and other data. In an embodiment of the present application, the Resource-aware operator can obtain the above-mentioned historical interaction information from the kernel in real time or periodically. Each time the Resource-aware operator obtains the historical interaction information, it executes an affinity information update process. Specifically, the Resource-aware operator can be pre-configured with an affinity model. The Resource-aware operator inputs the historical interaction information into the affinity model and obtains the affinity relationship output by the affinity model. The affinity relationship can be understood as the interaction relationship between each POD when accessing a memory page (also known as a memory address or memory space). It can be understood that the more frequent the interactions between threads corresponding to different PODs, the higher the affinity of the corresponding PODs. Optionally, the affinity model can be trained online or offline, and it can obtain the affinity relationship between different PODs based on the input historical information and output the affinity relationship information.

[0073] Optionally, the Resource-aware operator may be provided with an affinity information list (only illustrated in the form of a list, not limited in this application), as shown in Table 1:

[0074] Table 1

[0075] POD Affinity relationship POD1 POD2, POD3 POD2 POD3 …… ……

[0076] As shown in Table 1, the Resource-aware operator can record the identification information of the POD (for example, it can be PODName (name)), the hardware resource information currently belonging to the POD (including processors, memory, devices and other resources), and the correspondence between the identification information of at least one POD that has an affinity relationship with the POD. Among them, as mentioned above, the hardware resource information can be equivalent to the Numa Node, that is, the affinity relationship information recorded by the Resource-aware operator can also be understood as: the correspondence between the POD, the Numa Node and the affinity POD. Among them, the affinity POD is a POD that has an affinity relationship with the POD indexed in the table entry.

[0077] Optionally, the affinity POD of each POD may include one or more PODs, which is not limited in this application.

[0078] Optionally, in some examples, the affinity relationship may also record the affinity relationship degree of the affinity POD (may also be referred to as affinity degree for short), wherein the higher the degree, the higher the affinity, and vice versa.

[0079] In a possible implementation, the degree of affinity relationship may be determined based on the interaction frequency in historical interaction information, etc., and may be set according to actual needs, and is not limited in this application.

[0080] 3) Numa Architecture

[0081] Numa architecture, i.e., non-consistent memory architecture, is a computer architecture. Each node in the embodiment of the present application is a Numa architecture. This architecture allows multiple processor cores to access physical memory by sharing memory. Optionally, different memory areas can be processed by different processor cores, and this memory access method is non-consistent memory access.

[0082] In the Kubernetes system, the hardware resources of a Node can be integrated into multiple Numa Nodes (i.e., the sub-nodes described in the embodiments of the present application). It can also be understood that a Numa Node is configured with processor resources, memory resources, device resources, etc. It can also be understood that a Numa Node is a collection of a group of processor core resources, memory resources, and device resources.

[0083] Figure 2b For an example of the Numa Node structure diagram, please refer to Figure 2b, take the case where a Node includes a single processor, and the processor includes multiple processor cores (also referred to as processing units, or simply referred to as cores, which are not limited in this application) as an example. Assume that the processor includes 64 Cores. During the chip design phase, the designers divided the 64 Cores into groups of 4 Cores each and divided them into the same Numa Node. Optionally, the configuration method in the embodiment of the present application can be applied to a cluster of one or more servers, and can be applied to a server (or computer device, etc.) including one or more processors, which is not limited in this application.

[0084] Optionally, each Numa Node is configured with different hardware resources (including processor resources, memory resources, and device resources). Figure 2b As shown, Numa Node0 is configured with Core-0 to Core-3, and other memory and device resources (not shown in the figure). Numa Node1 is configured with Core-4 to Core-7, and other memory and device resources (not shown in the figure).

[0085] It should be noted that the number of Numa Nodes and resource allocation involved in the embodiments of the present application are illustrative examples and can be set according to actual needs, and this application does not limit them.

[0086] Exemplarily, the designer designs the internal circuit and external circuit of each Numa Node according to the division result of the Numa Node. Exemplarily, the internal circuit of the Numa Node may include but is not limited to the connection circuit between the processor and the memory. Optionally, the Core on a Numa Node can quickly access the local memory of the Numa Node through the on-chip bus. Exemplarily, the external circuit of the Numa Node may include but is not limited to the high-speed Internet connection between the Numa Nodes. For example, Numa Node0 is connected to Numa Node1~Numa Node n respectively.

[0087] It should be understood that the number of Numa Nodes involved in this application and the number of processor cores included in each Numa Node are merely illustrative examples and are not limited in this application.

[0088] 4) Numa Node local access and remote access.

[0089] Figure 3 For an exemplary Numa Node access diagram, please refer to Figure 3 ,like Figure 3As shown, a NumaNode corresponds to a local memory, and the processor core in the NumaNode can quickly access the local memory in the NumaNode through the on-chip bus. This access method can be called local access or local memory access. For example, Figure 3 The processor cores in Node Node0 (including Core-0 to Core-3) can quickly access the local memory in Node Node0 through the on-chip bus.

[0090] Exemplarily, Numa Node can also access the memory of other Numa Nodes through a high-speed Internet network. This access method can be called remote access or remote memory access. Figure 3 As shown, the processor core in Numa Node0 can access the memory in Numa Node1 through a high-speed Internet network connection.

[0091] The access between modules or devices described in the embodiments of the present application may include but is not limited to: query, deletion, addition, etc., and the present application does not limit this.

[0092] It can be understood that the high-speed Internet connection is a public bus. If multiple Numa Nodes access the memory of a Numa Node through a high-speed Internet connection, there may be bandwidth competition between different Numa Nodes, resulting in a large delay. In addition, based on different circuit types, the data transmission delay on the high-speed Internet connection is greater than the data transmission delay of the on-chip bus. In other words, the speed of local memory access is faster than that of remote memory access, and the delay is smaller. For example, if the POD is deployed on two or more Numa Nodes, during the execution of the business, the data A of the business may be stored in the local memory of Numa Node 0, and the data B may be stored in the local memory of Numa Node1. When Numa Node1 runs thread 1 corresponding to the POD, if you want to read data A, you can access the local memory to obtain data A. If you need to read data B, you need to access it remotely to obtain data B from the local memory of Numa Node1.

[0093] Therefore, in an embodiment of the present application, when laying out the POD, priority is given to deploying the POD on the same NumaNode, so that when the POD business is running, the processor in the Numa Node can be called to access the local memory, thereby speeding up the business process of the POD. When the POD needs to be deployed across Numa Nodes, the condition considered for its deployment is that the one that spans the least Numa Nodes is the priority solution. For example, if the current system is heavy and a single Numa Node cannot meet the resources required by the POD, multiple Numa Nodes can be integrated together to meet the operating requirements of the POD. In this scenario, if the resources integrated from two Numa Nodes can meet the operating requirements of the POD,

[0094] The service configuration method in the embodiment of the present application can be applied to the K8s system and can also be applied to other virtualization system architectures. The implementation methods can all refer to the process of the present application. The present application only takes the K8s system as an example for explanation, and no longer gives examples of other scenarios one by one.

[0095] Figure 4 For an exemplary flow chart of a business configuration method, please refer to Figure 4 , including but not limited to the following steps:

[0096] S401, based on historical interaction information between services, obtain first affinity information, where the first affinity information is used to indicate affinity relationships between services.

[0097] Exemplarily, the system (which may also be referred to as a service configuration device, etc., is not limited in this application) obtains historical interaction information between services from the operating system. Optionally, the historical interaction information may include, but is not limited to, data such as PID, TID, CPU, VA, PA, and socket interaction information between processes.

[0098] In a possible implementation, the system may obtain the historical interaction information from the kernel (ie, the operating system) in real time, or may obtain the historical interaction information periodically, which is not limited in this application.

[0099] In one example, the historical interaction information acquired by the system may be all historical interaction information from system initialization to the present.

[0100] In another example, the historical interaction information acquired by the system may be all historical interaction information within the current period (ie, from the start time of the period to the current time).

[0101] Exemplarily, the system may obtain corresponding affinity information based on the acquired historical interaction information (since the subsequent affinity information will be updated, the affinity information acquired here may be referred to as first affinity information). Affinity information is used to indicate the affinity relationship between services, and may also be understood as the affinity relationship between services up to the present moment.

[0102] In the embodiment of the present application, in the K8s system, a service can be understood as a POD in K8s. One POD executes one service, and one service (i.e., POD) can run multiple processes or threads. A service can also be an application service or a data service, which is not limited in this application.

[0103] Exemplarily, after the system obtains the historical interaction information, it can calculate the access behavior of each business to at least one memory page (also called memory address or memory space) in the node based on the affinity model, so as to count the interaction relationship between each thread. Then, based on the interaction relationship between each thread, the affinity relationship between the business corresponding to each thread and other businesses is obtained. It can be understood that the more frequent the interaction between threads corresponding to different businesses, the higher the affinity of the corresponding business.

[0104] S402: Based on the first affinity information, determine whether there is an affinity service having affinity to the target service.

[0105] Exemplarily, after acquiring the first affinity information, the system may further determine whether there is an affinity business with the affinity corresponding to the target business.

[0106] In an embodiment of the present application, the system may maintain (i.e., record or save) an affinity information relationship table (only in the form of a list as an example, it may be in other forms, and this application does not limit it). The affinity relationship table may include, but is not limited to: the correspondence between services, affinity services, and Numa Node. Among them, services refer to all services in this node, including historical services and running services. Historical services refer to services that have been created and run in this node and deleted. The relationship table may include identification information corresponding to the services. Each service corresponds to a table entry (which may also be called an affinity relationship table entry), and the identification information of the service can be used as an index of the table entry. Optionally, an affinity service may be a service that has an affinity relationship with the service that is the index of the table entry.

[0107] Optionally, the services having affinity relationship with a single service may be one or more. The system may be provided with a preset condition (or preset algorithm) to select a service with the highest affinity relationship with the service from multiple services having affinity relationship (for example, the first affinity service described in the embodiment of the present application, which may also be referred to as the first affinity service).

[0108] Optionally, the business indicated by the affinity relationship column in the affinity relationship table (see Table 1) may be a business that has the closest affinity relationship with the corresponding business. Of course, in some examples, all businesses that have affinity relationships with it may also be recorded, and the degree of affinity relationship may be recorded accordingly. The higher the degree, the higher the affinity, and vice versa.

[0109] In a possible implementation, the degree of affinity relationship may be determined based on the interaction frequency in historical interaction information, etc., and may be set according to actual needs, and is not limited in this application.

[0110] In one example, if there is at least one affinity service having an affinity relationship with the target service, S403 is executed.

[0111] In another example, if there is no affinity service with an affinity relationship with the target service, the user may be requested to manually set the affinity service of the target service, and S403 may be executed. Optionally, the system may also allocate subnodes that meet the resource requirements of the target service according to the resource requirements of the target service, and obtain the affinity information of the target service in real time or periodically during the operation of the target service, and dynamically adjust the subnodes of the target service.

[0112] S403: configure the target service to the target subnode.

[0113] Exemplarily, if the system obtains a first affinity service corresponding to the target service, the system may configure the target service to the target subnode. The target subnode includes a first subnode and / or a second subnode. The first subnode is a subnode to which the first affinity service belongs, and the second subnode is a subnode whose delay with the first subnode satisfies a preset condition. The preset condition may optionally be that the delay (or delay) with the first subnode is the minimum.

[0114] In an embodiment of the present application, the first affinity service may be one or more affinity services, and correspondingly, the first subnode may optionally include one or more subnodes. Specifically, if there are multiple affinity services having an affinity relationship with the target service in the system, an affinity service set is constituted. The system may select the corresponding first subnode (which may be one or more) based on the resource requirements of the target service, the affinity degree of the affinity service, the resource usage of the subnodes corresponding to the affinity service (which may be recorded as alternative subnodes), and the Distance between each alternative subnode. Wherein, Distance is used to indicate the delay between subnodes.

[0115] Specifically, the system can obtain affinity services and their corresponding affinity levels, resource usage of candidate subnodes (also referred to as spare subnodes or available subnodes, not limited in this application) corresponding to each affinity service, and the Distance of each candidate subnode. The system can select the first subnode that meets the resource requirements of the target service from the candidate subnodes according to the preset condition algorithm and preset conditions.

[0116] Optionally, the preset algorithm is optionally: calculating the weight between the affinity degree of the affinity service and the Distance of the child node, and determining the first child node based on the weight value.

[0117] Optionally, the preset conditions include but are not limited to at least one of the following:

[0118] 1) There is at least one child node among the child nodes that satisfies the affinity relationship.

[0119] 2) The remaining resources of the child node can meet the needs of the target business.

[0120] 2) The smaller the number of sub-nodes, the better. For example, taking the K8s system as an example, in this system, the sub-node involved in the embodiment of the present application can be a Numa Node. If the combination of Numa Node0 and Numa Node1 (for example, the Numa Node is the first Numa Node) can meet the business needs of the target business, and Numa Node1, Numa Node2 and NumaNode3 can also meet the business needs of the target business, the system selects the combination of Numa Node0 and Numa Node1 as the target Numa Node for the target business.

[0121] For example, the services having affinity relationships with the target service include affinity service 1, affinity service 2, affinity service 3, etc., and the affinity relationship degree is from high to low as affinity service 1, affinity service 2, affinity service 3, and each affinity service belongs to a different Numa Node. In one example, if the available resources (i.e., remaining resources) of the Numa Node corresponding to affinity service 1 do not meet the needs of the target service, and the Numa Node to which affinity service 2 belongs meets the needs of the target service, then affinity service 2 is the first affinity service in the embodiment of the present application, and the corresponding Numa Node is the first Numa Node. In another example, if the Numa Node corresponding to affinity service 1 does not meet the needs of the target service, and the combination of the NumaNode to which affinity service 2 belongs and the Numa Node to which affinity service 1 belongs can meet the needs of the target service, then affinity service 1 and affinity service 2 are the first affinity services (i.e., the first affinity service includes multiple services), and the corresponding combination of Numa Nodes is the first Numa Node. It can be understood that the affinity between the target business and affinity business 1 is high, that is, during the operation of the business, the process interaction between it and affinity business 1 is relatively frequent. If the target business is deployed to another NumaNode, the Numa Node to which the target business belongs will frequently access the Numa Node to which affinity business 1 belongs through remote access, which will increase the business processing delay. While deploying Numa Node to a combination of Numa Nodes including the NumaNode to which affinity business 1 belongs, although this solution is implemented across Numa Nodes, its latency may be less than the scenario of direct deployment to another Numa Node. Of course, in this example, the system can also give priority to the condition of the minimum number of cross-Numa Nodes when creating the target business. During the operation of the target business, the system can dynamically adjust the deployment of the target business's Numa Node according to the improvement of the affinity between the target business and affinity business 1.

[0122] In a possible implementation, if the subnode to which the affinity service belongs that has affinity with the target service in the system does not meet the resource requirements of the target service. In an embodiment of the present application, the system can select one or more subnodes (i.e., second subnodes, where the second subnodes also follow the condition that the fewer the better) from other subnodes in the system as target subnodes. Alternatively, one or more subnodes can be selected and combined with the subnode to which the affinity service belongs as target subnodes, and configured for the target service.

[0123] In an embodiment of the present application, the system may allocate all or part of the resources (including processors, memory, devices, etc.) corresponding to the first subnode to the target business based on the resource requirements of the target business. Exemplarily, the system may obtain the first affinity business corresponding to the target business during the creation or operation of the target business, and allocate all or part of the resources corresponding to the first subnode to the target business by updating the configuration parameters of the target business. It can also be understood that the target business is configured in the first subnode by updating the configuration parameters of the target business.

[0124] Optionally, the configuration parameters corresponding to each service can be saved in the database of the system. The configuration parameters include but are not limited to at least one of the following: processor configuration parameters (also referred to as processor core configuration parameters), memory configuration parameters, and device configuration parameters. For example, the system queries that the child node to which the first affinity service corresponding to the target service belongs is Numa Node0 (i.e., the first child node). Numa Node0 includes Core-0 to Core-9. The resource requirement of the target service is 4 Cores (only processor resources are used as an example for explanation), that is, the operation of the target service requires 4 Cores to support it. Exemplarily, the system allocates Core-0 to Core-3 (referring to the idle Core) of Numa Node0 to the target service, and accordingly, the system updates the configuration parameters of the target service, wherein the processor configuration parameters are updated to Core-0 to Core-3, to indicate that Core-0 to Core-3 are configured to the target service, which can also be understood as configuring the target service to Core-0 to Core-3. In this way, during the operation of the target service, Core-0 to Core-3 will run the process or thread corresponding to the target service.

[0125] Exemplarily, the system may query the subnode to which the first affinity service belongs in the following manner: the system queries the configuration parameters corresponding to the first affinity service from the database, and the configuration parameters are also used to indicate the hardware resources corresponding to the first affinity service. The system may determine the corresponding subnode based on the hardware resources. For example, if the hardware resource corresponding to the first affinity service is Core-7, the corresponding Numa Node is Numa Node0.

[0126] In a possible implementation, the first affinity service may refer to one affinity service or multiple affinity services. That is, the system may obtain at least one affinity service corresponding to the target service. Specifically, the system may determine the number of subnodes required for the target service based on the resource usage of the subnodes (which may also be understood as the remaining resource situation) and the service requirements of the target service (which may also be understood as the resource requirements).

[0127] In the embodiments of this application Figure 4 The service configuration method shown can be applied to the service creation scenario, so that when the service is created, it can be configured based on affinity. In addition, the service configuration method can also be applied to the service operation scenario to provide a dynamic adjustment configuration method, which can dynamically adjust the service configuration according to the change of the service affinity. In both scenarios, the service configuration device can determine the corresponding affinity relationship based on the acquired historical information. And based on the affinity relationship, the corresponding sub-node is configured for the target service. The following is a combination of the service creation scenario and the dynamic adjustment scenario. Figure 4 The method is described in detail.

[0128] Figure 5 The following is a flow chart of the exemplary business configuration. Figure 5 Example of K8s scenario Figure 4 For a detailed description of the process, please refer to Figure 5 , including but not limited to the following steps:

[0129] S501, Topology Manager obtains the POD-1 creation task.

[0130] Exemplarily, in response to the received user instruction, the API Sever obtains the creation task of POD-1, where the task includes but is not limited to: resource requirements of POD-1 and identification information of POD-1.

[0131] Among them, the resource requirements of POD-1 include but are not limited to at least one of the following: processor resource requirements, memory (Mem) resource requirements and device resource requirements. In the embodiments of this application, only processor resource requirements and memory resource requirements are used as examples for illustration. This application does not limit the number and type of resource requirements of the business (i.e., POD), which are all schematic illustrations.

[0132] Exemplarily, the identification information of POD-1 may be specified by a user or generated by an API Sever, which is not limited in this application. Optionally, the identification information of POD-1 may be the name of POD-1, and POD-1 is used in the embodiments of this application to represent the name of POD-1.

[0133] The API Sever selects a Node from the system (the selection method can refer to the existing technology and is not limited in this application), and sends a POD creation instruction message to the Kubelet in the Node to instruct the creation of POD-1. The POD creation instruction message includes but is not limited to the creation task of POD1, that is, it includes but is not limited to the resource requirements of POD-1 and the identification information of POD-1.

[0134] The Topology Manager in Kubelet responds to the received POD creation instruction information and obtains the corresponding POD-1 creation task.

[0135] S502, Topology Manager sends a POD creation instruction to the container engine.

[0136] Exemplarily, after Topology Manager obtains the creation task of POD-1, it executes the task creation process of POD-1. Specifically, Topology Manager sends a POD creation instruction to Container Runtime, and the POD creation instruction is used to instruct the creation of POD-1. The POD creation instruction includes but is not limited to: the resource requirements of POD-1 and the identification information of POD-1.

[0137] The container engine receives the POD creation instruction.

[0138] S503: The container engine sends the Spec file to NRIPlugin.

[0139] Exemplarily, the container engine detects whether NRIPlugin is installed in the system in response to the received POD creation instruction. Optionally, after NRIPlugin is installed in the system, NRIPlugin is registered on the container engine side, and the container engine can obtain the interface and other information provided by NRIPlugin. During use, the container engine can search for registration information to determine whether NRIPlugin has been installed and registered. If NRIPlugin is detected, the subsequent process continues.

[0140] Exemplarily, the container engine indicates a Spec file to NRIPlugin, which may also be referred to as the Spec file of POD-1. Optionally, the container engine may indicate the Spec file to NRIPlugin in the following manner: the container engine caches the Spec file of POD-1 into a database. The Spec file of POD-1 includes the configuration information of POD-1 (or may be referred to as configuration parameters), and the configuration information includes but is not limited to: processor configuration parameters, memory configuration parameters, device configuration parameters, etc. Next, the container engine may send Spec file indication information to NRIPlugin to instruct NRIPlugin to obtain the Spec file of POD-1 from the database.

[0141] Optionally, in the Spec file of POD-1 indicated by the container engine to NRIPlugin, the configuration information may be completely or partially empty, or be the default value, which is not limited in this application.

[0142] S504, NRIPlugin requests affinity information from Resource-aware Operator (hereinafter referred to as Operator).

[0143] Exemplarily, in response to the acquired Spec file of POD-1, NRIPlugin sends an affinity information request message to the Operator to request the affinity information of POD-1 from the Operator. The affinity information request message includes but is not limited to: identification information of POD-1.

[0144] S505: The Resource-aware Operator obtains first affinity information based on historical interaction information.

[0145] Exemplarily, after the operator obtains the historical interaction information, it can obtain the first affinity information based on the historical interaction information. The first affinity information is used to indicate the affinity relationship between services. Optionally, the first affinity information can also be used to indicate the affinity relationship between services and their affinity levels.

[0146] In this example, the operator can obtain affinity information in real time or periodically. The specific description can be found above and will not be repeated here.

[0147] S506, the Resource-aware Operator feeds back the affinity information of POD-1 to NRIPlugin.

[0148] Exemplarily, after the Operator obtains the first affinity information, the Operator detects whether the first affinity information includes affinity information corresponding to POD-1 based on the identification information of POD-1.

[0149] Specifically, the Operator obtains the first affinity information, which includes the correspondence between all PODs in the system up to the current time (may be within the current cycle, or may be from system initialization to the current time) and PODs with affinity relationships (referred to as affinity PODs). In some instances, if a POD does not have an affinity relationship, its affinity relationship may be empty, or may not include the table entry corresponding to the POD.

[0150] The Operator may use the identification information of POD-1 obtained from NRIPlugin as an index to find out whether the first affinity information includes the affinity information corresponding to POD-1. For example, the Operator uses the identification information of POD-1 as an index to find the affinity relationship table (as shown in Table 1).

[0151] In a possible implementation, if there is affinity information corresponding to POD-1, it can also be understood that there is an entry in the affinity relationship table that successfully matches the identification information of POD-1. The Operator obtains the identification information of the affinity POD that has an affinity relationship with POD-1 from the affinity information corresponding to POD-1 (i.e., the entry).

[0152] Optionally, the affinity POD may be one or more, which is not limited in this application.

[0153] Optionally, the Operator can also obtain the affinity degree corresponding to each affinity POD (the concept can be referred to above). Accordingly, the affinity information of POD-1 fed back by the Operator may include the affinity PODs that have an affinity relationship with POD-1 and their corresponding affinity degrees (also referred to as affinity degree information or affinity degree information, which is not limited in this application).

[0154] Exemplarily, after acquiring at least one affinity POD corresponding to POD-1, the Operator sends an affinity information response message to NRIPlugin, where the message includes but is not limited to identification information of at least one affinity POD of POD-1.

[0155] S507, NRIPlugin determines the first Numa Node set corresponding to POD-1 based on the affinity information of POD-1.

[0156] Exemplarily, NRIPlugin receives an affinity information response message, and in response to the affinity information response message, obtains at least one affinity POD having affinity with POD-1, for example, obtains identification information of at least one affinity POD of POD-1.

[0157] Next, NRIPlugin can select the first affinity POD (which can be one or more) based on the affinity POD, and further determine the corresponding first Numa Node set, which can include one or more NumaNodes. Among them, the one or more Numa Nodes can optionally include the first Numa Node (which can be one or more) to which the first affinity POD (which can be one or more) belongs.

[0158] Specifically, NRIPlugin can search the database for configuration information of each affinity POD (including but not limited to processor configuration parameters, memory configuration parameters, and device configuration parameters, etc.) based on the identification information of each affinity POD, thereby determining the Numa Node corresponding to each affinity POD.

[0159] In an embodiment of the present application, NRIPlugin may determine the first Numa Node set according to preset conditions.

[0160] Optionally, the preset conditions include but are not limited to at least one of the following:

[0161] 1) There is at least one Numa Node in the Numa Node that satisfies the affinity relationship.

[0162] 2) The remaining resources of Numa Node can meet the needs of the target business.

[0163] 3) The smaller the distance to the Numa Node to which the affinity business belongs, the better.

[0164] 3) The smaller the number of Numa Nodes, the better. For example, if the combination of Numa Node0 and Numa Node1 (for example, the Numa Node is the first Numa Node) can meet the business needs of the target business, and Numa Node1, NumaNode2 and Numa Node3 can also meet the business needs of the target business, the system selects the combination of Numa Node0 and NumaNode1 as the target Numa Node for the target business.

[0165] In a possible implementation, if there are multiple selectable Numa Nodes, for example, when multiple affinity PODs belong to different Numa Nodes, NRIPlugin can be based on Fig. 9 According to the algorithm shown in , a first affinity POD (may be one or more) and its corresponding first Numa Node (may be one Numa Node or a combination of multiple Numa Nodes, which will not be repeated below) are selected.

[0166] In another possible implementation, if there are multiple selectable Numa Nodes, for example, multiple affinity PODs belong to different Numa Nodes, NRIPlugin can select the first affinity POD and its corresponding first Numa Node based on the resource requirements of POD-1, the remaining resources of multiple selectable Numa Nodes, and the affinity levels corresponding to multiple affinity PODs. Among them, the number of first Numa Nodes can be optionally as small as possible. For example, NRIPlugin can set corresponding weight values ​​for the resource requirements of POD-1, the remaining resources of multiple selectable Numa Nodes, and the affinity levels corresponding to multiple affinity PODs, and calculate the first Numa Node based on the weight values. For example, if POD-2 has the highest affinity with POD-1, and POD-3 has a much lower affinity with POD-1 than POD-2, and if the remaining resources of the Numa Node to which POD-3 belongs meet the resource requirements of POD-1, but the remaining resources of the Numa Node to which POD-2 belongs do not meet the resource requirements of POD-1, in one example, NRIPlugin can configure POD-1 to the Numa Node to which POD-3 belongs, to meet the condition that the fewer nodes across Numa Nodes, the better. In another example, NRIPlugin can configure POD-1 to the NumaNode to which POD-2 and POD-3 belong, thereby reducing the number of remote accesses and thus reducing latency. It can be understood that in the scenario where the affinity between POD-1 and POD-2 is high, there are more business interactions between POD-1 and POD-2. If POD-1 is deployed on other NumaNodes, the number of times the Numa Node to which POD-1 belongs accesses the memory of the Numa Node to which POD-2 belongs will increase, which will reduce the throughput. Therefore, when the remaining resources of the Numa Node of the POD with the highest affinity do not meet the resource requirements of POD-1, it can be combined with the Numa Node of other affinity PODs to meet the remaining resources, reduce the number of remote accesses, and improve throughput.

[0167] In another possible implementation, if there are multiple selectable Numa Nodes, for example, multiple affinity PODs belong to different Numa Nodes, NRIPlugin can select the first affinity POD and its corresponding first Numa Node based on the resource requirements of POD-1, the remaining resources of multiple selectable NumaNodes, the affinity levels corresponding to multiple affinity PODs, and the Distance between different Numa Nodes.

[0168] In another possible implementation, if there are multiple selectable Numa Nodes, for example, multiple affinity PODs belong to different Numa Nodes, and none of the multiple selectable Numa Nodes meets the resource requirements of POD-1. In one example, the NRI Plugin can select at least one Numa Node from other Numa Nodes to combine with the Numa Node to which the affinity POD belongs, so as to select the first Numa Node. The selection method can be as follows: Fig. 9 . Optionally, in this example, NRIPlugin can set a priority selection condition, that is, the selected Numa Node combination includes at least one Numa Node to which the affinity POD belongs. Optionally, in some examples, if one Numa Node can meet the resource requirements of POD-1, the Numa Node will give priority to the Numa Node with the smallest distance to the Numa Node to which the affinity POD with the greatest affinity to POD-1 belongs. Optionally, if there are multiple Numa Nodes with the smallest distance, the Numa Nodes can be selected according to the following conditions: Fig. 9 The process selects a Numa Node from other Numa Nodes to reduce the number of Numa Node cross-nodes. It can be understood that in the embodiment of the present application, if there are multiple Numa Nodes determined based on the preset conditions, they can all be selected according to Fig. 9 The process in continues to select the Numa Node deployed on POD-1.

[0169] In another possible implementation, if there is an affinity POD, and the NumaNode to which the affinity POD belongs meets the resource requirements of POD-1, then the affinity POD is the first affinity POD in the embodiment of the present application, and the corresponding Numa Node is the first Numa Node.

[0170] In another possible implementation, if there is an affinity POD, and the NumaNode to which the affinity POD belongs does not meet the resource requirements of POD-1. NRIPlugin can be used as follows Fig. 9 In another example, NRIPlugin can also combine other Numa Nodes with the Numa Nodes to which the affinity POD belongs based on the resource requirements of POD-1, wherein the number of Numa Nodes in the combination still satisfies the requirement that the fewer the better, and / or the smaller the Distance, the better.

[0171] In another possible implementation, if there is no affinity POD with affinity relationship with POD-1 in the system. Optionally, NRIPlugin may send affinity request information to API Sever to request the user to indicate the affinity relationship corresponding to POD-1, and the affinity request information includes but is not limited to the identification information of POD-1. In response to the received affinity request information, API Sever may display prompt information in the user interface provided by the system to prompt the user to indicate the affinity POD with affinity relationship for POD-1. The user may configure the affinity relationship of POD-1 in the user interface, for example, specifying that POD-1 has affinity with POD-2, and API Sever determines that the affinity POD of POD-1 is POD-2 in response to the received user instruction. API Server may send affinity response information to NRIPlugin, and the information may include but is not limited to: identification information of POD-1 and identification information of POD-2, indicating that POD-1 has affinity relationship with POD-2. NRIPlugin responds to the received affinity response information. Determine that the affinity POD with affinity to POD-1 is POD2, and continue to execute the subsequent process. If the user indicates that POD-1 does not have an affinity POD, NRIPlugin can arbitrarily allocate a Numa Node that meets its resource requirements for POD-1. Alternatively, NRIPlugin can follow Fig. 9 Process processing in .

[0172] Optionally, as described above, the Operator may record the affinity information of the POD, that is, during the process of executing the creation process of POD-1, POD-1 may be a business that has been created and deleted before, and the Operator still retains the affinity information of POD-1. Of course, the historical affinity information may be inaccurate. The system in the embodiment of the present application may be based on Figure 7 The dynamic update process in , during the operation of POD-1, dynamically adjusts the NumaNode deployment of POD-1 to make it more in line with the current needs of POD-1 to improve throughput.

[0173] S508, NRIPlugin updated the spec file.

[0174] Exemplarily, after NRIPlugin determines the first Numa Node set corresponding to POD-1, it allocates all or part of the resources of each Numa Node in the first Numa Node to it. It also obtains the spec file of POD-1 from the database, and modifies the configuration information of POD-1 (including processor configuration parameters, memory configuration parameters, device configuration parameters, etc.) according to the resources allocated to POD-1.

[0175] S509, NRIPlugin sends update indication information to the container engine.

[0176] Exemplarily, after NRIPlugin updates the Spec file of POD-1, it sends update indication information to the container engine, where the update indication information is used to indicate that the Spec file (or configuration information) of POD-1 is updated.

[0177] S510: The container engine creates POD-1 based on the updated Spec file.

[0178] Exemplarily, the container engine creates POD-1 based on the updated Spec file to deploy POD-1 to at least one Numa Node in the first Numa Node set.

[0179] Figure 6 For an exemplary affinity relationship deployment diagram, please refer to Figure 6 In the embodiment of the present application, after obtaining the creation task of POD-1, the system can find an affinity POD with affinity relationship based on the affinity relationship of POD-1, such as POD-2. The system can deploy POD-1 to Numa Node1 to which POD-2 belongs, so that two PODs that need to frequently interact with each other can be deployed to the same Numa Node to minimize the number of remote accesses to the Numa Node, thereby improving the service throughput.

[0180] Figure 7 For an exemplary flow chart of dynamically adjusting the configuration information of a service, please refer to Figure 7 , including but not limited to the following steps:

[0181] S701: Topology Manager sends a tuning instruction to Resource-aware Operator.

[0182] Exemplarily, a user may issue a regular update instruction through a user interface, and Topology Manger determines a cycle for dynamic updating of configuration information (which may be set according to actual needs) in response to the received user instruction.

[0183] Optionally, the user may also send an immediate update instruction through the user interface, which may include but is not limited to the range of PODs that need to be updated (such as the identification information of the PODs that need to be updated). In response to the received user instruction, the Topology Manager executes the update on the PODs indicated by the user. Figure 7 The update process in .

[0184] For example, taking periodic update as an example, when Topology Manager detects that the update cycle trigger time has arrived, Topology Manager sends a tuning instruction to Operator, and the tuning instruction is used to instruct to update affinity information. Of course, in some examples, Topology Manager can also instruct to update the affinity information of some PODs, which is not limited in this application.

[0185] S702: The Operator obtains second affinity information based on historical interaction information.

[0186] Exemplarily, as described above, the Operator may obtain historical interaction information in real time or periodically, and based on the historical interaction information, update the recorded affinity relationship of each POD, for example, update the affinity relationship table shown in Table 1.

[0187] In response to the received tuning instruction, the Operator may obtain the second affinity information, which is used to indicate the affinity relationship of each POD currently recorded. The affinity relationship of each POD indicated by the second affinity information may be completely or partially different from the affinity relationship indicated in the first affinity information, but of course they may be the same, which is not limited in this application.

[0188] S703, the Operator feeds back the affinity information of POD-1 to NRIPlugin.

[0189] In one example, the Operator may feed back to NRIPlugin the affinity information of the POD whose affinity has changed. In another example, the Operator may also send to NRIPlugin the affinity information currently corresponding to all PODs, which is not limited in this application.

[0190] Exemplarily, NRI can determine whether the affinity information of each service has changed. In one example, if it has changed, the subsequent configuration change process will continue to be executed. If it has not changed, the configuration of the service will not be modified, that is, the Numa Node of the service remains unchanged.

[0191] In this example, the change of affinity information of POD-1 is used as an example. Operator feeds back affinity information of POD-1 to NRIPlugin. For example, affinity information of POD-1 indicates that the POD with affinity relationship with POD-1 is POD-3. That is, the affinity POD with affinity relationship with POD-1 changes from Figure 6 The POD-2 shown in the figure is changed to POD-3.

[0192] S704, NRIPlugin determines the second Numa Node set corresponding to POD-1 based on the affinity information of POD-1.

[0193] Exemplarily, NRIPlugin can re-determine the second NumaNode set for POD-1 based on the affinity information of POD-1. The Numa Node in the second Numa Node set can be the same as the Numa Node in the first Numa Node set, or they can be completely or partially different, which is not limited in this application. The specific selection method can be referred to above and will not be repeated here.

[0194] S705, NRIPlugin updated the spec file.

[0195] Exemplarily, NRIPlugin determines that the configuration information of POD-1 has changed, and can obtain the spec file of POD-1 from the database, and modify the configuration information corresponding to POD-1. For example, POD-1 is deployed to Numa Node1 when it is created (or after the last dynamic adjustment). During this adjustment (or tuning), NRIPlugin determines that POD-1 is configured on NumaNode0. NRIPlugin can allocate all or part of the resources of Numa Node0 to POD-1 according to the resource requirements of POD-1, and based on the allocation results, modify the configuration information of POD-1 in the Spec file. For example, the processor parameters are changed from Core-3 and Core-4 (the two Cores belong to Numa Node1) to Core-0 and Core-1 (the two Cores belong to Numa Node0). Thus, by modifying the configuration parameters, POD-1 is dynamically adjusted from Numa Node1 to Numa Node0.

[0196] S706, NRIPlugin sends update indication information to the container engine.

[0197] Exemplarily, NRIPlugin sends update indication information to the container engine to indicate that the Spec file of POD-1 is updated. Optionally, the update indication information may include but is not limited to the identification information of POD-1. The container engine may read the updated Spec file of POD-1 from the database and take effect the updated configuration information.

[0198] In a possible implementation, the system can set a migration cycle, and within the migration cycle, the system can set the number of migrations. For example, within each migration cycle, the number of migrations is 1. That is, within the migration cycle, the Numa Node of any POD can only be dynamically adjusted once, thereby avoiding the problem of system instability caused by frequent adjustment of configuration parameters.

[0199] Figure 8 For an exemplary affinity relationship deployment diagram, please refer to Figure 8 In an embodiment of the present application, after obtaining the tuning task of POD-1, the system can find an affinity POD with an affinity relationship based on the affinity relationship of POD-1, such as POD-3. The system can migrate POD-1 from the original Numa Node1 to NumaNode1 to which POD-3 belongs. That is to say, during the operation of POD-1, its affinity relationship has changed, that is, the frequency of business interaction between POD-1 and POD-3 is greater than the frequency of business interaction between POD-2. Thus, through dynamic adjustment, two PODs that need to frequently interact with each other can be deployed in the same Numa Node to minimize the number of remote accesses to the Numa Node and improve business throughput. Of course, the scheme can also gradually improve the rationality of POD deployment. For example, when POD-1 is created, its affinity is historical. During the operation of POD-1, as the running time gradually lengthens, the affinity relationship obtained by the system becomes more and more accurate, and the rationality of its deployment becomes higher and higher, thereby effectively improving the system throughput.

[0200] Fig. 9 is a schematic diagram of a flow chart of a preset algorithm shown as an example. In the embodiment of the present application, Fig. 9 The preset algorithms shown can be used with Figure 4 or Figure 5 In some instances, Fig. 9 The process in can also be used independently to select the appropriate Numa Node for the target business. Fig. 9 , including but not limited to:

[0201] S901, NRIPlugin sends Numa Node set -1 to Topology Manager.

[0202] Exemplarily, as described above, when selecting Numa Node, NRIPlugin may obtain multiple optional Numa Nodes (for example, recorded as Numa Node set-1), and NRIPlugin may call the preset algorithm of Topology Manager to select the first Numa Node set or the second Numa Node set described above.

[0203] NRIPlugin sends Numa Node set-1 to Topology Manager, and the combination may include but is not limited to identification information of each sent Numa Node set-1.

[0204] In the embodiment of the present application, Numa Node set-1 includes Numa Nodes to which the affinity POD having affinity with POD-1 belongs, and / or at least one Numa Node with the smallest distance to the Numa Node to which the affinity POD having affinity belongs (also referred to as optional Numa Node, for example, may have the smallest distance, which can be obtained by Fig. 9 The process in further selects the appropriate Numa Node).

[0205] S902a, Topology Manager requests CPU Hits (object) from CPU Manager.

[0206] Exemplarily, the Topology Manager requests the CPU Manager for the CPU Hits of each NumaNode in the Numa Node set-1.

[0207] S902b, the CPU Manager feeds back CPU Hits to the Topology Manager.

[0208] S903a, Topology Manager requests Mem Hits from Memory (abbreviated as Mem) Manager.

[0209] Exemplarily, the Topology Manager requests the Mem Manager for the Mem Hits of each NumaNode in the Numa Node set-1.

[0210] S903b, Mem Manager feeds back Mem Hits to Topology Manager.

[0211] For example:

[0212] Table 2

[0213] NUMA0 NUMA1 NUMA2 MEM(G) 1 1 2 Core 1 8 10

[0214] Table 2 shows Mem Hits and CPU Hits by way of example, wherein each value in the table represents the remaining resources of the processor (also understood as the processor core) and memory of the corresponding NumaNode.

[0215] S904, Topology Manager merges hits and obtains Numa Node set -2.

[0216] In this example, there are 3 Numa Nodes, so the length of the hit object is 3 bits. When the value of each bit is 1, it means that the combination needs to use this NUMA node. Among them, the position in the hit corresponds to the sequence number of the Numa Node from small to large from low to high. For example, the lowest bit in the hit corresponds to Numa Node0. For example, if a combination that satisfies a 3-core CPU is NUMA0+NUMA1, then the hit value is

[011] .

[0217] Exemplarily, when merging Hits, Topology Manager can obtain Numa Node Set-2 based on the resource requirements of POD-1 and the preset conditions set in the embodiment of the present application. For example, if the resource requirements of POD-1 are 3 Cores and 3G memory, at least two Numa Nodes are required to meet them. In the embodiment of the present application, the combination of two Numa Nodes is used as an example for explanation. Both single Numa and multiple Numa Node situations can be implemented in this way, and this application will not give examples one by one.

[0218] For an example, please refer to Table 3:

[0219] Table 3

[0220] MEM

[101]

[011] CPU

[110]

[101]

[011]

[0221] The Topology Manager can obtain Table 3 based on the resource requirements of POD-1 and the available memory and CPU resources of each Numa Node. For example,

[101] of MEM means that the combination of Numa Node0 and Numa Node2 can meet the memory resource requirements of POD-1.

[0222] The Topology Manager calculates the MEM and CPU combinations based on the above hits to get a total of C 3 2= 6 hits combinations, as shown in Table 4. When the binary is consistent, it means that the resource matches, that is, this combination is available.

[0223] Table 4

[0224] MEM

[101]

[101]

[101]

[011]

[011]

[011] CPU

[110]

[101]

[011]

[110]

[101]

[011] Availability False True False False False True

[0225] As shown in Table 4, the Numa Node combination represented by

[101] and

[011] is available, forming Numa Node Set-2.

[101] represents the combination of Numa Node0 and Numa Node2, and

[011] represents the combination of Numa Node0 and NumaNode1.

[0226] In one possible implementation, if the obtained Numa Node combination in Numa Node set-2 does not include any Numa Node belonging to any affinity POD having affinity with POD-1, the Topology Manager can expand the number of Numa Node combinations to increase the probability of including Numa Nodes belonging to affinity PODs in Numa Node set-2, so that Numa Node set-2 can always include at least one combination of Numa Nodes belonging to affinity PODs.

[0227] S905, Topology Manager selects Numa Node set-3 with the shortest distance from Numa Node set-2.

[0228] Exemplarily, the Topology Manager may select at least one Numa Node combination with the shortest Distance from Numa Node Set-2 to form Numa Node Set-3.

[0229] In a possible implementation, the Topology Manager may also select at least one Numa Node combination including the Numa Node to which the affinity POD belongs and having the shortest Distance to form Numa Node set-3.

[0230] In some examples, if during the processing, there is one and only one combination in Numa Node Set-2 or Numa Node Set-3, then the combination is the target hit, that is, the target Numa Node.

[0231] S906, Topology Manager selects a target NumaNode from Numa Node set-3 according to a preset algorithm.

[0232] In the embodiment of the present application, the Topology Manager may be configured with at least one preset algorithm, including but not limited to at least one of the following:

[0233] 1) Bin packing algorithm.

[0234] Select the target Numa Node according to the Numa Node sequence number, from small to large or from large to small. Alternatively, you can prioritize filling up the Numa Nodes to which the affinity POD belongs, and then select the target Numa Node according to the sequence number, from small to large or from large to small. This will minimize Numa Node fragmentation.

[0235] For example:

[0236] Assume that the current Numa Node set-3 includes: a combination of Numa Node0 and Numa Node1, and a combination of NumaNode2 and Numa Node1. Among them, Numa Node1 can optionally be the Numa Node to which the affinity POD belongs.

[0237] In an example, the Topology Manager can first occupy all the resources of Numa Node1 according to the resource requirements of POD-1, and then allocate all or part of the resources of Numa Node0 to POD-1.

[0238] In another example, the Topology Manager may first occupy all the resources of NumaNode0 in ascending order, and then allocate all or part of the resources of Numa Node1 to POD-1.

[0239] 2) Load balancing algorithm: When allocating resources, select one or more Numa Nodes with the lowest resource load as the target Numa Node. This avoids the problem of excessive pressure on a Numa Node, which leads to reduced business performance.

[0240] For example:

[0241] The Topology Manager may obtain the load status of each Numa Node combination in the Numa Node set-3. The Topology Manager may select a Numa Node combination with the lowest load as the target Numa Node.

[0242] 3) Task aggregation algorithm.

[0243] The Topology Manager can determine whether the CPU resource demand of POD-1 is greater than a preset threshold based on the CPU resource demand of POD-1 (only the CPU is used as an example for explanation, of course, it can also be understood as processor resource demand, CPU core resource demand or processor core resource demand, which is not limited in this application). Among them, the preset threshold can be set by the Topology Manager according to the resource environment in the system, or it can be set by the user, which is not limited in this application. Optionally, the preset threshold can be dynamically adjusted, which is not limited in this application.

[0244] In an example, if the CPU resource demand of POD-1 is greater than or equal to the preset threshold, it can be understood that POD-1 is a large task, and the load balancing algorithm can be called to select the target Numa Node.

[0245] In another example, if the CPU resource demand of POD-1 is less than or equal to the preset threshold, it can be understood that POD-1 is a small task, and the packing algorithm can be called to select the target Numa Node. This can avoid deploying small tasks and large tasks to the same Numa Node to minimize the business interference of small tasks on large tasks. Among them, business interference can optionally be that multiple businesses access the same cache, and one business clears the data in the cache of another business, causing the other business to re-read the data from the memory, resulting in the performance of the business being reduced.

[0246] S907, Topology Manager feeds back the result to NRIPlugin.

[0247] For example, after Topology Manager obtains the target Numa Node, it may send the target Numa Node (including one or more) to NRIPlugin. After NRIPlugin obtains the target Numa Node, it may update the configuration information of POD-1.

[0248] Optionally, Fig. 9 All or part of the steps performed by the Topology Manager in can also be performed by NRIPlugin, which is not limited in this application.

[0249] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the interaction between various network elements. It can be understood that in order to realize the above functions, the access device includes hardware structures and / or software modules corresponding to the execution of various functions. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed in this document, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0250] The embodiment of the present application can divide the access device into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0251] In the case where each functional module is divided into each functional module according to each function, Fig.10 A possible structural diagram of the service configuration device 1000 involved in the above embodiment is shown. Fig.10 As shown, the service configuration device may include: an acquisition module 1001, used to acquire first affinity information based on historical interaction information between services, the first affinity information being used to indicate the affinity relationship between services; a determination module 1002, used to determine whether there is an affinity service having affinity with the target service based on the first affinity information; a configuration module 1003, used to configure the target service to a first target sub-node, wherein the first target sub-node includes a first sub-node and / or a second sub-node, the first sub-node being a sub-node to which the first affinity service having affinity with the target service belongs, and the second sub-node being a sub-node whose delay with the first sub-node meets a preset condition.

[0252] In one possible implementation, the acquisition module 1001 is also used to acquire second affinity information based on historical interaction information between the services up to the current time; the determination module 1002 is also used to determine whether the affinity service having affinity with the target service has changed based on the second affinity information; the configuration module 1003 is also used to configure the target service to the second target sub-node if the affinity service having affinity with the target service changes from the first affinity service to the second affinity service; the second target sub-node includes a third sub-node and / or a fourth sub-node, wherein the third sub-node is a sub-node to which the second affinity service belongs, and the fourth sub-node is a sub-node whose delay with the third sub-node satisfies a preset condition.

[0253] In a possible implementation, the configuration module 1003 is specifically used to: modify the first configuration parameter of the target service to a second configuration parameter; wherein the first configuration parameter is used to indicate that the target service is deployed on the first target subnode, and the second configuration parameter is used to indicate that the target service is deployed on the second target subnode.

[0254] In a possible implementation, the first subnode and the second subnode belong to the same node Node, and resources in the Node are allocated to the first subnode and the second subnode, and the resources include processor resources, memory resources, and device resources.

[0255] In a possible implementation, the node is a non-uniform memory access Numa architecture, and the first child node and the second child node are non-uniform memory access nodes Numa Node.

[0256] In a possible implementation manner, the first affinity information is further used to indicate the affinity degree between services having an affinity relationship, wherein the affinity degree between the first affinity service and the target service is the highest.

[0257] In one possible implementation, when the first subnode meets the resource requirements of the target business, the first target subnode is the first subnode; or, when the first subnode does not meet the resource requirements of the target business and there is a subnode that meets the resource requirements of the target business in the node to which the first subnode belongs, the first target subnode is the second subnode, and the second subnode is a subnode that meets the resource requirements of the target business and the delay between the second subnode and the first subnode meets a preset condition; or, when no single subnode meets the resource requirements of the target business, the first target subnode is a combination of the first subnode and the second subnode, and the resources of the combination of the first subnode and the second subnode meet the resource requirements of the target business.

[0258] In one possible implementation, if there are multiple affinity services that have affinity with the target service, and the multiple affinity services belong to different sub-nodes, the configuration module 1003 is specifically used to: obtain the resource usage of each sub-node among the multiple sub-nodes corresponding to the multiple affinity services; based on the resource usage of each sub-node, determine the first target sub-node from the multiple sub-nodes that meet the resource requirements of the target service.

[0259] In one possible implementation, the configuration module 1003 is specifically used to: based on a packing algorithm, select the subnode with the smallest sequence number as the first target subnode from the subnodes that meet the resource requirements of the target business; or, based on a load balancing algorithm, select the subnode with the smallest load as the first target subnode from the subnodes that meet the resource requirements of the target business; or, based on the resource requirements of the target business, determine whether the resource requirements of the target business are greater than a preset resource threshold; if the resource requirements of the first target business are greater than the preset resource threshold, determine the first target subnode based on the load balancing algorithm; if the resource requirements of the first target business are less than or equal to the preset resource threshold, determine the first target subnode based on the packing algorithm.

[0260] In another example, Fig.11 A schematic block diagram of a service configuration device 1100 of an embodiment of the present application is shown. The service configuration device may include: a processor 1101 and a transceiver / transceiver pin 1102, and optionally, a memory 1103. The processor 1101 may be used to execute the steps performed by the service configuration device or Kubelet in each method of the aforementioned embodiment, and control the receiving pin to receive a signal, and control the sending pin to send a signal.

[0261] The components of the service configuration device 1100 are coupled together via a bus 1104, wherein the bus system 1104 includes a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, various buses are labeled as the bus system 1104 in the figure.

[0262] Optionally, the memory 1103 may be used to store instructions in the aforementioned method embodiments.

[0263] It should be understood that the business configuration device 1100 according to the embodiment of the present application may correspond to the computer device in the various methods of the aforementioned embodiments, and the above-mentioned and other management operations and / or functions of the various elements in the business configuration device 1100 are respectively for implementing the corresponding steps of the aforementioned methods, which will not be repeated here for the sake of brevity.

[0264] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.

[0265] Based on the same technical concept, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. The computer program includes at least one code segment, and the at least one code segment can be executed by a computer device to control the computer device to implement the above method embodiment.

[0266] Based on the same technical concept, the embodiment of the present application also provides a computer program, which, when executed by a computer device, is used to implement the above method embodiment.

[0267] The program may be stored in whole or in part on a storage medium packaged together with the processor, or may be stored in whole or in part on a memory not packaged together with the processor.

[0268] Based on the same technical concept, the embodiment of the present application further provides a processor, which is used to implement the above method embodiment. The above processor can be a chip.

[0269] The steps of the method or algorithm described in conjunction with the disclosure of the embodiments of the present application can be implemented in a hardware manner, or can be implemented by a processor executing a software instruction. The software instruction can be composed of corresponding software modules, and the software module can be stored in a random access memory (Random Access Memory, RAM), a flash memory, a read-only memory (Read Only Memory, ROM), an erasable programmable read-only memory (Erasable Programmable ROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), a register, a hard disk, a mobile hard disk, a read-only compact disk (CD-ROM) or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor.

[0270] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0271] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A service configuration method, characterized in that: include: Acquire first affinity information based on historical interaction information between services, where the first affinity information is used to indicate an affinity relationship between the services; Based on the first affinity information, determining whether there is an affinity service having affinity with the target service; The target service is configured to a first target subnode, wherein the first target subnode includes a first subnode and / or a second subnode, the first subnode is a subnode to which a first affinity service having affinity with the target service belongs, and the second subnode is a subnode whose delay with the first subnode meets a preset condition.

2. The method according to claim 1, characterized in that The method further comprises: Based on historical interaction information between services up to the present, second affinity information is obtained; Based on the second affinity information, determining whether an affinity service having affinity to the target service changes; If the affinity service having affinity with the target service changes from the first affinity service to the second affinity service, the target service is configured to the second target sub-node; the second target sub-node includes a third sub-node and / or a fourth sub-node, wherein the third sub-node is the sub-node to which the second affinity service belongs, and the fourth sub-node is the sub-node whose delay with the third sub-node satisfies the preset condition.

3. The method according to claim 2, characterized in that The configuring the target service to the second target sub-node includes: Modify the first configuration parameter of the target service to a second configuration parameter; wherein the first configuration parameter is used to indicate that the target service is deployed on the first target sub-node, and the second configuration parameter is used to indicate that the target service is deployed on the second target sub-node.

4. The method according to claim 1, characterized in that The first sub-node and the second sub-node belong to the same node, and resources in the node are allocated to the first sub-node and the second sub-node, and the resources include processor resources, memory resources, and device resources.

5. The method according to claim 4, characterized in that The node is a non-uniform memory access Numa architecture, and the first child node and the second child node are non-uniform memory access nodes Numa Node.

6. The method according to claim 1, characterized in that The first affinity information is further used to indicate the affinity between services having an affinity relationship, wherein the affinity between the first affinity service and the target service is the highest.

7. The method according to claim 1, characterized in that In a case where the first sub-node meets the resource requirement of the target service, the first target sub-node is the first sub-node; or, In a case where the first subnode does not meet the resource requirement of the target service, and there is a subnode that meets the resource requirement of the target service in the node to which the first subnode belongs, the first target subnode is the second subnode, and the second subnode is a subnode among the subnodes that meet the resource requirement of the target service, and the delay between the second subnode and the first subnode meets the preset condition; or, When no single subnode meets the resource requirements of the target service, the first target subnode is a combination of the first subnode and the second subnode, and the resources of the combination of the first subnode and the second subnode meet the resource requirements of the target service.

8. The method according to claim 1, characterized in that If there are multiple affinity services having affinity with the target service, and the multiple affinity services belong to different subnodes, configuring the target service to the first target subnode includes: Obtaining resource usage of each of the multiple subnodes corresponding to the multiple affinity services; Based on the resource usage of each sub-node, the first target sub-node is determined from the sub-nodes that meet the resource requirements of the target service among the multiple sub-nodes.

9. The method according to claim 8, characterized in that The determining the first target subnode from the subnodes that meet the resource requirements of the target service among the multiple subnodes includes: Based on a bin packing algorithm, selecting a subnode with a smallest sequence number from the subnodes that meet the resource requirements of the target service as the first target subnode; or, Based on the load balancing algorithm, selecting a subnode with the smallest load from the subnodes that meet the resource requirements of the target service as the first target subnode; or, Based on the resource demand of the target business, determine whether the resource demand of the target business is greater than a preset resource threshold; if the resource demand of the first target business is greater than the preset resource threshold, determine the first target subnode based on the load balancing algorithm; if the resource demand of the first target business is less than or equal to the preset resource threshold, determine the first target subnode based on the packing algorithm.

10. A service configuration device, characterized in that: include: An acquisition module, configured to acquire first affinity information based on historical interaction information between services, wherein the first affinity information is used to indicate an affinity relationship between services; A determination module, configured to determine whether there is an affinity service having affinity with the target service based on the first affinity information; A configuration module is used to configure the target service to a first target subnode, wherein the first target subnode includes a first subnode and / or a second subnode, the first subnode is a subnode to which a first affinity service having affinity with the target service belongs, and the second subnode is a subnode whose delay with the first subnode meets a preset condition.

11. The device according to claim 10, characterized in that The acquisition module is further used to acquire second affinity information based on historical interaction information between services up to the present; The determination module is further used to determine whether the affinity service having affinity with the target service changes based on the second affinity information; The configuration module is also used to configure the target service to a second target subnode if the affinity service having affinity with the target service changes from the first affinity service to the second affinity service; the second target subnode includes a third subnode and / or a fourth subnode, wherein the third subnode is a subnode to which the second affinity service belongs, and the fourth subnode is a subnode whose delay with the third subnode satisfies the preset condition.

12. The device according to claim 11, characterized in that The configuration module is specifically used for: Modify the first configuration parameter of the target service to a second configuration parameter; wherein the first configuration parameter is used to indicate that the target service is deployed on the first target sub-node, and the second configuration parameter is used to indicate that the target service is deployed on the second target sub-node.

13. The device according to claim 10, characterized in that The first sub-node and the second sub-node belong to the same node, and resources in the node are allocated to the first sub-node and the second sub-node, and the resources include processor resources, memory resources, and device resources.

14. The device according to claim 13, characterized in that The node is a non-uniform memory access Numa architecture, and the first child node and the second child node are non-uniform memory access nodes Numa Node.

15. The device according to claim 10, characterized in that The first affinity information is further used to indicate the affinity between services having an affinity relationship, wherein the affinity between the first affinity service and the target service is the highest.

16. The device according to claim 10, characterized in that In a case where the first sub-node meets the resource requirement of the target service, the first target sub-node is the first sub-node; or, In a case where the first subnode does not meet the resource requirement of the target service, and there is a subnode that meets the resource requirement of the target service in the node to which the first subnode belongs, the first target subnode is the second subnode, and the second subnode is a subnode among the subnodes that meet the resource requirement of the target service, and the delay between the second subnode and the first subnode meets the preset condition; or, When no single subnode meets the resource requirements of the target service, the first target subnode is a combination of the first subnode and the second subnode, and the resources of the combination of the first subnode and the second subnode meet the resource requirements of the target service.

17. The device according to claim 10, characterized in that If there are multiple affinity services having affinity with the target service, and the multiple affinity services belong to different sub-nodes, the configuration module is specifically used to: Obtaining resource usage of each of the multiple subnodes corresponding to the multiple affinity services; Based on the resource usage of each sub-node, the first target sub-node is determined from the sub-nodes that meet the resource requirements of the target service among the multiple sub-nodes.

18. The device according to claim 17, characterized in that The configuration module is specifically used for: Based on a bin packing algorithm, selecting a subnode with a smallest sequence number from the subnodes that meet the resource requirements of the target service as the first target subnode; or, Based on the load balancing algorithm, selecting a subnode with the smallest load from the subnodes that meet the resource requirements of the target service as the first target subnode; or, Based on the resource demand of the target business, determine whether the resource demand of the target business is greater than a preset resource threshold; if the resource demand of the first target business is greater than the preset resource threshold, determine the first target subnode based on the load balancing algorithm; If the resource demand of the first target service is less than or equal to the preset resource threshold, the first target sub-node is determined based on the bin packing algorithm.

19. A computer program product, characterized in that When the computer program product is executed on a computer device, the computer device is caused to execute the method according to any one of claims 1 to 9.

Citation Information

Cited By

  • Service configuration method and apparatus

    WO2026051415A1