A resource management method, device and medium based on NUMA architecture storage system

By obtaining the optimal optional memory of the target CPU under the NUMA architecture, the problem of low memory access efficiency caused by the different memory access rates of different nodes by the CPU is solved, and more efficient resource management and business execution are achieved.

CN115129473BActive Publication Date: 2024-10-18INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210761626.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2024-10-18
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

Existing resource management methods fail to effectively consider the different rates at which the CPU accesses the memory of different nodes under the NUMA architecture, resulting in low memory access efficiency.

Method used

By obtaining the target CPU with the highest affinity for the business to be processed, and selecting the optimal optional memory based on the distance relationship table, resource objects are created to improve access efficiency. The distance relationship table records the access efficiency between the CPU and the memory. The memory with the smallest distance is selected as the optimal optional memory to ensure that business requirements are met. If necessary, other closer memories are selected to meet the needs.

Benefits of technology

It improves the memory access efficiency when the CPU executes pending business, matches business execution, and improves system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115129473B_ABST
    Figure CN115129473B_ABST
Patent Text Reader

Abstract

The present application relates to the field of computer technology, and discloses a resource management method, device and medium based on a NUMA architecture storage system to solve the problem of low resource management access efficiency. The present application selects a target CPU with the highest affinity to the business to be processed according to the type of the business to be processed, so as to improve the efficiency of business execution. By materializing the access efficiency between the CPU and the memory as a distance relationship and recording it as a distance relationship table, the optimal optional memory corresponding to the target CPU is found, so as to allocate the optimal resource object to the business to be processed, improve the access efficiency to the resource object, better match the business execution, and improve the execution efficiency of the business.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a resource management method, device and medium based on a NUMA architecture storage system. Background Art

[0002] The Non-Uniform Memory Access (NUMA) architecture has become the mainstream architecture of modern multi-core servers due to its high memory bandwidth and good scalability. Servers based on the NUMA architecture are widely deployed in existing cloud data centers. Under the NUMA architecture, the CPU and memory are divided into multiple nodes, and each CPU can access all the memory. However, the CPU has the least latency when accessing the memory of the local node, and the latency of accessing the memory of the remote node increases with the distance. The current resource management methods basically use cache, resource pool or resource linked list to manage resources.

[0003] This method does not take into account the different CPU access rates for memory on different nodes under the NUMA architecture, and does not design a corresponding resource access management method based on the CPU access rate.

[0004] It can be seen that providing a resource management method based on NUMA architecture to improve the access efficiency to memory is a technical problem that needs to be solved urgently by people in this field. Summary of the invention

[0005] The purpose of this application is to provide a resource management method for improving the access efficiency to memory.

[0006] In order to solve the above technical problems, the present application provides a resource management method based on a NUMA architecture storage system, comprising:

[0007] Receive pending business;

[0008] Obtaining a target CPU having the highest affinity to the service to be processed;

[0009] According to the distance relationship table, the optimal optional memory of the target CPU is obtained, wherein the distance relationship table records the distance between the CPU and the memory, and the higher the access efficiency of the CPU to the memory, the smaller the distance;

[0010] Creating a resource object in the optimal optional memory;

[0011] The corresponding resource object is allocated to the service to be processed.

[0012] Preferably, in the resource management method based on the NUMA architecture storage system, the step of obtaining the optimal optional memory of the target CPU according to the distance relationship table includes:

[0013] Obtaining the business demand required for the business to be processed;

[0014] According to the distance relationship table, selecting the nearest memory with the shortest distance to the target CPU;

[0015] Determine whether the number of free physical pages in the recent memory meets the business demand;

[0016] If so, the most recent memory is used as the optimal optional memory.

[0017] Preferably, in the resource management method based on the NUMA architecture storage system, if the number of free physical pages in the recent memory does not meet the business demand, it also includes:

[0018] Selecting in sequence other memories closest to the CPU except the most recent memory;

[0019] Until the number of free physical pages of the recent memory and the other memories meets the business demand;

[0020] The most recent memory and the other memories are used as the optimal optional memories.

[0021] Preferably, in the above-mentioned resource management method based on the NUMA architecture storage system, the steps of setting the distance relationship table are as follows:

[0022] Obtaining access efficiency between the CPU and the memory;

[0023] The number of the CPU and the NUMA domain number to which it belongs, the address range of the memory and the NUMA domain number to which it belongs, and the corresponding access efficiency are recorded in the distance relationship table.

[0024] Preferably, in the resource management method based on the NUMA architecture storage system, before recording the number of the CPU and the NUMA domain number to which it belongs, the address range of the memory and the NUMA domain number to which it belongs, and the corresponding access efficiency into the distance relationship table, it also includes:

[0025] Reserving available physical pages according to the initial memory amount of the NUMA domain and the service requirements to execute the service to be processed;

[0026] Correspondingly, recording the number of the CPU and the NUMA domain number to which it belongs, the address range of the memory and the NUMA domain number to which it belongs, and the corresponding access efficiency into the distance relationship table further includes:

[0027] The index of the physical page corresponding to the memory, the number of free physical pages, and the number of used physical pages are recorded in the distance relationship table.

[0028] Preferably, in the resource management method based on the NUMA architecture storage system, after allocating the corresponding resource object to the service to be processed, the method further includes:

[0029] When the pending business is completed, the corresponding resource object is released and received.

[0030] Preferably, in the resource management method based on the NUMA architecture storage system, after receiving the released corresponding resource object, the method further includes:

[0031] Update the number of free physical pages of the memory to which the resource object belongs.

[0032] In order to solve the above technical problems, the present application also provides a resource management device based on a NUMA architecture storage system, comprising:

[0033] A receiving module, used for receiving services to be processed;

[0034] An acquisition module, used for acquiring a target CPU having the highest affinity with the service to be processed;

[0035] A selection module, configured to obtain an optimal optional memory of the target CPU according to a distance relationship table, wherein the distance relationship table records the distance between the CPU and the memory, and the higher the access efficiency of the CPU to the memory, the smaller the distance;

[0036] A creation module, used for creating a resource object in the optimal optional memory;

[0037] An allocation module is used to allocate the corresponding resource object to the business to be processed.

[0038] A first acquisition subunit is used to acquire the business demand required by the to-be-processed business;

[0039] A first selection subunit, configured to select a nearest memory having a minimum distance to the target CPU according to the distance relationship table;

[0040] A first judgment subunit is used to judge whether the number of free physical pages in the recent memory meets the business demand; if so, trigger the first determination subunit; if not, trigger the exclusion selection subunit;

[0041] The first determining subunit is configured to use the most recent memory as the optimal optional memory.

[0042] An exclusion selection subunit is used to sequentially select other memories closest to the CPU except the nearest memory until the number of free physical pages of the nearest memory and the other memories meets the business demand;

[0043] The second determining subunit is used to select the most recent memory and the other memory as the optimal optional memory.

[0044] A conversion module, used for obtaining the access efficiency between the CPU and the memory and converting it into a distance mark;

[0045] The recording module is used to record the number of the CPU and the NUMA domain number to which it belongs, the address range of the memory and the NUMA domain number to which it belongs, and the corresponding distance mark into the distance relationship table. It is also used to record the index of the physical page corresponding to the memory, the number of free physical pages, and the number of used physical pages into the distance relationship table.

[0046] A reservation module, used to reserve available physical pages according to the initial memory capacity of the memory and the service requirements, so as to execute the service to be processed;

[0047] The release module is used to receive the corresponding resource object released after the pending business is completed.

[0048] An updating module is used to update the number of free physical pages of the memory to which the resource object belongs in the distance relationship table.

[0049] In order to solve the above technical problems, the present application also provides a resource management device based on a NUMA architecture storage system, comprising:

[0050] Memory for storing computer programs;

[0051] The processor is used to implement the steps of the above-mentioned resource management method based on the NUMA architecture storage system when executing the computer program.

[0052] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the resource management method based on the NUMA architecture storage system are implemented.

[0053] The resource management method based on the NUMA architecture storage system provided by the present application includes: receiving a business to be processed; obtaining a target CPU with the highest affinity to the business to be processed; obtaining the optimal optional memory of the target CPU according to a distance relationship table, wherein the distance relationship table records the distance between the CPU and the memory, and the higher the access efficiency of the CPU to the memory, the smaller the distance; creating a resource object in the optimal optional memory; and allocating the corresponding resource object to the business to be processed. The present application selects the target CPU with the highest affinity to the business to be processed according to the type of the business to be processed, so as to improve the efficiency of business execution, and finds the optimal optional memory corresponding to the target CPU by materializing the access efficiency between the CPU and the memory as a distance relationship and recording it as a distance relationship table, so as to allocate the optimal resource object to the business to be processed, improve the access efficiency to the resource object, better match the business execution, and improve the execution efficiency of the business.

[0054] In addition, the present application also provides a resource management device and medium based on a NUMA architecture storage system, which correspond to the above method and have the same effect as above. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0056] Figure 1 A flowchart of a resource management method based on a NUMA architecture storage system provided in an embodiment of the present application;

[0057] Figure 2 A schematic diagram of a resource management device based on a NUMA architecture storage system provided in an embodiment of the present application;

[0058] Figure 3 A structural diagram of another resource management device based on a NUMA architecture storage system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0060] The core of this application is to provide a resource management method, device and medium based on a NUMA architecture storage system.

[0061] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0062] Non-Uniform Memory Access (NUMA) is a computer memory design for multiple processors, where the memory access time depends on the memory location of the processor. Under NUMA, a processor accesses its own local memory faster than non-local memory (memory location to another processor or memory shared between processors). A system with non-uniform memory access has multiple CPU processors, each processor has its own independent local memory, and each CPU processor only supports fast access to its own local memory; each CPU processor is connected through a "bus"; the processor can access the "memory" of other processors through the "bus", but the processor accesses its own memory faster than accessing the memory of other processors; for example, a machine has 2 processors and 4 memory blocks. We call 1 processor and two memory blocks a NUMA domain (NUMA node), so that the machine will have two NUMA nodes. In terms of physical distribution, the physical distance between the processor and the memory block of the NUMAnode is smaller, so the access is faster. For example, this device is divided into two processors (CPU1, CPU 2), and two memory blocks (memory1.1, memory1.2, memory2.1, memory2.2) are placed on both sides of each processor. In this way, cpu1 of NUMA node1 can access memory1.1 and memory1.2 faster than memory2.1 and memory2.2. Therefore, if the NUMA mode can ensure that the CPU in this node only accesses the memory blocks in this node, then the efficiency will be the highest.

[0063] In the era of big data, the demand for storage services in various industries is growing. Most of the hardware architectures of storage systems have adopted the NUMA architecture, and the resource management methods under the NUMA architecture have new optimization space. The current resource management methods basically use cache, resource pool or resource list, but they do not take into account the different CPU access rates of different node memories under the NUMA architecture, and do not design corresponding resource access management methods based on the CPU access rate.

[0064] In order to solve the above technical problems, the present application provides a resource management method based on a NUMA architecture storage system. Figure 1A flowchart of a resource management method based on a NUMA architecture storage system provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, including:

[0065] S11: receiving pending business;

[0066] S12: Obtain the target CPU with the highest affinity to the service to be processed;

[0067] Because CPUs have affinity policies, when configuring business resources, you need to consider the affinity of scheduling CPUs to execute business. For businesses that use CPUs, if they run on CPUs that are affinity with the CPUs, system performance will be greatly improved compared to running on non-affinity CPUs or other resources.

[0068] According to the type of the business to be processed, select the target CPU with the highest affinity to the business to be processed to improve the efficiency of business execution.

[0069] In addition, this embodiment does not limit the specific content of the pending services and the number of pending services, and can be designed according to actual needs.

[0070] S13: obtaining the optimal optional memory of the target CPU according to the distance relationship table, wherein the distance relationship table records the distance between the CPU and the memory, and the higher the CPU's access efficiency to the memory, the smaller the distance;

[0071] Due to the NUMA architecture, the CPU has the smallest latency and the highest efficiency when accessing the memory in the local domain. The latency and efficiency of accessing the memory in the remote domain are higher than that in the local domain. The latency and efficiency of the CPU accessing different remote domains will also be different. We abstract this difference in efficiency as distance, that is, for a certain CPU, the efficiency of accessing the memory in the domain closest to it is the highest, and the efficiency of accessing the memory farthest is the lowest. In this embodiment, this access efficiency relationship is concretized as distance and recorded in a distance relationship table. This embodiment does not limit the specific content of the distance relationship table. The distance can be represented by numbers, or the level of distance can be represented by letters. It can be designed according to actual needs.

[0072] Through the distance relationship table, the optimal optional memory corresponding to the target CPU is found. The optimal optional memory mentioned in this embodiment is not necessarily the memory closest to the target CPU. If the memory closest to the target CPU has no available physical pages, it is necessary to select other available memory with a closer distance. Select the corresponding available memory as the optimal optional memory according to the actual situation. Improve the efficiency of the CPU when executing the pending business.

[0073] S14: creating a resource object in the optimal optional memory;

[0074] S15: Allocate corresponding resource objects to the business to be processed.

[0075] After obtaining the optimal optional memory, resource objects are created on the optimal optional memory according to different business types. Each object has a node id attribute, which represents the NUMA node to which the memory location of the resource object belongs. When the pending business thread is executed, it needs to request a resource object, and a resource object with a specific node id is allocated to it according to its CPU affinity. In this way, each pending business thread has high access efficiency to the resource object it requests.

[0076] The resource management method based on the NUMA architecture storage system provided by the present application receives the business to be processed; obtains the target CPU with the highest affinity to the business to be processed; obtains the optimal optional memory of the target CPU according to the distance relationship table, wherein the distance relationship table records the distance between the CPU and the memory, and the higher the access efficiency of the CPU to the memory, the smaller the distance; creates a resource object in the optimal optional memory; and allocates the corresponding resource object to the business to be processed. The present application selects the target CPU with the highest affinity to the business to be processed according to the type of the business to be processed, so as to improve the efficiency of business execution, and finds the optimal optional memory corresponding to the target CPU by materializing the access efficiency between the CPU and the memory as a distance relationship and recording it as a distance relationship table, so as to allocate the optimal resource object to the business to be processed and improve the access efficiency to the resource object. Better match business execution and improve business execution efficiency.

[0077] According to the above embodiment, this embodiment provides an implementation method for obtaining the optimal optional memory of the target CPU according to the distance relationship table in step S13, including:

[0078] Obtaining the business demand required for the business to be processed;

[0079] According to the distance relationship table, selecting the nearest memory with the shortest distance to the target CPU;

[0080] Determine whether the number of free physical pages in the recent memory meets the business demand;

[0081] If so, the most recent memory is used as the optimal optional memory.

[0082] The service demand mentioned in this embodiment refers to the memory size required to execute the service to be processed, and the memory size to be requested must meet the service demand of the service to be processed.

[0083] It should be noted that physical memory is real memory, which is opposite to virtual memory. Physical memory is paged, just like many pages in a book, each page records different information. Physical memory is paged, and for a 32-bit CPU, the size of each physical page is 4K. For each physical page, the system uses a 24-byte structure to save its related information.

[0084] Each memory exists in the form of a physical page, and the optimal optional memory requested is also a physical page. The memory with the smallest distance to the target CPU is selected to determine whether its free physical pages meet the business demand. If so, the nearest memory is used as the optimal optional memory.

[0085] In addition, the upper-level business module can obtain the physical page through the system call interface, and the underlying driver module is specifically implemented to provide the physical page.

[0086] If the number of free physical pages in the recent memory does not meet the business demand, the method further includes:

[0087] Selecting in sequence other memories closest to the CPU except the most recent memory;

[0088] Until the number of free physical pages of the recent memory and the other memories meets the business demand;

[0089] The most recent memory and the other memories are used as the optimal optional memories.

[0090] Select the memory closest to the target CPU in turn until the total number of its free physical pages meets the business demand, improve the access efficiency of resource objects, better match business execution, and improve business execution efficiency.

[0091] According to the above embodiment, this embodiment provides a method for setting a distance relationship table, and the steps are as follows:

[0092] Obtaining the access efficiency between the CPU and the memory and converting it into a distance mark;

[0093] The number of the CPU and the NUMA domain number to which it belongs, the address range of the memory and the NUMA domain number to which it belongs, and the corresponding distance flags are recorded in the distance relationship table.

[0094] First, obtain the access efficiency between each CPU and memory, and convert the access efficiency into a distance mark, which can be a number or letter, etc., designed according to actual needs. The NUMA architecture contains multiple NUMA domains, each NUMA domain contains a CPU and multiple memories. Record the number of each CPU and the NUMA domain number to which it belongs, the address range of the memory and the NUMA domain number to which it belongs, and the distance mark between the CPU and the memory and write them into the distance relationship table. Through the distance relationship table, find the optimal optional memory corresponding to the target CPU to improve access efficiency.

[0095] In addition, since each memory needs to be used for other functions in addition to executing the business, it is necessary to reserve part of the memory for executing the business. This embodiment provides a preferred solution, before recording the number of the CPU and the NUMA domain number to which it belongs, the address range of the memory and the NUMA domain number to which it belongs, and the corresponding access efficiency into the distance relationship table, it also includes:

[0096] According to the initial memory capacity of the memory and the service requirements, available physical pages are reserved to execute the service to be processed;

[0097] Correspondingly, recording the number of the CPU and the NUMA domain number to which it belongs, the address range of the memory and the NUMA domain number to which it belongs, and the corresponding access efficiency into the distance relationship table further includes:

[0098] The index of the physical page corresponding to the memory, the number of free physical pages, and the number of used physical pages are recorded in the distance relationship table.

[0099] Specifically, according to the initial memory capacity of the memory and the business requirements, available physical pages are reserved to execute the pending business; the reservation here refers to applying for a certain amount of physical pages in different NUMA domains. Some NUMA domains have more memory, so some will be applied for; some NUMA domains have less memory, so less will be applied for. These physical pages are then associated with the distance relationship table, that is, the index of the physical page corresponding to the memory, the number of free physical pages, and the number of used physical pages are recorded in the distance relationship table. When it is necessary to apply for physical pages to execute the pending business, the currently free physical pages can be directly obtained from the distance relationship table to improve management efficiency.

[0100] According to the above embodiment, after each pending service is executed, the applied resource object needs to be released. This embodiment provides a preferred solution, after allocating the corresponding resource object to the pending service, it also includes:

[0101] When the pending business is completed, the corresponding resource object is released and received.

[0102] Specifically, when the business execution is completed and its resource object needs to be released, this part of the memory is released back to the corresponding memory area according to the node id attribute of the resource object.

[0103] Preferably, after receiving the released corresponding resource object, the method further comprises:

[0104] The number of free physical pages of the memory to which the resource object belongs in the distance relationship table is updated. The data information of this part of the memory recorded in the distance relationship table is updated for the next call.

[0105] Correspondingly, each time a physical page is allocated to a pending service, data of available idle physical pages may change. After allocating the corresponding resource object to the pending service, the method further includes:

[0106] The data information of the free physical pages in the distance relationship table is updated.

[0107] After allocating physical pages for pending services, the free physical page information recorded in the distance relationship table is updated in a timely manner to ensure data accuracy during the next call.

[0108] In the above embodiments, a resource management method based on a NUMA architecture storage system is described in detail, and the present application also provides an embodiment corresponding to a resource management device based on a NUMA architecture storage system. It should be noted that the present application describes the embodiments of the device part from two perspectives, one is based on the perspective of functional modules, and the other is based on the perspective of hardware.

[0109] Figure 2 A schematic diagram of a resource management device based on a NUMA architecture storage system provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the resource management device based on the NUMA architecture storage system includes:

[0110] A receiving module 21, used for receiving services to be processed;

[0111] An acquisition module 22 is used to acquire a target CPU having the highest affinity with the service to be processed;

[0112] A selection module 23 is used to obtain the optimal optional memory of the target CPU according to a distance relationship table, wherein the distance relationship table records the distance between the CPU and the memory, and the higher the access efficiency of the CPU to the memory, the smaller the distance;

[0113] A creation module 24, used to create a resource object in the optimal optional memory;

[0114] The allocation module 25 is used to allocate the corresponding resource object to the service to be processed.

[0115] Specifically, the receiving module 21 receives the business to be processed; the acquiring module 22 acquires the target CPU with the highest affinity to the business to be processed; since the CPU has an affinity policy, when configuring the resources of the business, when the CPU needs to be configured, the affinity of scheduling the CPU to execute the business needs to be considered. For the business using the CPU, if it runs on a CPU with affinity to the CPU, the system performance will be greatly improved compared to running on a non-affinity CPU or other resources. According to the type of the business to be processed, the target CPU with the highest affinity to the business to be processed is selected to improve the efficiency of business execution.

[0116] The selection module 23 obtains the optimal optional memory of the target CPU according to the distance relationship table, wherein the distance relationship table records the distance between the CPU and the memory. The higher the CPU's access efficiency to the memory, the smaller the distance. Through the distance relationship table, the optimal optional memory corresponding to the target CPU is found. The optimal optional memory mentioned in this embodiment is not necessarily the memory closest to the target CPU. If the memory closest to the target CPU has no available physical pages, it is necessary to select other available memories with a closer distance. Select the corresponding available memory as the optimal optional memory according to the actual situation. Improve the efficiency of the CPU when executing pending business.

[0117] The creation module 24 creates a resource object in the optimal optional memory; the allocation module 25 allocates the corresponding resource object to the pending business. After the optimal optional memory is obtained, resource objects are created on the optimal optional memory according to different business types. Each object has a node id attribute, which represents the NUMA node to which the memory location of the resource object belongs. When the pending business thread is executed, it needs to request a resource object, and according to its CPU affinity, a resource object with a specific node id is allocated to it. In this way, each pending business thread has a high access efficiency to the resource object it requests.

[0118] This application selects the target CPU with the highest affinity to the business to be processed according to the type of the business to be processed, so as to improve the efficiency of business execution. By materializing the access efficiency between the CPU and the memory as a distance relationship and recording it as a distance relationship table, the optimal optional memory corresponding to the target CPU is found, so as to allocate the optimal resource object to the business to be processed, improve the access efficiency to the resource object, better match the business execution, and improve the execution efficiency of the business.

[0119] In addition, the resource management device based on the NUMA architecture storage system also includes:

[0120] The selection module 23 includes:

[0121] A first acquisition subunit is used to acquire the business demand required by the to-be-processed business;

[0122] A first selection subunit, configured to select a nearest memory having a minimum distance to the target CPU according to the distance relationship table;

[0123] A first judgment subunit is used to judge whether the number of free physical pages in the recent memory meets the business demand; if so, trigger the first determination subunit; if not, trigger the exclusion selection subunit;

[0124] The first determining subunit is configured to use the most recent memory as the optimal optional memory.

[0125] An exclusion selection subunit is used to sequentially select other memories closest to the CPU except the nearest memory until the number of free physical pages of the nearest memory and the other memories meets the business demand;

[0126] The second determining subunit is used to select the most recent memory and the other memory as the optimal optional memory.

[0127] A conversion module, used for obtaining the access efficiency between the CPU and the memory and converting it into a distance mark;

[0128] The recording module is used to record the number of the CPU and the NUMA domain number to which it belongs, the address range of the memory and the NUMA domain number to which it belongs, and the corresponding distance mark into the distance relationship table. It is also used to record the index of the physical page corresponding to the memory, the number of free physical pages, and the number of used physical pages into the distance relationship table.

[0129] A reservation module, used to reserve available physical pages according to the initial memory capacity of the memory and the service requirements, so as to execute the service to be processed;

[0130] The release module is used to receive the corresponding resource object released after the pending business is completed.

[0131] An updating module is used to update the number of free physical pages of the memory to which the resource object belongs in the distance relationship table.

[0132] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.

[0133] Figure 3 A structural diagram of another resource management device based on a NUMA architecture storage system provided in an embodiment of the present application, such as Figure 3 As shown, the resource management device based on the NUMA architecture storage system includes: a memory 30 for storing computer programs;

[0134] The processor 31 is used to implement the steps of the resource management method based on the NUMA architecture storage system in the above embodiment when executing the computer program.

[0135] The resource management device based on the NUMA architecture storage system provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer or a desktop computer.

[0136] Among them, the processor 31 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 31 can be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 31 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 31 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 31 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0137] The memory 30 may include one or more computer-readable storage media, which may be non-transitory. The memory 30 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 30 is at least used to store the following computer program 301, wherein, after the computer program is loaded and executed by the processor 31, it can implement the relevant steps of the resource management method based on the NUMA architecture storage system disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 30 may also include an operating system 302 and data 303, etc., and the storage method may be short-term storage or permanent storage. Among them, the operating system 302 may include Windows, Unix, Linux, etc. The data 303 may include, but is not limited to, data involved in implementing the resource management method based on the NUMA architecture storage system, etc.

[0138] In some embodiments, the resource management device based on the NUMA architecture storage system may also include a display screen 32 , an input and output interface 33 , a communication interface 34 , a power supply 35 , and a communication bus 36 .

[0139] Those skilled in the art will understand that Figure 3 The structure shown in the figure does not constitute a limitation on the resource management device of the storage system based on the NUMA architecture, and may include more or fewer components than those shown in the figure.

[0140] The resource management device based on the NUMA architecture storage system provided in the embodiment of the present application includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the following method: based on the resource management method of the NUMA architecture storage system, receive the business to be processed; obtain the target CPU with the highest affinity to the business to be processed; obtain the optimal optional memory of the target CPU according to the distance relationship table, wherein the distance relationship table records the distance between the CPU and the memory, and the higher the access efficiency of the CPU to the memory, the smaller the distance; create a resource object in the optimal optional memory; allocate the corresponding resource object to the business to be processed. The present application selects the target CPU with the highest affinity to the business to be processed according to the type of the business to be processed, so as to improve the efficiency of business execution, and finds the optimal optional memory corresponding to the target CPU by materializing the access efficiency between the CPU and the memory as a distance relationship and recording it as a distance relationship table, so as to allocate the optimal resource object to the business to be processed, improve the access efficiency to the resource object, better match the business execution, and improve the execution efficiency of the business.

[0141] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the steps described in the above-mentioned resource management method embodiment based on the NUMA architecture storage system (which may be a method corresponding to the server side, or a method corresponding to the diagnostic device side, or a method corresponding to both the server side and the diagnostic device side) are implemented.

[0142] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0143] The computer-readable storage medium provided in this embodiment has a computer program stored thereon. When the processor executes the program, the following method can be implemented: based on the resource management method of the NUMA architecture storage system, receiving the business to be processed; obtaining the target CPU with the highest affinity to the business to be processed; obtaining the optimal optional memory of the target CPU according to the distance relationship table, wherein the distance relationship table records the distance between the CPU and the memory, and the higher the access efficiency of the CPU to the memory, the smaller the distance; creating a resource object in the optimal optional memory; allocating the corresponding resource object to the business to be processed. This application selects the target CPU with the highest affinity to the business to be processed according to the type of the business to be processed, so as to improve the efficiency of business execution, and by materializing the access efficiency between the CPU and the memory as a distance relationship and recording it as a distance relationship table, finds the optimal optional memory corresponding to the target CPU, allocates the optimal resource object to the business to be processed, improves the access efficiency to the resource object, better matches the business execution, and improves the execution efficiency of the business.

[0144] The resource management method, device and medium based on the NUMA architecture storage system provided by the present application are introduced in detail above. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

[0145] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A resource management method based on a NUMA architecture storage system, characterized in that: include: Receive pending business; According to the type of the service to be processed, obtaining a target CPU having the highest affinity with the service to be processed; According to the distance relationship table, the optimal optional memory of the target CPU is obtained, wherein the distance relationship table records the distance between the CPU and the memory, and the higher the access efficiency of the CPU to the memory, the smaller the distance; Creating a resource object in the optimal optional memory; Allocating the corresponding resource object to the business to be processed; The steps for setting the distance relationship table are as follows: Obtaining the access efficiency between the CPU and the memory and converting it into a distance mark; Recording the number of the CPU and the NUMA domain number to which it belongs, the address range of the memory and the NUMA domain number to which it belongs, and the corresponding distance flags into the distance relationship table; Before recording the number of the CPU and the NUMA domain number to which it belongs, the address range of the memory and the NUMA domain number to which it belongs, and the corresponding distance flag into the distance relationship table, it also includes: According to the initial memory capacity of the memory and the service requirements, available physical pages are reserved to execute the service to be processed; Correspondingly, recording the number of the CPU and the NUMA domain number to which it belongs, the address range of the memory and the NUMA domain number to which it belongs, and the corresponding distance flag into the distance relationship table further includes: The index of the physical page corresponding to the memory, the number of free physical pages, and the number of used physical pages are recorded in the distance relationship table.

2. The resource management method based on the NUMA architecture storage system according to claim 1, characterized in that: The step of obtaining the optimal optional memory of the target CPU according to the distance relationship table includes: Obtaining the business demand required for the business to be processed; According to the distance relationship table, selecting the nearest memory with the shortest distance to the target CPU; Determine whether the number of free physical pages in the recent memory meets the business demand; If so, the most recent memory is used as the optimal optional memory.

3. The resource management method based on the NUMA architecture storage system according to claim 2, characterized in that: If the number of free physical pages in the recent memory does not meet the business demand, the method further includes: Sequentially select other memories closest to the CPU except the nearest memory until the number of free physical pages of the nearest memory and the other memories meets the business demand; The most recent memory and the other memories are used as the optimal optional memories.

4. The resource management method based on the NUMA architecture storage system according to claim 1, characterized in that: After allocating the corresponding resource object to the service to be processed, the method further includes: When the pending business is completed, the corresponding resource object is released and received.

5. The resource management method based on the NUMA architecture storage system according to claim 4, characterized in that: After receiving the released corresponding resource object, the method further includes: The number of free physical pages of the memory to which the resource object belongs in the distance relationship table is updated.

6. A resource management device based on a NUMA architecture storage system, characterized in that: include: A receiving module, used for receiving services to be processed; An acquisition module, used for acquiring a target CPU having the highest affinity with the service to be processed according to the type of the service to be processed; A selection module, configured to obtain an optimal optional memory of the target CPU according to a distance relationship table, wherein the distance relationship table records the distance between the CPU and the memory, and the higher the access efficiency of the CPU to the memory, the smaller the distance; A creation module, used for creating a resource object in the optimal optional memory; An allocation module, used for allocating the corresponding resource object to the service to be processed; Also includes: A conversion module, used for obtaining the access efficiency between the CPU and the memory and converting it into a distance mark; A recording module, used for recording the number of the CPU and the NUMA domain number to which it belongs, the address range of the memory and the NUMA domain number to which it belongs, and the corresponding distance mark into the distance relationship table; recording the index of the physical page corresponding to the memory and the number of free physical pages and the number of used physical pages into the distance relationship table; The reservation module is used to reserve available physical pages according to the initial memory capacity of the memory and the business requirements to execute the pending business.

7. A resource management device based on a NUMA architecture storage system, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the resource management method based on the NUMA architecture storage system as described in any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the resource management method based on the NUMA architecture storage system according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Virtual machine memory based on NUMA framework and network card resource affinity calculation method

    CN108021429A

  • Data collecting and processing method, system, device and medium

    CN111858028A