Resource binding method, electronic equipment and storage medium

By determining the target binding strategy in the processor architecture, the network card interface of the interrupt request is bound to the processor resources in the same resource node, which solves the problem of poor network performance in the existing technology and achieves improved network performance and resource utilization.

CN120832222APending Publication Date: 2025-10-24ALIBABA CLOUD COMPUTING CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410471667.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-18
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

In the prior art, in computing services, processor resources are only bound sequentially according to interrupt numbers, resulting in poor network performance.

Method used

By determining the target binding strategy, the network card interface corresponding to the interrupt request and the processor resource to be bound to the interrupt request are placed in the same resource node of the processor architecture for resource binding, thus avoiding cross-resource node allocation.

Benefits of technology

It improves network performance and solves the problem of poor network performance. It is applicable to a variety of computer instance specifications and improves resource utilization and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120832222A_ABST
    Figure CN120832222A_ABST
Patent Text Reader

Abstract

The invention discloses a resource binding method, electronic equipment and a storage medium. The method comprises the steps that in response to an interrupt request to be processed of a target instance, a target binding strategy is determined, and the target binding strategy is used for determining that a network card interface corresponding to the interrupt request and processor resources to be bound with the interrupt request are located in the same resource node of a processor architecture; and carrying out resource binding processing on the interrupt request according to the target binding strategy to obtain a binding processing result. The technical problem of poor network performance caused by sequential binding of processor resources only according to the interrupt number in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer technology and cloud computing technology, in particular to a resource binding method, an electronic device and a storage medium. BACKGROUND

[0002] In a computing service (such as a cloud computing service), when a computer instance processes an interrupt request, a resource sequential binding is usually performed according to an interrupt number corresponding to the interrupt request and a topology of a processor resource. However, this resource binding mode cannot be applied to various computer instance specifications in a computing scenario, and is often prone to the problem of uneven distribution of resource loads, thereby causing poor network performance of the computing service.

[0003] At present, no effective solution has been proposed for the above problems. SUMMARY

[0004] Embodiments of the present application provide a resource binding method, an electronic device and a storage medium, to at least solve the technical problem of poor network performance caused by processor resource sequential binding according to only an interrupt number in the related art.

[0005] According to an aspect of an embodiment of the present application, a resource binding method is provided, including: in response to an interrupt request to be processed by a target instance, determining a target binding strategy, wherein the target binding strategy is used to determine that a network card interface corresponding to the interrupt request and a processor resource to be bound by the interrupt request are in a same resource node of a processor architecture; performing resource binding processing for the interrupt request according to the target binding strategy, to obtain a binding processing result.

[0006] According to another aspect of an embodiment of the present application, a resource binding method is also provided, including: receiving a resource binding request from a client, wherein request data carried in the resource binding request includes an interrupt request to be processed by a target instance; determining a target binding strategy based on the interrupt request, and performing resource binding processing for the interrupt request according to the target binding strategy, to obtain a binding processing result, wherein the target binding strategy is used to determine that a network card interface corresponding to the interrupt request and a processor resource to be bound by the interrupt request are in a same resource node of a processor architecture; and feeding back the resource binding result to the client.

[0007] According to a further aspect of the embodiments of the present application, a resource binding method is also provided, comprising: obtaining a resource binding request through a first application programming interface, wherein the request data carried in the resource binding request comprises an interrupt request to be processed by a target instance; returning a resource binding response through a second application programming interface, wherein the response data carried in the resource binding response comprises a binding processing result, the binding processing result being obtained by performing resource binding processing on the interrupt request according to a target binding strategy, the target binding strategy being determined according to the interrupt request, and the target binding strategy being used to determine that a network card interface corresponding to the interrupt request and a processor resource to be bound by the interrupt request are in a same resource node of a processor architecture.

[0008] According to a further aspect of the embodiments of the present application, a resource binding system is also provided, comprising: a resource module comprising a network card device and a processor resource, a network card interface of the network card device being used at least to send an interrupt request to a target instance, and the processor resource being configured in a plurality of resource nodes of a processor architecture; a memory storing an executable program; and a processor configured to run the program, wherein the program performs any of the resource binding methods when running.

[0009] According to a further aspect of the embodiments of the present application, an electronic device is also provided, comprising: a memory storing an executable program; and a processor configured to run the program, wherein the program performs any of the resource binding methods when running.

[0010] According to a further aspect of the embodiments of the present application, a computer readable storage medium is also provided, comprising a stored executable program, wherein the computer readable storage medium performs any of the resource binding methods when the executable program runs.

[0011] According to a further aspect of the embodiments of the present application, a computer program product is also provided, comprising a computer program, the computer program implementing any of the resource binding methods when executed by a processor.

[0012] In the embodiment of the present application, the target binding strategy is determined in response to the interrupt request to be processed by the target instance, wherein the target binding strategy is used to determine that the network card interface corresponding to the interrupt request and the processor resource to be bound by the interrupt request are in the same resource node of the processor architecture; further, resource binding processing is performed for the interrupt request according to the target binding strategy, and a binding processing result is obtained. Therefore, when the processor resource is bound for the interrupt request, the present application can ensure that the allocated processor resource and the network card interface corresponding to the interrupt request are in the same resource node in the processor architecture, and avoid the case of cross-resource node allocation of the processor resource, so as to achieve the purpose of considering the network card interface position to bind the processor resource for the interrupt request, thereby realizing the technical effect of improving the network performance, and further solving the technical problem of poor network performance caused by the sequential binding of the processor resource according to the interrupt number in the related art.

[0013] It is easy to note that the general description above and the detailed description below are only for exemplifying and explaining the present application, and do not constitute a limitation on the present application. BRIEF DESCRIPTION OF DRAWINGS

[0014] The drawings described herein are used to provide further understanding of the present application, constitute a part of the present application, and the illustrative embodiments of the present application and the description thereof are used to explain the present application, and do not constitute an improper limitation on the present application. In the drawings:

[0015] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a resource binding method is shown;

[0016] Figure 2 An embodiment of the computer terminal (or mobile device) shown in the figure is used as a sending end or a receiving end; Figure 1 An embodiment of the computer terminal (or mobile device) shown in the figure is used as a sending end or a receiving end;

[0017] Figure 3 A flowchart of a resource binding method according to the embodiment 1 of the present application is shown;

[0018] Figure 4 A schematic diagram of an optional binding mapping relationship according to the embodiment 1 of the present application is shown;

[0019] Figure 5 A schematic diagram of an optional binding mapping relationship according to the embodiment 1 of the present application is shown;

[0020] Figure 6 A schematic diagram of an optional binding mapping relationship according to the embodiment 1 of the present application is shown;

[0021] Figure 7 A schematic diagram of an optional binding mapping relationship according to the embodiment 1 of the present application is shown;

[0022] Figure 8 is a schematic diagram of an optional binding mapping relationship according to Embodiment 1 of the present application;

[0023] Figure 9 is a flow chart of another resource binding method according to Embodiment 1 of the present application;

[0024] Figure 10 is a flow chart of a resource binding method according to Embodiment 2 of the present application;

[0025] Figure 11 is a flow chart of a resource binding method according to Embodiment 3 of the present application;

[0026] Figure 12 is a structural schematic diagram of a resource binding apparatus according to Embodiment 4 of the present application;

[0027] Figure 13 is a structural schematic diagram of another resource binding apparatus according to Embodiment 4 of the present application;

[0028] Figure 14 is a structural block diagram of an electronic device according to Embodiment 5 of the present application. DETAILED DESCRIPTION

[0029] In order to make the personnel in the art better understand the present application, 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. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.

[0030] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] First, some of the nouns or terms appearing in the description of the embodiments of the present application are applicable to the following explanations:

[0032] Network card interrupt affinity startup script: As a service startup script during user access to the elastic computing service, it can achieve resource affinity binding startup for interrupt requests.

[0033] Network queue: refers to a queue for receiving network data. In application scenarios, in order to improve network performance, the network card is usually set to include multiple queue pairs (also known as multi-queue), each queue pair includes a receive queue (Receive, abbreviated as rx) and a transmit queue (Transmit, abbreviated as tx), and multi-queue can help fully utilize the performance of multi-core processors.

[0034] Interrupt mechanism: refers to the mechanism of the network card sending an interrupt request to request binding of processor resources. Each interrupt request corresponds to an interrupt number.

[0035] Non-uniform memory access (Non-Uniform Memory Access, abbreviated as NUMA) architecture: a design for processor and memory architecture, which plays an important role in cloud computing. NUMA architecture is usually used in multi-processor systems to improve system performance and scalability, grouping processors and memories into multiple resource nodes to reduce processor-to-memory access latency.

[0036] Instance specification: refers to the configuration of a computer instance. The specification information of the instance specification includes: the number of central processing units (Central Processing Unit, abbreviated as CPU), the size of the memory, the number of network card queues, etc.

[0037] Network transmission speed: usually represented by the number of network data packets transmitted per second (packets per second, abbreviated as PPS), which is one of the important indicators for measuring network performance.

[0038] Network card interrupt affinity: refers to the distribution between the network card interrupt and the CPU. Different interrupts can be configured on different CPUs, and when an interrupt occurs, the corresponding CPU can be triggered to process the corresponding interrupt.

[0039] Processor logical core (CPU core sibling): refers to the logical core corresponding to each physical core in a multi-core processor, which is achieved through hyper-threading technology. Hyper-threading technology allows a physical core to execute multiple threads simultaneously, thereby improving the concurrency and throughput of the processor.

[0040] Interrupt request (Interrupt Request, abbreviated as IRQ): refers to the mechanism of the network card device sending an interrupt signal to the CPU through the network card interface.

[0041] Embodiment 1

[0042] According to the embodiments of the present application, a resource binding method is also provided. It should be noted that the steps shown in the flowchart can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in a different order.

[0043] The method provided by the embodiment of the present application can be executed in a mobile terminal, a computer terminal or similar computing device. Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing the resource binding method is shown. As shown in the figure, Figure 1 The computer terminal 10 (or mobile device 10) can include one or more processors 102 (the processor 102 can include but is not limited to a microcontroller unit (MCU) or a field programmable gate array (FPGA) processing device), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, the computer terminal 10 can also include a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports of the computer bus), a network interface, a cursor control device (such as a mouse, touchpad, etc.), a keyboard, a power supply and / or a camera.

[0044] Those skilled in the art can understand that, Figure 1 The structure shown is only a schematic, which does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 can include more or less components than Figure 1 shown, or have a different configuration than Figure 1 shown.

[0045] It should be noted that the one or more processors 102 and / or other data processing circuits described above can be referred to herein as "data processing circuits" in general. The data processing circuit can be embodied in whole or in part as software, hardware, firmware or any combination thereof. In addition, the data processing circuit can be a single independent processing module, or any one of the other elements combined into the computer terminal 10 (or mobile device) in whole or in part. As referred to in the embodiments of the present application, the data processing circuit serves as a processor control (for example, selection of a variable resistance terminal path connected to an interface).

[0046] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the resource binding method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above-mentioned resource binding method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0047] The transmission device 106 is configured to connect to a network via a network interface to receive or transmit data. Specific examples of the aforementioned network may include a wired and / or wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In one embodiment, the transmission device 106 may be a radio frequency (RF) module configured to communicate with the Internet wirelessly.

[0048] like Figure 1 The display shown may be, for example, a touch screen liquid crystal display (LCD), which enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0049] Figure 1 The hardware structure block diagram shown can be used not only as an exemplary block diagram of the computer terminal 10 (or mobile device), but also as an exemplary block diagram of the server. In an optional embodiment, Figure 2 Shows the use of Figure 1 The computer terminal (or mobile device) shown in FIG. 1 is a schematic diagram of an embodiment of a transmitting end or a receiving end. Figure 2As shown, the computer terminal 10 (or mobile device) can be connected to one or more servers (e.g., security servers, resource servers, game servers, etc.) via a data network connection or an electronic connection. In an optional embodiment, the computer terminal 10 (or mobile device) can be any mobile computing device, etc. The data network connection can be a local area network connection, a wide area network connection, an Internet connection, or other types of data network connections. The computer terminal 10 (or mobile device) can be configured to connect to a network service executed by one server (e.g., a security server) or a group of servers 20. The network server is a network-based user service, such as a social network, a cloud resource, an email, an online payment, or other online applications.

[0050] In the above operating environment, the present application provides a resource binding method as shown in Figure 3 Figure 3 is a flowchart of a resource binding method according to Embodiment 1 of the present application, as shown in Figure 3

[0051] Step S31, in response to an interrupt request to be processed by a target instance, determining a target binding strategy, wherein the target binding strategy is used to determine that a network card interface corresponding to the interrupt request and a processor resource to be bound by the interrupt request are in the same resource node of a processor architecture;

[0052] Step S32, performing resource binding processing for the interrupt request according to the target binding strategy to obtain a binding processing result.

[0053] The target instance can be an instance in a cloud computing service. The cloud computing service can be used to provide resource binding services for computer instances in a predetermined application field. The predetermined application field can include but is not limited to: e-commerce field, electronic game field, scientific computing field, big data analysis field and enterprise service application field. The complex and variable scene requirements in the above application fields will generate cloud computing instances of various specifications. For any one of the target instances, the method provided by the present application can be used to generate a target binding strategy when processing an interrupt request in the target instance, determine the processor resource to be bound according to the target binding strategy, and bind the processor resource to the interrupt request, so as to realize sending the cloud computing task corresponding to the interrupt request to the processor resource for running. The interrupt request sent through the network card interface is also called network card interrupt request.

[0054] ​​In particular, the target binding strategy is used to determine that the network interface corresponding to the interrupt request and the processor resource to which the interrupt request is to be bound are in the same resource node of the processor architecture, that is, considering the position of the network interface corresponding to the interrupt request in the network, a target resource node is determined in the processor architecture, a target processor resource is selected from the processor resources deployed in the target resource node, and the target processor resource is taken as the processor resource to which the request queue of the interrupt request is to be bound. On this basis, the target binding strategy can be regarded as a mapping relationship between the interrupt request (or the interrupt number corresponding to the interrupt request) and the target processor resource. Through the target binding strategy generated by the embodiment of the present application, it can be determined which processor resources are to be bound to the interrupt request currently to be processed by the target instance.

[0055] In a specific application scenario, the processor architecture can be a symmetric multiprocessing (SMP) architecture, a NUMA architecture, or the like. The processor resource to be bound can be at least one of the following categories: a central processing unit (CPU) resource, a graphics processing unit (GPU) resource, and a processor memory resource.

[0056] In some computer system architectures (or processor architectures), multiple processors or computing nodes are allowed to share memory, and the memory is divided into multiple nodes, each of which is associated with a specific processor or CPU. This means that each processor can access the memory associated with its local node more quickly, while access to other nodes will be slower. In some cases of application scenarios, the CPUs in the NUMA can not be continuous, which means that in some specifications, the CPU bound for the interrupt request can be located in different NUMA nodes. When memory access is performed across NUMA nodes, network performance is affected, and access speed is relatively slow. To this end, the method provided by the embodiment of the present application can be used to generate a binding strategy by considering the position of the network interface corresponding to the interrupt request and the position of the CPU and the memory in the processor architecture, so as to ensure that the CPU bound for the interrupt request and the network peripheral device are in the same NUMA node, thereby avoiding the problem of memory access across NUMA nodes, thereby improving access speed and enhancing network performance.

[0057] According to the steps S31 to S32, in the embodiment of the present application, the target binding strategy is determined in response to the interrupt request to be processed by the target instance, wherein the target binding strategy is used to determine that the network card interface corresponding to the interrupt request and the processor resource to be bound by the interrupt request are in the same resource node of the processor architecture; further, the resource binding processing is performed on the interrupt request according to the target binding strategy, and the binding processing result is obtained. Therefore, when the processor resource is bound for the interrupt request, the present application can ensure that the allocated processor resource and the network card interface corresponding to the interrupt request are in the same resource node in the processor architecture, and avoid the case of cross-resource node allocation of the processor resource, so as to achieve the purpose of considering the network card interface position to bind the processor resource for the interrupt request, thereby realizing the technical effect of improving the network performance, and further solving the technical problem of poor network performance caused by the sequential binding of the processor resource according to the interrupt number in the related art.

[0058] In an optional embodiment, in step S31, the target binding strategy is generated in response to the interrupt request to be processed by the target instance, including the following method steps:

[0059] Step S311, in response to the interrupt request to be processed by the target instance in the cloud computing service, determining the target position of the network card interface corresponding to the interrupt request in the processor architecture;

[0060] Step S312, determining a plurality of candidate processors from the target resource node corresponding to the target position in the processor architecture;

[0061] Step S313, generating the target binding strategy based on the plurality of candidate processors.

[0062] In the above optional embodiment, in the cloud computing service, when the target instance needs to allocate a processor resource through a network communication request, that is, when the network card interface or the data packet is sent, the above interrupt request is triggered. When the above interrupt request is detected, the target position of the network card peripheral corresponding to the network card PCIe which sends the interrupt request in the processor architecture is determined.

[0063] In an exemplary application scenario, when the above processor architecture is a NUMA architecture, the position (i.e., the target position) of the network card peripheral corresponding to the network card PCIe which sends the above interrupt request is considered, and further, the NUMA node in which the network card peripheral is located is determined as the target resource node, and the processors in the target resource node which are in an available state are determined as the plurality of candidate processors. It should be noted that the candidate processors can be determined by recording the identifiers of the processors in the available state, and the above available state can be a processor state in which no fault occurs and no computing task is running.

[0064] For example, in a certain NUMA architecture processor system, the currently available processor resources in the resource node node1 include CPU1, CPU3, and CPU5, and the network card peripheral corresponding to the interrupt request IRQ1 to be processed by the target instance is located in the resource node node1, and the CPUs 1, 3, and 5 are determined as the plurality of candidate processors, and the target binding strategy corresponding to the interrupt request IRQ1 is generated based on the plurality of candidate processors.

[0065] Based on the above optional embodiment, in the process of generating the target binding strategy, the position of the network card peripheral corresponding to the interrupt request is fully considered, so that the processor resources to be bound determined for the interrupt request are ensured to be located in the same resource node as the network card peripheral, thereby avoiding the problem of poor network performance caused by the network card peripheral and the processor resources being located in different resource nodes (also known as cross-node affinity binding).

[0066] In an optional embodiment, in step S313, the target binding strategy is generated based on the plurality of candidate processors, and further includes the following method steps:

[0067] In step S3131, the instance specification of the target instance is obtained, wherein the instance specification at least includes a first quantity and a second quantity, the first quantity is the number of processors configured for the target instance, and the second quantity is the number of request queue pairs when the target instance performs multi-queue processing.

[0068] In step S3132, the target binding strategy is generated based on the first quantity, the second quantity, and the plurality of candidate processors.

[0069] In the above optional embodiment, the instance specification of the target instance can be determined by the cloud computing resource demand corresponding to the computing task in the application scenario. In the instance specification of the target instance, the first quantity can represent the number of processors to be configured, or can represent the number of processor cores, the processor model, etc. of the instance. Each request queue pair includes a sending queue (tx) and a receiving queue (rx), and the second quantity can be the number of request queue pairs.

[0070] In addition, in the application scenario, the instance specification of the target instance considered can also include other specification information, for example: memory specification information (such as the memory capacity corresponding to the processor), storage specification information (such as the storage capacity and storage type of the instance), network specification information (such as the network bandwidth, network type, and IP address configuration of the instance), operating system specification information (such as the operating system type and operating system version supported by the instance), and performance specification information (such as security specification, availability specification, backup specification, etc.).

[0071] Since the applicable affinity binding strategies for interrupt request processing of instances of different specifications are usually different, based on the above-mentioned optional embodiment, the instance specification of the target instance is obtained as one of the considerations in generating the target binding strategy, which can make the above-mentioned scheme provided by the present application applicable to computer instances of multiple specifications in a cloud computing service scenario.

[0072] In the above-mentioned optional embodiment, based on the number of processors corresponding to the target instance, the number of request queue pairs, and the plurality of candidate processors, the target binding strategy is generated. Specifically, the number of processors and the number of request queue pairs can determine the specification category of the target instance, so that different types of target binding strategies are generated for interrupt request pairs to be processed by target instances of different specification categories.

[0073] For example, in a cloud computing service scenario, based on the number of processors and the number of request queue pairs, the target instance can be divided into small-specification instances, medium-specification instances, and large-specification instances. Further, a strict alignment affinity binding strategy is usually adopted for small-specification instances to ensure that these small-specification instances can run on the same physical server, thereby reducing communication delay and improving performance. A loose alignment affinity binding strategy is usually adopted for medium-specification instances, allowing these medium-specification instances to run on the same physical server or the same rack (i.e., no need for strict alignment binding). A random affinity binding strategy is usually adopted for large-specification instances, allowing these large-specification instances to run on any server within the entire server system to meet the flexibility and scalability of large-scale computing requirements.

[0074] Based on the above-mentioned optional embodiment, in the process of generating the target binding strategy for the interrupt request, the instance specification of the target instance is considered by the first number and the second number, and therefore, resource binding according to the target binding strategy in response to the interrupt request can make the resource affinity binding result meet the requirements of application scenarios of different instance specifications, improve resource binding flexibility, improve resource utilization, save costs, and be adaptable to flexible adjustment of instance specifications in actual application, with strong scalability.

[0075] In an optional embodiment, in step S3132, the target binding strategy is generated based on the first number, the second number, and the plurality of candidate processors, including the following method steps:

[0076] Step S3133, determining the binding mapping relationship corresponding to the interrupt request according to the ratio of the first number and the second number, wherein the binding mapping relationship is used to determine the ordering alignment strategy of the request queue pair of the interrupt request and the plurality of candidate processors;

[0077] Step S3134, generating the target binding strategy based on the binding mapping relationship and the plurality of candidate processors.

[0078] In the optional embodiment described above, according to the ratio of the first quantity and the second quantity, the alignment relationship of the request queue pair and the plurality of candidate processors in the resource binding process can be determined. According to the actual application scenario, the ratio of the first quantity and the second quantity usually includes 1:1, 2:1, 4:1, 8:1, and in particular, sometimes the ratio of the first quantity and the second quantity is a special value, for example, 3:2, 5:3, and the like.

[0079] According to the above scheme provided by the embodiments of the present application, when the ratio of the first quantity and the second quantity is different, different alignment strategies are adopted to adjust the alignment relationship of the request queue pair and the processor, so as to generate a target binding strategy based on the alignment adjustment result of the request queue pair and the plurality of candidate processors. Specifically, the target binding strategy can be used to represent which request queue pair is bound to which processor resource for running.

[0080] In an optional embodiment, in step S3132, according to the ratio of the first quantity and the second quantity, the binding mapping relationship corresponding to the interrupt request is determined by one of the following method steps:

[0081] In step S341, in response to the ratio being a first preset value, the binding mapping relationship is determined as: the request queue pair is aligned with one processor.

[0082] In step S342, in response to the ratio being a second preset value, the binding mapping relationship is determined as: the sending queue or the receiving queue in the request queue pair is respectively aligned with one thread in the processor.

[0083] In step S343, in response to the ratio being a third preset value, the binding mapping relationship is determined as: the sending queue or the receiving queue in the request queue pair is respectively aligned with the first processor thread in a group of processor threads, and the number of processors in the group of processors is determined by the third preset value.

[0084] In step S344, in response to the ratio being a fourth preset value, the binding mapping relationship is determined as: after a plurality of request queue pairs are respectively aligned with one processor, the remaining processors in the plurality of candidate processors that do not have an alignment relationship are aligned with the first request queue pair in the plurality of request queue pairs.

[0085] In an exemplary embodiment, according to the instance specification of the target instance, when the ratio of the number of processors and the number of request queue pairs is a first preset value, which is 1:1 in this example, a target binding strategy is generated for the interrupt request to be processed by the target instance, and the binding mapping relationship determined as shown in Figure 4 is that one request queue pair is aligned with one processor. Specifically, as shown in Figure 4As shown, the multiple candidate processors in the resource node where the network card peripheral corresponding to the interrupt request is located include: CPU1, CPU2, CPU3 and CPU4. Taking the first request queue in the multiple request queue pairs as an example, the first request queue pair includes a sending queue (denoted as tx1) and a receiving queue (denoted as rx1). At this time, according to the strategy of aligning each request queue pair with a processor, the multiple request queue pairs and the multiple candidate processors are aligned and adjusted, and the following is obtained: Figure 4 The sorting results are shown.

[0086] In an exemplary embodiment, according to the instance specifications of the target instance, when the ratio of the number of processors to the number of request queue pairs is a second preset value, in this example, the second preset value is 2:1, then when generating a target binding policy for the interrupt request to be processed by the target instance, the binding mapping relationship determined is as follows: Figure 5 As shown, a queue (which can be a send queue or a receive queue) is aligned with a thread of the processor.

[0087] Based on hyperthreading technology, each processor's physical core can correspond to multiple logical cores, that is, a processor core (CPU core) can execute multiple threads (sibling) at the same time. Figure 5 As shown, the multiple candidate processors (here considering the hyperthreading situation) in the resource node where the network card peripheral corresponding to the interrupt request is located include: CPU1sibling, CPU2 sibling, and each CPU sibling includes 2 threads (it should be noted that the 2 threads in each CPU sibling can be 2 adjacent continuous threads or 2 non-adjacent jump threads). Taking the first request queue in multiple request queue pairs as an example, the first request queue pair includes a sending queue (denoted as tx1) and a receiving queue (denoted as rx1). At this time, according to the strategy of aligning each queue with a processor thread, the multiple request queue pairs and the multiple candidate processors are aligned and adjusted, and the following is obtained: Figure 5 The sorting results are shown.

[0088] Similarly, when the second preset value is 4:1, the binding mapping relationship determined above is as follows: Figure 6 As shown in , a queue (which can be a send queue or a receive queue) is aligned with a thread of the processor. Figure 6As shown in the figure, the multiple candidate processors (in this case, hyper-threading is considered) in the resource node where the network card peripheral corresponding to the interrupt request is located include: CPU1 sibling, CPU2 sibling, each CPU sibling including 2 threads. Taking the first request queue in the multiple request queue pairs as an example, the first request queue pair includes a sending queue (denoted as tx1) and a receiving queue (denoted as rx1), at this time, the multiple request queue pairs and the multiple candidate processors are aligned and adjusted according to the strategy of aligning each queue with a processor thread, to obtain the sorting result as shown in the figure. Figure 6

[0089] In an exemplary embodiment, according to the instance specification of the target instance, when the ratio of the number of processors to the number of request queue pairs is a third preset value, in this case, the third preset value is 8:1, then when generating the target binding strategy for the interrupt requests to be processed by the target instance, the binding mapping relationship determined is that each queue is aligned with the first processor thread in a group of processor threads, as shown in the figure. Figure 7 Figure 7 As shown in the figure, the multiple candidate processors (in this case, hyper-threading is considered) in the resource node where the network card peripheral corresponding to the interrupt request is located include: CPU1 sibling, CPU2 sibling, CPU3 sibling, CPU4 sibling, each CPU sibling including 2 threads. The 8 threads of the above 4 CPU siblings are divided into 2 groups, each group including 4 threads. Taking the first request queue in the multiple request queue pairs as an example, the first request queue pair includes a sending queue (denoted as tx1) and a receiving queue (denoted as rx1), at this time, the sending queue tx1 is aligned with the first thread in the first group of threads in CPU1, and the receiving queue rx1 is aligned with the first thread in the second group of threads in CPU1, to obtain the sorting result as shown in the figure. Figure 7

[0090] It is easy to note that in this application, in the process of generating the target binding strategy, not only the location of the network card peripheral corresponding to the interrupt request and the instance specification of the target instance are considered, but also the multi-thread alignment problem in the CPU under different instance specifications is considered, which can make the resource binding scheme have the processing capability for the sibling continuous and jumping cases under the hyper-threading technology, and further make the load scheduling distribution in the resource binding result more uniform.

[0091] In an exemplary embodiment, according to the instance specification of the target instance, when the ratio of the number of processors to the number of request queue pairs is a fourth preset value, in this case, the fourth preset value is 3:2, then when generating the target binding strategy for the interrupt requests to be processed by the target instance, the binding mapping relationship determined is that each queue is aligned with the first processor thread in a group of processor threads, as shown in the figure.​​​Figure 8 As shown, first, the plurality of request queue pairs are respectively aligned with a processor, second, the remaining processors in the plurality of candidate processors which do not exist alignment relationship are determined, further, the remaining processors are aligned with the first request queue pair in the plurality of request queue pairs, or the remaining processors are repeatedly aligned with the plurality of request queues.

[0092] Specifically, as shown, the interrupt request includes 2 request queue pairs (denoted as tx1 / rx1 and tx2 / rx2), and the plurality of candidate processors in the resource node where the network card peripheral corresponding to the interrupt request is located include: CPU1, CPU2 and CPU3. At this time, after the request queue pair tx1 / rx1 is aligned with CPU1 and the request queue pair tx2 / rx2 is aligned with CPU2, the remaining processor CPU3 is in an available state, in order to avoid resource waste, CPU3 can be aligned with the request queue pair tx1 / rx1, that is, at this time, the request queue pair tx1 / rx1 is repeatedly aligned (after binding, CPU1 and CPU3 can run the calculation task corresponding to the request queue pair tx1 / rx1) with two CPUs, thereby obtaining the sorting result as shown. Figure 8 Figure 8

[0093] In addition, when the fourth preset value is 5:3, similarly, the interrupt request includes 3 request queue pairs (denoted as tx1 / rx1, tx2 / rx2 and tx3 / rx3), and the plurality of candidate processors in the resource node where the network card peripheral corresponding to the interrupt request is located include: CPU1, CPU2, CPU3, CPU4 and CPU5. At this time, after the request queue pair tx1 / rx1 is aligned with CPU1, the request queue pair tx2 / rx2 is aligned with CPU2, and the request queue pair tx3 / rx3 is aligned with CPU3, the remaining processors CPU4 and CPU5 are in an available state, in order to avoid resource waste, CPU4 can be aligned with the request queue pair tx1 / rx1, and CPU5 can be aligned with the request queue pair tx2 / rx2, that is, at this time, the request queue pair tx1 / rx1 and the request queue pair tx2 / rx2 are repeatedly aligned with two CPUs respectively, thereby obtaining the sorting result.

[0094] Based on the above optional embodiments, according to different ratios, different alignment strategies are adopted to align the plurality of request queue pairs corresponding to the interrupt request with the plurality of candidate processors, and the target binding strategy can be generated according to the sorting result, so that the network card interface and the processor resource to be bound are ensured to be in the same resource node according to the target binding strategy.

[0095] In an optional embodiment, in step S3133, the target binding strategy is generated based on the binding mapping relationship and the plurality of candidate processors, including the following method steps:​​

[0096] In step S3134, at least one target processor to be bound to the request queue pair is determined from the plurality of candidate processors according to the binding mapping relationship.

[0097] In step S3135, a target binding strategy is generated according to the topological position of the target processor in the target resource node.

[0098] In the optional embodiment described above, the processor aligned with the request queue pair is determined as the target processor to be bound to the request queue pair according to the binding mapping relationship, and further, the target binding strategy is generated according to the topological position of the target processor in the target resource node. That is, the target binding strategy is used to determine the binding correspondence between the request queue pair and the topological position of the processor.

[0099] In an optional embodiment, in step S3135, the target binding strategy is generated according to the topological position of the target processor in the target resource node, including the following method steps:

[0100] In step S3136, first affinity binding information is obtained, wherein the first affinity binding information includes an initial array common to cloud computing instances of multiple specifications in a cloud computing service corresponding to the target instance, and a plurality of array elements in the initial array correspond to a plurality of processors in a processor architecture, and the plurality of array elements are used to represent the binding relationship between the cloud computing instance and the plurality of processors.

[0101] In step S3137, based on the topological position, the element value at the array index position corresponding to the topological position in the first affinity binding information is adjusted to generate the target binding strategy.

[0102] In the optional embodiment described above, the first affinity binding information is an initial array determined based on an affinity binding rule, and the affinity binding rule is determined by an interrupt request interrupt number and a hexadecimal bitmap (hex bitmap) of a processor resource. For example, the hexadecimal bitmap of the processor resource corresponding to the interrupt request with the interrupt number 216 is represented as the following 32-bit data "00000000, 00000000, 00000000, 00000800", corresponding to 32x4=128 CPUs, and the affinity is set to the value 8 at the 3rd position from the right, which indicates that the corresponding CPU position is the 11th (the initial position is the 0th), and at this time, the processor resource to be bound by the interrupt request corresponding to the interrupt number 216 is the 11th CPU.

[0103] In an exemplary application scenario, the number of array elements of the initial array can be determined by the number of processors deployed in the cloud computing server. Each element in the initial array is initialized to 0. The initial data can be universal for cloud computing instances of multiple specifications. Based on the initial array, the topology position of the processor to be bound in the processor architecture is determined according to the method steps of the preceding method of the application for the interrupt request, the corresponding array index position of the processor in the initial data is determined, and the array element at the array index position is adjusted to 1. The target array obtained after the initial array is adjusted can be used to represent the target binding result, that is, according to the target array corresponding to the interrupt request, the processor corresponding to the array element with a value of 1 in the target array is bound to the interrupt request.

[0104] Based on the optional embodiment, the affinity binding strategy is represented by an array universal for cloud computing instances of multiple specifications, so that the resource binding scheme provided by the embodiment has stronger scalability. When a new instance specification appears in the application scenario, the resource binding scheme provided by the embodiment can still be easily extended and applied.

[0105] In an optional embodiment, in step S32, resource binding processing is performed for the interrupt request according to the target binding strategy to obtain a binding processing result, including the following method steps:

[0106] In step S321, target processor resources are determined from the processor architecture according to the target binding strategy, and the target processor resources are bound to the interrupt request to obtain a binding processing result, wherein the processor architecture is a non-uniform memory access architecture, and the target processor resources at least include central processing unit core resources.

[0107] In the optional embodiment, when the processor architecture is a NUMA architecture, the CPU core and the CPU memory of the interrupt request to be bound to the target instance are determined according to the target binding strategy. After the CPU core and the CPU memory are bound to the interrupt request, a binding processing result is obtained.

[0108] In an optional embodiment, the resource binding method further includes the following method steps:

[0109] In step S351, the multiple array elements in the target binding strategy are subjected to base conversion and character concatenation processing to obtain binding display information.

[0110] In step S352, the binding display information is displayed on a graphical user interface.

[0111] According to the optional embodiments, after any of the method steps provided in the embodiments of the present application, the binding strategy can be visualized, that is, the user can print the target binding strategy at any time during the resource binding process. The target binding strategy is embodied by a target array, the multiple array elements in the target array are converted (for example, from hexadecimal to binary), and the conversion results are spliced to obtain the binding display information. After the binding display information is displayed on the graphical user interface, the user can determine the currently generated target binding strategy according to the string of the binding display information. Thus, according to the optional embodiments, the user can check the target binding strategy at any time, and the resource binding process can be debugged and updated.

[0112] In an optional embodiment, the resource binding method further includes the following method steps:

[0113] Step S36, in response to the change event of the instance specification of the target instance, the target binding strategy is regenerated according to the first quantity and the second quantity in the changed instance specification.

[0114] Based on the optional embodiments, in an exemplary application scenario, the user may change the request queue corresponding to the interrupt request, that is, the instance specification corresponding to the target instance is changed. At this time, the changed instance specification is obtained, and the target binding strategy is regenerated according to the method steps provided in the embodiments of the present application, and the resource binding processing is performed again for the changed interrupt request.

[0115] In the above running environment, the present application also provides a resource binding method for the cloud computing service application scenario. Figure 9 As shown in FIG. 1, the resource binding method includes the following steps. Figure 9 is a flowchart of another resource binding method according to Embodiment 1 of the present application, which includes the following steps. Figure 9 As shown in FIG. 1, the resource binding method includes the following steps.

[0116] Step S91, receiving a resource binding request from a client, wherein the request data carried in the resource binding request includes: an interrupt request to be processed by a target instance;

[0117] Step S92, determining a target binding strategy based on the interrupt request, and performing resource binding processing on the interrupt request according to the target binding strategy to obtain a binding processing result, wherein the target binding strategy is used to determine that the network card interface corresponding to the interrupt request and the processor resource to be bound by the interrupt request are in the same resource node of the processor architecture;

[0118] Step S93, feeding back the resource binding result to the client.

[0119] In the cloud computing service scenario, according to the above method steps, the client sends a resource binding request to the cloud server, further, the cloud server determines a target binding strategy based on the interrupt request corresponding to the resource binding request, and then performs resource binding processing on the interrupt request, and further feeds back the binding processing result to the client. Therefore, in the cloud computing service scenario, according to the above method steps, a resource binding function is provided for the cloud computing server, so that the cloud computing server can provide resource binding services for the client according to the target binding strategy, and ensure that the network card interface corresponding to the interrupt request and the processor resource to be bound by the interrupt request are in the same resource node of the processor architecture.

[0120] In an optional embodiment, in step S92, the target binding strategy is determined based on the interrupt request, including the following method steps:

[0121] Step S941, obtaining the target position of the network card interface corresponding to the interrupt request in the processor architecture;

[0122] Step S942, determining a plurality of candidate processors from the target resource node corresponding to the target position in the processor architecture;

[0123] Step S943, obtaining the instance specification of the target instance, wherein the instance specification at least includes a first number and a second number, the first number is the number of processors configured for the target instance, and the second number is the number of request queue pairs when the target instance performs multi-queue processing;

[0124] Step S944, generating a target binding strategy based on the first number, the second number and the plurality of candidate processors.

[0125] Based on the above optional embodiment, in the process of generating the target binding strategy for the interrupt request, the instance specification of the target instance is considered by the above first number and second number. Therefore, according to the target binding strategy, the resource binding in response to the interrupt request can make the resource affinity binding result meet the needs of different instance specification application scenarios, improve the resource binding flexibility, improve the resource utilization rate, save the cost, and in actual application, it can adapt to the flexible adjustment of the instance specification, and has strong scalability.

[0126] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0127] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the action sequence described, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0128] Those skilled in the art can clearly understand the method according to the above-mentioned embodiments can be realized by means of software and necessary general hardware platform, and of course, it can also be realized by hardware through the description of the above embodiments. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk) and includes a number of instructions to make a terminal device (which can be a mobile phone, a computer, a server, or a network device) execute the method described in each embodiment of the present application.

[0129] Embodiment 2

[0130] In the running environment as in Embodiment 1, the present application provides another resource binding method as shown in Figure 10 . Figure 10 is a flowchart of a resource binding method according to Embodiment 2 of the present application, as shown in Figure 10 , the resource binding method comprises:

[0131] Step S1001, obtaining a resource binding request through a first application programming interface, wherein the request data carried in the resource binding request includes: an interrupt request to be processed by a target instance;

[0132] Step S1002, returning a resource binding response through a second application programming interface, wherein the response data carried in the resource binding response includes: a binding processing result, the binding processing result is obtained by performing resource binding processing on the interrupt request according to a target binding strategy, the target binding strategy is determined according to the interrupt request, and the target binding strategy is used to determine that the network card interface corresponding to the interrupt request and the processor resource to be bound by the interrupt request are in the same resource node of the processor architecture.

[0133] The target instance can be a service instance in a cloud computing service. According to the method steps, a method for implementing a resource binding cloud service is provided, which is run on a cloud server. The cloud server obtains a resource binding request sent by a service invoker through a first application programming interface, and based on an interrupt request to be processed by a target instance in a cloud computing service carried by the resource binding request, executes a resource binding process, thereby obtaining a binding processing result. Further, the cloud server returns a resource binding response to the service invoker through a second application programming interface, so as to provide the binding processing result to the service invoker.

[0134] The cloud computing service can be applied to providing resource binding services for computer instances in a preset application field. The preset application field can include, but is not limited to, an e-commerce field, an electronic game field, a scientific computing field, a big data analysis field, and an enterprise service application field. The complex and changeable scene requirements in the application field can generate cloud computing instances of various specifications. For any target instance, the method provided by the embodiments of the present application can be used to generate a target binding strategy when the target instance processes an interrupt request, determine a processor resource to be bound according to the target binding strategy, and bind the processor resource to the interrupt request, so as to implement sending a cloud computing task corresponding to the interrupt request to a processor resource.

[0135] In particular, the target binding strategy is used to determine that a network card interface corresponding to the interrupt request and the processor resource to be bound by the interrupt request are in the same resource node of a processor architecture, that is, considering the location of the network card interface corresponding to the interrupt request in the network, a target resource node is determined in the processor architecture, a target processor resource is selected from the processor resources deployed in the target resource node, and the target processor resource is used as a processor resource to be bound to a request queue of the interrupt request. On this basis, the target binding strategy can be regarded as a mapping relationship between the interrupt request (or an interrupt number corresponding to the interrupt request) and the target processor resource. Through the target binding strategy generated by the embodiments of the present application, it can be determined which processor resources are bound to the interrupt request to be processed by the target instance currently.

[0136] In a specific application scenario, the processor architecture can be a symmetric multiprocessing (SMP) architecture, a NUMA architecture, etc. The processor resource to be bound can be at least one of the following categories: a central processing unit (CPU) resource, a graphics processing unit (GPU) resource, and a processor memory resource.

[0137] In some computer system architectures (or processor architectures), multiple processors or computing nodes are allowed to share memory, which is divided into multiple nodes, each of which is associated with a specific processor or CPU. This means that each processor can access the memory associated with its local node more quickly, while access to other nodes will be slower. In some cases of application scenarios, the CPUs in NUMA may not be continuous, which means that in some specifications, the CPU bound to the interrupt request may be located in different NUMA nodes. When accessing memory across NUMA nodes, network performance is affected, and access is relatively slow. To this end, the method provided by the embodiments of the present application can be used to generate a binding strategy by considering the location of the network card interface corresponding to the interrupt request and the location of the CPU and memory in the processor architecture, so as to ensure that the CPU bound to the interrupt request and the network card peripheral are in the same NUMA node, thereby avoiding the problem of memory access across NUMA nodes, thereby improving access speed and enhancing network performance.

[0138] According to the above steps S1001 to S1002, in the embodiments of the present application, the target binding strategy is determined in response to the interrupt request to be processed by the target instance, wherein the target binding strategy is used to determine that the network card interface corresponding to the interrupt request and the processor resource to be bound by the interrupt request are in the same resource node of the processor architecture; further, resource binding processing is performed for the interrupt request according to the target binding strategy, and a binding processing result is obtained. Thus, when binding the processor resource for the interrupt request, the present application can ensure that the allocated processor resource and the network card interface corresponding to the interrupt request are in the same resource node in the processor architecture, and avoid the case of allocating the processor resource across the resource nodes, so as to achieve the purpose of considering the location of the network card interface to bind the processor resource for the interrupt request, thereby realizing the technical effect of improving network performance, and further solving the technical problem of poor network performance caused by only sequentially binding the processor resource according to the interrupt number in the related art.

[0139] It should be noted that the preferred embodiments of the present embodiment can refer to the related description in Embodiment 1, which will not be repeated here.

[0140] Embodiment 3

[0141] In the running environment as in Embodiment 1, the present application provides another resource binding method as shown in Figure 11 . Figure 11 is a flowchart of a resource binding method according to Embodiment 3 of the present application, as shown in Figure 11 , the resource binding method comprises:

[0142] Step S1101, obtaining a current input resource binding session request, wherein the request data carried in the resource binding session request includes: an interrupt request to be processed by a target instance;

[0143] In response to the resource binding dialogue request, a resource binding dialogue reply is returned, wherein the response data carried in the resource binding response includes a binding processing result, the binding processing result being obtained by performing resource binding processing on the interrupt request according to a target binding strategy, the target binding strategy being determined according to the interrupt request, and the target binding strategy being used to determine that the network card interface corresponding to the interrupt request and the processor resource to be bound by the interrupt request are in the same resource node of the processor architecture.

[0144] In step S1103, the binding processing result is displayed in the graphical user interface.

[0145] The target instance can be a service instance in cloud computing services. According to the above method steps, a visualization scheme for resource binding functions is provided. The terminal device provides a graphical user interface, and the graphical user interface displays at least a resource binding scene. The display content of the graphical user interface further includes input components (such as text input boxes, voice input controls, etc.) and display components (such as text display windows). The user inputs a resource binding dialogue request through the input component to specify the interrupt request to be processed by the target instance in the resource binding task. After detecting the input behavior of the user, the resource binding process is performed based on the interrupt request, and the binding processing result is obtained. Further, the binding processing result is displayed through the display component in the graphical user interface.

[0146] The cloud computing services can be applied to providing resource binding services for computer instances in a preset application field. The preset application field can include but is not limited to the e-commerce field, the electronic game field, the scientific computing field, the big data analysis field, and the enterprise service application field. The complex and variable scene requirements in the above application fields will generate cloud computing instances of various specifications. For any target instance, the method provided in the embodiments of the present application can be used to generate a target binding strategy when the target instance processes an interrupt request, to determine the processor resource to be bound according to the target binding strategy, and to bind the processor resource to the interrupt request, so as to realize sending the cloud computing task corresponding to the interrupt request to the processor resource for running.

[0147] In particular, the target binding strategy is used to determine that the network interface corresponding to the interrupt request and the processor resource to which the interrupt request is to be bound are in the same resource node of the processor architecture, that is, considering the position of the network interface corresponding to the interrupt request in the network, a target resource node is determined in the processor architecture, a target processor resource is selected from the processor resources deployed in the target resource node, and the target processor resource is taken as the processor resource to which the request queue of the interrupt request is to be bound. On this basis, the target binding strategy can be regarded as a mapping relationship between the interrupt request (or the interrupt number corresponding to the interrupt request) and the target processor resource. Through the target binding strategy generated by the embodiment of the present application, it can be determined which processor resources are to be bound to the interrupt request currently to be processed by the target instance.

[0148] In a specific application scenario, the processor architecture can be a symmetric multiprocessing (SMP) architecture, a NUMA architecture, or the like. The processor resource to be bound can be at least one of the following categories: a central processing unit (CPU) resource, a graphics processing unit (GPU) resource, and a processor memory resource.

[0149] In some computer system architectures (or processor architectures), multiple processors or computing nodes are allowed to share memory, and the memory is divided into multiple nodes, each of which is associated with a specific processor or CPU. This means that each processor can access the memory associated with its local node more quickly, while access to other nodes will be slower. In some cases of application scenarios, the CPUs in the NUMA can not be continuous, which means that in some specifications, the CPU bound for the interrupt request can be located in different NUMA nodes. When memory access is performed across NUMA nodes, network performance is affected, and access speed is relatively slow. To this end, the method provided by the embodiment of the present application can be used to generate a binding strategy by considering the position of the network interface corresponding to the interrupt request and the position of the CPU and the memory in the processor architecture, so as to ensure that the CPU bound for the interrupt request and the network peripheral device are in the same NUMA node, thereby avoiding the problem of memory access across NUMA nodes, thereby improving access speed and enhancing network performance.

[0150] According to the steps S1101 to S1103, in the embodiment of the present application, the target binding strategy is determined in response to the interrupt request to be processed by the target instance, wherein the target binding strategy is used to determine that the network card interface corresponding to the interrupt request and the processor resource to be bound by the interrupt request are in the same resource node of the processor architecture; further, resource binding processing is performed on the interrupt request according to the target binding strategy, and a binding processing result is obtained. Therefore, when the processor resource is bound for the interrupt request, the present application can ensure that the allocated processor resource and the network card interface corresponding to the interrupt request are in the same resource node in the processor architecture, and avoid the case of cross-resource node allocation of the processor resource, so as to achieve the purpose of considering the network card interface position to bind the processor resource for the interrupt request, thereby realizing the technical effect of improving the network performance, and further solving the technical problem of poor network performance caused by the sequential binding of the processor resource according to the interrupt number in the related art.

[0151] It should be noted that the preferred embodiments of the present embodiment can refer to the related description in Embodiment 1, which will not be repeated here.

[0152] Embodiment 4

[0153] According to the embodiments of the present application, an apparatus embodiment for implementing the above resource binding method is also provided. Figure 12 is a structural schematic diagram of a resource binding apparatus according to Embodiment 4 of the present application, as shown in Figure 12 The apparatus comprises:

[0154] The generating module 1201 is configured to determine a target binding strategy in response to an interrupt request to be processed by a target instance, wherein the target binding strategy is used to determine that a network card interface corresponding to the interrupt request and a processor resource to be bound by the interrupt request are in the same resource node of a processor architecture.

[0155] The binding module 1202 is configured to perform resource binding processing on the interrupt request according to the target binding strategy, and obtain a binding processing result.

[0156] Optionally, the generating module 1201 is further configured to determine a target position of a network card interface corresponding to an interrupt request to be processed by a target instance in a processor architecture; determine a plurality of candidate processors from a target resource node corresponding to the target position of the processor architecture; and generate a target binding strategy based on the plurality of candidate processors.

[0157] Optionally, the generation module 1201 is further configured to: obtain an instance specification of the target instance, wherein the instance specification comprises at least a first quantity and a second quantity, the first quantity is a quantity of processors configured for the target instance, and the second quantity is a quantity of pairs of request queues when the target instance performs multi-queue processing; and generate the target binding strategy based on the first quantity, the second quantity, and the plurality of candidate processors.

[0158] Optionally, the generation module 1201 is further configured to: determine, according to a ratio of the first quantity and the second quantity, a binding mapping relationship corresponding to the interrupt request, wherein the binding mapping relationship is used to determine a sorting alignment strategy of a pair of request queues of the interrupt request and the plurality of candidate processors; and generate the target binding strategy based on the binding mapping relationship and the plurality of candidate processors.

[0159] Optionally, the generation module 1201 is further configured to: in response to the ratio being a first preset value, determine that the binding mapping relationship is that the pair of request queues is aligned with one processor; in response to the ratio being a second preset value, determine that the binding mapping relationship is that a sending queue or a receiving queue in the pair of request queues is respectively aligned with one thread in the processor; in response to the ratio being a third preset value, determine that the binding mapping relationship is that the sending queue or the receiving queue in the pair of request queues is respectively aligned with a first processor thread in a group of processor threads, and a quantity of processors in the group of processors is determined by the third preset value; and in response to the ratio being a fourth preset value, determine that the binding mapping relationship is that, after a plurality of pairs of request queues are respectively aligned with one processor, a remaining processor in the plurality of candidate processors that does not have an alignment relationship is aligned with a first pair of request queues in the plurality of pairs of request queues.

[0160] Optionally, the generation module 1201 is further configured to: determine, according to the binding mapping relationship, at least one target processor to be bound to the pair of request queues from the plurality of candidate processors; and generate the target binding strategy according to a topology position of the target processor in the target resource node.

[0161] Optionally, the generation module 1201 is further configured to: obtain first affinity binding information, wherein the first affinity binding information comprises an initial array that is common to cloud computing instances of a plurality of specifications in a cloud computing service corresponding to the target instance, a plurality of array elements in the initial array correspond to a plurality of processors in a processor architecture, and the plurality of array elements are used to represent a binding relationship between the cloud computing instance and the plurality of processors; and generate the target binding strategy by adjusting a value of an element at an array index position corresponding to the topology position in the first affinity binding information based on the topology position.

[0162] Optionally, the binding module 1202 is further configured to determine a target processor resource from the processor architecture according to the target binding policy, and bind the target processor resource to the interrupt request to obtain a binding processing result, wherein the processor architecture is a non-uniform memory access architecture, and the target processor resource at least includes a central processing unit core resource.

[0163] Optionally, in addition to all the above-mentioned modules, the resource binding apparatus further includes a display module 1203 (not shown in the figure), configured to perform base conversion and character splicing processing on the plurality of array elements in the target binding policy to obtain binding display information, wherein the binding display information is used for display through a graphical user interface.

[0164] Optionally, in addition to all the above-mentioned modules, the resource binding apparatus further includes an update module 1204 (not shown in the figure), configured to, in response to a change event of an instance specification of the target instance, regenerate the target binding policy according to the first quantity and the second quantity in the changed instance specification.

[0165] It should be noted that the generation module 1201 and the binding module 1202 correspond to steps S31 to S33 in Embodiment 1, and the two modules have the same instances and application scenarios as the corresponding steps, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above-mentioned modules or units can be hardware components or software components stored in the memory (for example, the memory 104) and processed by one or more processors (for example, the processors 102a, 102b, …, 102n), and the above-mentioned modules can also be a part of the device and can run in the computer terminal 10 provided in Embodiment 1.

[0166] According to the embodiments of the present application, a device embodiment for implementing the resource binding method in Embodiment 2 is also provided. Figure 13 is another resource binding apparatus structure diagram according to Embodiment 4 of the present application, as shown in Figure 13 The apparatus includes:

[0167] The acquisition module 1301 is configured to acquire a resource binding request through a first application programming interface, wherein the request data carried in the resource binding request includes an interrupt request to be processed by a target instance;

[0168] The returning module 1302 is configured to return the resource binding response through the second application programming interface, wherein the response data carried in the resource binding response includes a binding processing result, and the binding processing result is obtained by performing resource binding processing on the interrupt request according to a target binding strategy, the target binding strategy is determined according to the interrupt request, and the target binding strategy is used to determine that the network card interface corresponding to the interrupt request and the processor resource to be bound by the interrupt request are in the same resource node of the processor architecture.

[0169] It should be noted that the obtaining module 1301 and the returning module 1302 correspond to steps S1001 to S1003 in Embodiment 2, and the three modules have the same instances and application scenarios as the corresponding steps, but are not limited to the content disclosed in Embodiment 2. It should be noted that the above modules or units can be hardware components or software components stored in the memory (for example, the memory 104) and processed by one or more processors (for example, the processors 102a, 102b, …, 102n), and the above modules can also be a part of the device and can run in the computer terminal 10 provided in Embodiment 1.

[0170] It should be noted that the preferred embodiments of the present embodiment can refer to the related description in Embodiment 1, Embodiment 2 or Embodiment 3, which will not be repeated here.

[0171] Embodiment 5

[0172] According to the embodiments of the present application, an electronic device is also provided, which can be any one of the computer terminal devices in the computer terminal device group. Alternatively, in the present embodiment, the electronic device can also be replaced by a terminal device such as a mobile terminal.

[0173] Alternatively, in the present embodiment, the electronic device can be located in at least one of the network devices in the computer network.

[0174] In the present embodiment, the electronic device can execute the program code of the following steps in the resource binding method: in response to an interrupt request to be processed by a target instance, determining a target binding strategy, wherein the target binding strategy is used to determine that the network card interface corresponding to the interrupt request and the processor resource to be bound by the interrupt request are in the same resource node of the processor architecture; and performing resource binding processing on the interrupt request according to the target binding strategy to obtain a binding processing result.

[0175] Alternatively, Figure 14 is a structural block diagram of an electronic device according to Embodiment 5 of the present application, like Figure 14As shown, the electronic device 140 can include one or more (only one is shown in the figure) processors 1402, a memory 1404, a storage controller 1406, and a peripheral interface 1408, wherein the peripheral interface 1408 is connected with a radio frequency module, an audio module, and a display.

[0176] The memory 1404 can be used to store software programs and modules, such as program instructions / modules corresponding to the resource binding method and device in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implements the above-mentioned resource binding method. The memory 1404 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 1404 can further include a memory remotely arranged with respect to the processor, which can be connected to the electronic device 140 through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0177] The processor 1402 can call the information and application programs stored in the memory through the transmission device to perform the following steps: in response to an interrupt request to be processed by a target instance, determining a target binding strategy, wherein the target binding strategy is used to determine that a network card interface corresponding to the interrupt request and a processor resource to be bound by the interrupt request are in the same resource node of a processor architecture; and performing resource binding processing for the interrupt request according to the target binding strategy to obtain a binding processing result.

[0178] Optionally, the above-mentioned processor 1402 can further execute the program code of the following steps: in response to an interrupt request to be processed by a target instance in a cloud computing service, determining a target position of a network card interface corresponding to the interrupt request in a processor architecture; determining a plurality of candidate processors from a target resource node corresponding to the target position in the processor architecture; and generating a target binding strategy based on the plurality of candidate processors.

[0179] Optionally, the above-mentioned processor 1402 can further execute the program code of the following steps: obtaining an instance specification of the target instance, wherein the instance specification at least includes a first number and a second number, the first number is a number of processors configured for the target instance, and the second number is a number of request queue pairs when the target instance performs multi-queue processing; and generating a target binding strategy based on the first number, the second number, and the plurality of candidate processors.

[0180] Optionally, the processor 1402 can further execute program codes of the following steps: determining, according to a ratio of the first quantity and the second quantity, a binding mapping relationship corresponding to the interrupt request, wherein the binding mapping relationship is used to determine a request queue pair of the interrupt request and a sorting alignment strategy of the plurality of candidate processors; and generating a target binding strategy based on the binding mapping relationship and the plurality of candidate processors.

[0181] Optionally, the processor 1402 can further execute program codes of the following steps: in response to the ratio being a first preset value, determining that the binding mapping relationship is that the request queue pair is aligned with one processor; in response to the ratio being a second preset value, determining that the binding mapping relationship is that a sending queue or a receiving queue in the request queue pair is respectively aligned with one thread in the processor; in response to the ratio being a third preset value, determining that the binding mapping relationship is that the sending queue or the receiving queue in the request queue pair is respectively aligned with a first processor thread in a group of processor threads, and the number of processors in the group is determined by the third preset value; and in response to the ratio being a fourth preset value, determining that the binding mapping relationship is that, after a plurality of request queue pairs are respectively aligned with one processor, a remaining processor in the plurality of candidate processors that does not have an alignment relationship is aligned with a first request queue pair in the plurality of request queue pairs.

[0182] Optionally, the processor 1402 can further execute program codes of the following steps: determining, according to the binding mapping relationship, at least one target processor to be bound to the request queue pair from the plurality of candidate processors; and generating the target binding strategy according to a topology position of the target processor in the target resource node.

[0183] Optionally, the processor 1402 can further execute program codes of the following steps: obtaining first affinity binding information, wherein the first affinity binding information includes an initial array common to cloud computing instances of a plurality of specifications in a cloud computing service corresponding to the target instance, a plurality of array elements in the initial array correspond to a plurality of processors in a processor architecture, and the plurality of array elements are used to represent a binding relationship between the cloud computing instance and the plurality of processors; and adjusting a numerical value of an element at an array index position corresponding to the topology position in the first affinity binding information to generate the target binding strategy based on the topology position.

[0184] Optionally, the processor 1402 can further execute program codes of the following steps: determining a target processor resource from the processor architecture according to the target binding strategy, and binding the target processor resource to the interrupt request to obtain a binding processing result, wherein the processor architecture is a non-uniform memory access architecture, and the target processor resource at least includes a central processing unit core resource.

[0185] Optionally, the processor 1402 can further execute program codes of the following steps: performing base conversion and character concatenation processing on the plurality of array elements in the target binding strategy to obtain binding display information, wherein the binding display information is used for display through a graphical user interface.

[0186] Optionally, the processor 1402 can further execute program codes of the following steps: in response to a change event of an instance specification of the target instance, re-generating the target binding strategy according to the first quantity and the second quantity in the changed instance specification.

[0187] The processor 1402 can call information and application programs stored in the memory through the transmission device to execute the following steps: obtaining a resource binding request through a first application programming interface, wherein the request data carried in the resource binding request includes an interrupt request to be processed by the target instance; returning a resource binding response through a second application programming interface, wherein the response data carried in the resource binding response includes a binding processing result, the binding processing result being obtained by performing resource binding processing on the interrupt request according to the target binding strategy, the target binding strategy being determined according to the interrupt request, and the target binding strategy being used to determine that the network card interface corresponding to the interrupt request and the processor resource to be bound by the interrupt request are in the same resource node of the processor architecture.

[0188] By responding to the interrupt request to be processed by the target instance, the target binding strategy is determined, wherein the target binding strategy is used to determine that the network card interface corresponding to the interrupt request and the processor resource to be bound by the interrupt request are in the same resource node of the processor architecture; and further performing resource binding processing on the interrupt request according to the target binding strategy to obtain a binding processing result. Thus, when binding the processor resource for the interrupt request, the application can ensure that the allocated processor resource and the network card interface corresponding to the interrupt request are in the same resource node in the processor architecture, avoiding the case of allocating the processor resource across the resource nodes, achieving the purpose of binding the processor resource for the interrupt request considering the position of the network card interface, thereby realizing the technical effect of improving the network performance, and further solving the technical problem of poor network performance caused by sequentially binding the processor resource according to the interrupt number in the related art.

[0189] Those skilled in the art can understand that, Figure 14 The structure shown is only schematic, and the electronic device can also be a terminal device such as a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID). Figure 14 It does not limit the structure of the above-mentioned electronic device. For example, the electronic device 140 can further include more or fewer components than those shown, components of different functions, or different configurations of the shown components. For example, the electronic device 140 can further include a communication component, an input component, an output component, a power supply component, a data storage component, etc.Figure 14 more or less components than those shown, such as no network interface, display, or the like, or a different configuration of components, such as a different arrangement of network interfaces, display, or the like. Figure 14

[0190] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiments can be completed by instructing the terminal device related hardware through programs, and the programs can be stored in a computer readable storage medium, which can include a flash disk, a ROM, a RAM, a magnetic disk, an optical disk, and the like.

[0191] Embodiment 6

[0192] According to the embodiments of the present application, a computer readable storage medium is further provided. Optionally, in the embodiment, the above-mentioned storage medium can be used to save the program code executed by the resource binding method provided in the above-mentioned embodiment 1, embodiment 2 or embodiment 3.

[0193] Optionally, in the embodiment, the above-mentioned storage medium can be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.

[0194] Optionally, in the embodiment, the computer readable storage medium is configured to store program code for executing the following steps: in response to an interrupt request to be processed by a target instance, determining a target binding strategy, wherein the target binding strategy is used to determine that a network card interface corresponding to the interrupt request is in a same resource node of a processor architecture as a processor resource to be bound by the interrupt request; and performing resource binding processing on the interrupt request according to the target binding strategy, to obtain a binding processing result.

[0195] Optionally, in the embodiment, the computer readable storage medium is configured to store program code for executing the following steps: in response to an interrupt request, determining a target position of a network card interface corresponding to the interrupt request in a processor architecture; from a target resource node corresponding to the target position in the processor architecture, determining a plurality of candidate processors; and based on the plurality of candidate processors, generating a target binding strategy.

[0196] Optionally, in the embodiment, the computer readable storage medium is configured to store program code for executing the following steps: obtaining an instance specification of a target instance, wherein the instance specification at least includes a first number and a second number, the first number is a number of processors configured for the target instance, and the second number is a number of request queue pairs when the target instance performs multi-queue processing; and based on the first number, the second number and the plurality of candidate processors, generating a target binding strategy.

[0197] ​Optionally, in the embodiment, the computer readable storage medium is configured to store program code for performing the following steps: determining, according to a ratio of the first quantity and the second quantity, a binding mapping relationship corresponding to the interrupt request, wherein the binding mapping relationship is used to determine a request queue pair of the interrupt request and a sorting alignment strategy of the plurality of candidate processors; and generating a target binding strategy based on the binding mapping relationship and the plurality of candidate processors.

[0198] Optionally, in the embodiment, the computer readable storage medium is configured to store program code for performing the following steps: in response to the ratio being a first preset value, determining that the binding mapping relationship is that the request queue pair is aligned with one processor; in response to the ratio being a second preset value, determining that the binding mapping relationship is that a sending queue or a receiving queue in the request queue pair is respectively aligned with one thread in the processor; in response to the ratio being a third preset value, determining that the binding mapping relationship is that a sending queue or a receiving queue in the request queue pair is respectively aligned with a first processor thread in a group of processor threads, and the number of processors in the group is determined by the third preset value; and in response to the ratio being a fourth preset value, determining that the binding mapping relationship is that, after a plurality of request queue pairs are respectively aligned with one processor, a remaining processor in the plurality of candidate processors that does not have an alignment relationship is aligned with a first request queue pair in the plurality of request queue pairs.

[0199] Optionally, in the embodiment, the computer readable storage medium is configured to store program code for performing the following steps: determining, according to the binding mapping relationship, at least one target processor to be bound to the request queue pair from the plurality of candidate processors; and generating the target binding strategy according to a topology position of the target processor in the target resource node.

[0200] Optionally, in the embodiment, the computer readable storage medium is configured to store program code for performing the following steps: obtaining first affinity binding information, wherein the first affinity binding information includes an initial array common to a plurality of specifications of cloud computing instances in a cloud computing service corresponding to a target instance, a plurality of array elements in the initial array correspond to a plurality of processors in a processor architecture, and the plurality of array elements are used to represent a binding relationship between the cloud computing instance and the plurality of processors; and adjusting a numerical value of an element at an array index position corresponding to the topology position in the first affinity binding information to generate the target binding strategy based on the topology position.

[0201] Optionally, in the embodiment, the computer readable storage medium is configured to store program code for performing the following steps: determining a target processor resource from the processor architecture according to the target binding strategy, and binding the target processor resource to the interrupt request to obtain a binding processing result, wherein the processor architecture is a non-uniform memory access architecture, and the target processor resource at least includes a central processing unit core resource.

[0202] Optionally, in the embodiment, the computer readable storage medium is configured to store program code for performing the following steps: performing base conversion and character concatenation processing on the plurality of array elements in the target binding strategy to obtain binding display information, wherein the binding display information is used for display through a graphical user interface.

[0203] Optionally, in the embodiment, the computer readable storage medium is configured to store program code for performing the following steps: in response to a change event of an instance specification of a target instance, re-generating the target binding strategy according to the first quantity and the second quantity in the changed instance specification.

[0204] Optionally, in the embodiment, the computer readable storage medium is configured to store program code for performing the following steps: obtaining a resource binding request through a first application programming interface, wherein the request data carried in the resource binding request includes an interrupt request to be processed by the target instance; returning a resource binding response through a second application programming interface, wherein the response data carried in the resource binding response includes a binding processing result, the binding processing result being obtained by performing resource binding processing on the interrupt request according to a target binding strategy, the target binding strategy being determined according to the interrupt request, and the target binding strategy being used to determine that the network card interface corresponding to the interrupt request and the processor resource to be bound by the interrupt request are in the same resource node of the processor architecture.

[0205] By adopting the embodiment of the present application, a computer readable storage medium for implementing the above resource binding method is provided. By responding to an interrupt request to be processed by a target instance, a target binding strategy is determined, wherein the target binding strategy is used to determine that the network card interface corresponding to the interrupt request and the processor resource to be bound by the interrupt request are in the same resource node of the processor architecture; and further, resource binding processing is performed on the interrupt request according to the target binding strategy to obtain a binding processing result. Thus, when binding the processor resource for the interrupt request, the present application can ensure that the allocated processor resource and the network card interface corresponding to the interrupt request are in the same resource node in the processor architecture, and avoid the case of allocating the processor resource across the resource nodes, so as to achieve the purpose of considering the network card interface position to bind the processor resource for the interrupt request, thereby realizing the technical effect of improving the network performance, and further solving the technical problem of poor network performance caused by sequentially binding the processor resource according to the interrupt number in the related art.

[0206] According to an embodiment of the present application, a resource binding system is also provided, including: a resource module, including a network card device and processor resources, the network card interface of the network card device is at least used to issue an interrupt request to the target instance, and the processor resources are configured in multiple resource nodes of the processor architecture; a memory, storing an executable program; a processor, used to run the program, wherein any one of the optional resource binding methods in the aforementioned embodiments is executed when the program is running.

[0207] According to an embodiment of the present application, a computer program product is also provided, including a computer program, which implements the resource binding method of any one of the aforementioned embodiments when executed by a processor.

[0208] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0209] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0210] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0211] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0212] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0213] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes various media that can store program codes, such as a U disk, a ROM, a RAM, a mobile hard disk, a magnetic disk or an optical disk.

[0214] The above is only the preferred embodiment of the present application. It should be pointed out that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should also be considered as the protection scope of the present application.

Claims

1. A resource binding method, characterized by, The method comprises: determining a target binding strategy in response to an interrupt request to be processed by a target instance, wherein the target binding strategy is used to determine that a network card interface corresponding to the interrupt request is in a same resource node of a processor architecture as a processor resource to which the interrupt request is to be bound; performing resource binding processing on the interrupt request according to the target binding strategy to obtain a binding processing result.

2. The resource binding method of claim 1, wherein, The method comprises: determining a target location of the network card interface in the processor architecture in response to the interrupt request to be processed by the target instance in a cloud computing service; determining a plurality of candidate processors from a target resource node corresponding to the target location in the processor architecture; generating the target binding strategy based on the plurality of candidate processors.

3. The resource binding method of claim 2, wherein, The method comprises: obtaining an instance specification of the target instance, wherein the instance specification comprises at least a first quantity and a second quantity, the first quantity being a number of processors configured for the target instance, and the second quantity being a number of request queue pairs when the target instance performs multi-queue processing; generating the target binding strategy based on the first quantity, the second quantity, and the plurality of candidate processors.

4. The resource binding method of claim 3, wherein, The method comprises: determining a binding mapping relationship corresponding to the interrupt request according to a ratio of the first quantity and the second quantity, wherein the binding mapping relationship is used to determine a request queue pair of the interrupt request and a sorting alignment strategy of the plurality of candidate processors; generating the target binding strategy based on the binding mapping relationship and the plurality of candidate processors.

5. The resource binding method of claim 4, wherein, The method comprises one of the following: in response to the ratio being a first preset value, determining that the binding mapping relationship is that the request queue pair is aligned with one processor; in response to the ratio being a second preset value, determining that the binding mapping relationship is that a sending queue or a receiving queue in the request queue pair is respectively aligned with one thread in a processor; in response to the ratio being a third preset value, determining that the binding mapping relationship is that a sending queue or a receiving queue in the request queue pair is respectively aligned with a first processor thread in a group of processor threads, and a number of processors in the group of processors is determined by the third preset value; in response to the ratio being a fourth preset value, determining that the binding mapping relationship is that, after a plurality of request queue pairs are respectively aligned with one processor, a remaining processor in the plurality of candidate processors that does not have an alignment relationship is aligned with a first request queue pair in the plurality of request queue pairs.

6. The resource binding method of claim 4, wherein, The method comprises: determining at least one target processor to be bound to the request queue pair from the plurality of candidate processors according to the binding mapping relationship. According to a topology position of the target processor in the target resource node, the target binding strategy is generated.

7. The resource binding method of claim 6, wherein, According to the topology position of the target processor in the target resource node, the target binding strategy is generated, which includes: obtaining first affinity binding information, wherein the first affinity binding information includes an initial array common to multiple specifications of cloud computing instances in a cloud computing service corresponding to the target instance, multiple array elements in the initial array correspond to multiple processors in the processor architecture, and the multiple array elements are used to represent a binding relationship between the cloud computing instance and the multiple processors; based on the topology position, the numerical value of the element at the array index position corresponding to the topology position in the first affinity binding information is adjusted to generate the target binding strategy.

8. The resource binding method of claim 1, wherein, According to the target binding strategy, resource binding processing is performed on the interrupt request to obtain the binding processing result, which includes: According to the target binding strategy, a target processor resource is determined from the processor architecture, and the target processor resource is bound to the interrupt request to obtain the binding processing result, wherein the processor architecture is a non-uniform memory access architecture, and the target processor resource at least includes a central processing unit core resource.

9. The resource binding method according to any one of claims 1 to 8, characterized by, The method further includes: performing radix conversion and character concatenation processing on multiple array elements in the target binding strategy to obtain binding display information; displaying the binding display information on a graphical user interface.

10. The resource binding method according to any one of claims 3 to 7, characterized by, The method further includes: In response to a change event of the instance specification of the target instance, the target binding strategy is regenerated according to the first quantity and the second quantity in the changed instance specification.

11. A resource binding method, characterized by, including: receiving a resource binding request from a client, wherein the request data carried in the resource binding request includes an interrupt request to be processed by a target instance; based on the interrupt request, a target binding strategy is determined, and resource binding processing is performed on the interrupt request according to the target binding strategy to obtain a binding processing result, wherein the target binding strategy is used to determine that the network card interface corresponding to the interrupt request and the processor resource to be bound by the interrupt request are in the same resource node of the processor architecture; the resource binding result is fed back to the client.

12. The resource binding method of claim 11, wherein, Based on the interrupt request, the target binding strategy is determined, which includes: obtaining a target position of the network card interface corresponding to the interrupt request in the processor architecture; determining multiple candidate processors from a target resource node corresponding to the target position in the processor architecture; obtaining an instance specification of the target instance, wherein the instance specification at least includes a first quantity and a second quantity, the first quantity is a number of processors configured for the target instance, and the second quantity is a number of request queue pairs when the target instance performs multi-queue processing; based on the first quantity, the second quantity and the multiple candidate processors, the target binding strategy is generated.

13. A resource binding method, characterized by, including: Obtaining a resource binding request through a first application programming interface, wherein request data carried in the resource binding request includes an interrupt request to be processed by a target instance; Returning a resource binding response through a second application programming interface, wherein response data carried in the resource binding response includes a binding processing result, the binding processing result being obtained by performing resource binding processing on the interrupt request according to a target binding strategy, the target binding strategy being determined according to the interrupt request, and the target binding strategy being used to determine that a network card interface corresponding to the interrupt request and a processor resource to be bound by the interrupt request are in a same resource node of a processor architecture.

14. A resource binding system, characterized by Comprising: a resource module including a network card device and a processor resource, a network card interface of the network card device being used at least to send an interrupt request to a target instance, and the processor resource being configured in a plurality of resource nodes of a processor architecture; a memory storing an executable program; a processor configured to run the program, wherein the program, when running, performs the resource binding method in any one of claims 1 to 13.

15. An electronic device, comprising: Comprising: a memory storing an executable program; a processor configured to run the program, wherein the program, when running, performs the resource binding method in any one of claims 1 to 13.

16. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises a stored executable program, wherein the executable program, when running, controls a device where the computer readable storage medium is located to perform the resource binding method in any one of claims 1 to 13.

17. A computer program product, characterised in that, The computer program, when executed by a processor, implements the resource binding method in any one of claims 1 to 13.

Citation Information

Cited By

  • Method and device for improving execution efficiency of compute-intensive tasks and medium

    CN121166378A