A method, device, equipment and medium for allocating non-uniform memory access resources
By enabling the virtualization resource allocation function in domestic ARM servers to detect and allocate non-uniform memory access resources, the problem of NUMA resource competition conflicts is solved and the stability and efficiency of the server are improved.
Patent Information
- Application Number
- CN202210899235.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-28
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2042-07-28
AI Technical Summary
Domestic ARM servers are prone to NUMA resource competition conflicts during the non-uniform memory access resource allocation process, causing abnormal server downtime and affecting operational stability.
By turning on the virtualized resource allocation function, the basic input and output system is used to obtain non-consistent memory access resource information, and resource occupancy detection and allocation are performed to ensure reasonable allocation and management of resources and avoid resource conflicts.
It effectively avoids NUMA resource competition and conflicts, improves the operational stability and efficiency of the server, and ensures the smooth and efficient operation of the server under virtualization tasks.
Smart Images

Figure CN115113987B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and medium for allocating non-uniform memory access resources. Background Art
[0002] At present, the mainstream servers are still based on the Intel X86 architecture series. The development of Intel X86 architecture services has been stagnant in recent years. Due to the development needs of the times, the replacement of server equipment has accelerated, and a new form of server architecture is urgently needed. ARM (Advanced RISC Machine) architecture servers came into being. In the past two years, ARM architecture servers have developed rapidly. Since domestic ARM servers still have a certain gap compared to the mature X86 ecological environment, domestic ARM servers, namely CPU (Central Processing Unit) is a domestic CPU / firmware (BIOS (Basic Input Output System) / BMC (Baseboard Management Controller)) is a domestic firmware / system OS (Operating System) is also a domestic system and a complete set of domestic ecosystems. Since it is the starting stage of the ecosystem environment, some unexpected problems may occur, among which the allocation of NUMA (Non Uniform Memory Access) resources is one of the problems. The resource information of the CPU's NUMA node is generally opened automatically, and the corresponding resource information is reported to the corresponding hardware device through the BIOS. Using related hardware resources at the same time under the OS causes related NUMA node resource conflicts. Abnormal hardware resource allocation occurs when used under the OS system, which increases the CPU usage burden and causes system crashes.
[0003] As can be seen from the above, in the process of non-uniform memory access resource allocation, how to avoid NUMA resource competition conflicts causing server downtime exceptions and increase the stability of server operation are problems to be solved in this field. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a non-uniform memory access resource allocation method, device, equipment and medium, which can effectively avoid the situation where NUMA resource competition conflicts cause server downtime and increase the stability of server operation. The specific scheme is as follows:
[0005] In a first aspect, the present application discloses a non-uniform memory access resource allocation method, which is applied to a server and includes:
[0006] Set the local virtualization resource allocation function to on;
[0007] Using a local basic input and output system to obtain non-uniform memory access resource information currently occupied by the software, and performing resource occupancy detection based on the non-uniform memory access resource information;
[0008] If the resource occupancy detection fails, non-uniform memory access resource allocation is performed based on the non-uniform memory access resource information.
[0009] Optionally, the step of setting the local virtualization resource allocation function to an enabled state includes:
[0010] The operating system of the server is run, and under the operating system, the local virtualization resource allocation function is turned on by using the CPU of the server.
[0011] Optionally, the performing resource occupancy detection based on the non-uniform memory access resource information includes:
[0012] Determine current resource occupancy information and current resource running node based on the non-uniform memory access resource information;
[0013] Perform resource occupancy detection on the current resource occupancy information and the current resource operation node; the resource occupancy detection includes resource occupancy rate detection and resource operation node detection.
[0014] Optionally, the performing resource occupancy detection based on the non-uniform memory access resource information includes:
[0015] Calculating the current resource occupancy information and the pre-acquired total server resource information to obtain a current resource occupancy rate;
[0016] It is determined whether the current resource occupancy rate is greater than a preset threshold. If the current resource occupancy rate is greater than the preset threshold, the resource occupancy rate detection fails.
[0017] Optionally, the performing resource occupancy detection based on the non-uniform memory access resource information includes:
[0018] Determine all target resource running nodes corresponding to the software;
[0019] It is determined whether the current resource running node is the same as the target resource running node. If the current resource running node is not the same as the target resource running node, the resource running node detection fails.
[0020] Optionally, performing non-uniform memory access resource allocation based on the non-uniform memory access resource information includes:
[0021] If the resource occupancy rate detection fails, a local CPU is used to perform a non-uniform memory access resource allocation operation according to the current resource occupancy information and the total resource information of the server;
[0022] If the resource operation node fails the detection, an unqualified resource operation node is determined based on the current resource operation node and the target resource operation node, and the unqualified resource operation node is placed in a suspended state using a local basic input and output system.
[0023] Optionally, the non-uniform memory access resource allocation method further includes:
[0024] After performing non-uniform memory access resource allocation based on the non-uniform memory access resource information, the process jumps again to the step of performing resource occupancy detection based on the non-uniform memory access resource information.
[0025] In a second aspect, the present application discloses a non-uniform memory access resource allocation device, comprising:
[0026] A function activation module is used to enable the local virtualization resource allocation function;
[0027] A resource occupancy detection module, used to obtain the non-uniform memory access resource information currently occupied by the software by using the local basic input and output system, and perform resource occupancy detection based on the non-uniform memory access resource information;
[0028] The resource allocation module is used to perform non-uniform memory access resource allocation based on the non-uniform memory access resource information if the resource occupancy detection fails.
[0029] In a third aspect, the present application discloses an electronic device, comprising:
[0030] Memory, used to store computer programs;
[0031] The processor is used to execute the computer program to implement the aforementioned non-uniform memory access resource allocation method.
[0032] In a fourth aspect, the present application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed non-uniform memory access resource allocation method are implemented.
[0033] It can be seen that the present application provides a method for allocating non-uniform memory access resources, including setting the local virtualization resource allocation function to an on state; using the local basic input and output system to obtain the non-uniform memory access resource information currently occupied by the software, and performing resource occupancy detection based on the non-uniform memory access resource information; if the resource occupancy detection fails, performing non-uniform memory access resource allocation based on the non-uniform memory access resource information. The present application sets the virtualization resource allocation function to an on state, and then determines whether the current non-uniform memory access resource information resource occupancy detection is qualified. If it fails, reasonable resource allocation and resource management are performed to ensure that while performing virtualization tasks on the server OS, the server HOST is kept running smoothly and efficiently by increasing revenue and reducing expenditure, thereby effectively avoiding the situation where the server crashes due to NUMA resource competition conflicts, and increasing the stability of server operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0035] Figure 1 A flow chart of a non-uniform memory access resource allocation method disclosed in this application;
[0036] Figure 2 A flow chart of a non-uniform memory access resource allocation method disclosed in this application;
[0037] Figure 3 A specific flow chart of a non-uniform memory access resource allocation method disclosed in this application;
[0038] Figure 4 A schematic diagram of the structure of a non-uniform memory access resource allocation device disclosed in this application;
[0039] Figure 5 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] At present, the mainstream servers are still based on the Intel X86 architecture series. The development of Intel X86 architecture services has been stagnant in recent years. Due to the development needs of the times, the replacement of server equipment has accelerated, and a new form of server architecture is urgently needed. ARM (Advanced RISC Machine) architecture servers came into being. In the past two years, ARM architecture servers have developed rapidly. Since domestic ARM servers still have a certain gap compared to the mature X86 ecological environment, domestic ARM servers, namely CPU (Central Processing Unit) is a domestic CPU / firmware (BIOS (Basic Input Output System) / BMC (Baseboard Management Controller)) is a domestic firmware / system OS (Operating System) is also a domestic system and a complete set of domestic ecosystems. Since it is the starting stage of the ecosystem environment, some unexpected problems may occur, among which the allocation of NUMA (Non Uniform Memory Access) resources is one of the problems. The resource information of the CPU's NUMA node is generally automatically opened and the corresponding resource information is reported to the corresponding hardware device through the BIOS. The use of related hardware resources at the same time under the OS causes related NUMA node resource conflicts. Hardware resource allocation exceptions occur under the OS system, which increases the CPU usage burden and causes system crashes. As can be seen from the above, in the process of non-uniform memory access resource allocation, how to avoid NUMA resource competition conflicts that cause server crashes and increase the stability of server operation is a problem to be solved in this field.
[0042] See also Figure 1 As shown, an embodiment of the present invention discloses a method for allocating non-uniform memory access resources, which may specifically include:
[0043] Step S11: Enable the local virtualization resource allocation function.
[0044] In this embodiment, it is applied to the server, taking the FT2000+ server as an example, the server is powered on normally, and then the operating system of the server is run, and the local virtualization resource allocation function is set to the on state using the CPU of the server under the operating system. After the virtualization resource allocation function is set to the on state, operations such as establishing virtual machines and cloud desktops are started.
[0045] Step S12: using the local basic input and output system to obtain the non-uniform memory access resource information currently occupied by the software, and performing resource occupation detection based on the non-uniform memory access resource information.
[0046] In this embodiment, the local basic input and output system is used to obtain the non-uniform memory access resource information currently occupied by the software, and then the current resource occupancy information and the current resource running node are determined based on the non-uniform memory access resource information, and resource occupancy detection is performed on the current resource occupancy information and the current resource running node; wherein, the resource occupancy detection includes resource occupancy rate detection and resource running node detection.
[0047] Step S13: If the resource occupancy detection fails, performing non-uniform memory access resource allocation based on the non-uniform memory access resource information.
[0048] In the embodiment of this city, the specific steps of performing resource occupancy detection on the current resource occupancy information and the current resource operation node are as follows: the current resource occupancy information and the pre-acquired total resource information of the server are calculated to obtain the current resource occupancy rate, and whether the current resource occupancy rate is greater than a preset threshold value. If the current resource occupancy rate is greater than the preset threshold value, the resource occupancy rate detection fails. All target resource operation nodes corresponding to the software are determined, and then it is determined whether the current resource operation node is the same as the target resource operation node. If the current resource operation node is not the same as the target resource operation node, the resource operation node detection fails. Whether the resource occupancy rate detection fails or the resource operation node detection fails, it is determined as a resource occupancy detection failure.
[0049] The present application is applied to servers. Taking the FT2000+ server as an example, the present application is based on the FT2000+ server BIOS to avoid abnormal server downtime caused by NUMA resource competition conflicts. The present application mainly solves the problem that when using NUMA nodes under the OS of the server HOST, the resource competition caused by excessive use of CPU NUMA resources causes the CPU internal resources to be concentrated in a module and the resources are used in a high and chaotic manner, causing a partial collapse of CPU resources, which in turn causes a thousand ripples and causes system downtime and server crashes. In order to avoid the occurrence of this problem, it is necessary to avoid the server OS from calling the CPU's NUMA hardware resources and other problems such as abnormal competition and confusion, which causes concentrated waste of CPU and hardware resources and mutual competition. It is necessary to perform reasonable allocation and resource management on the OS when performing virtualization operations and calling CPU NUMA resources, to ensure that while performing virtualization tasks on the server OS, it is possible to increase revenue and save costs to keep the server HOST running smoothly and efficiently. The OS of the server in this application uses the NUMA resources of the CPU to provide the ACPI table through the server firmware BIOS to report the HOST OS in general. Therefore, the characteristics of the ACPI reporting channel provided by the BIOS can be used to reasonably allocate and efficiently use the corresponding hardware resources of the NUMA node; when there is a NUMA resource conflict, the BIOS identifies the effective resource utilization and shields some conflicting resource reports. When the resource occupancy rate of some hardware using NUMA resources is too high, the BIOS needs to identify the part whose utilization rate exceeds the CPU hardware resource limit value, and limit the corresponding resource consumption, to ensure the normal use of the server HOST customers while not letting the CPU and other related hardware go beyond the edge of the resource warning line, and maintain the stable and efficient operation of the server. Through the efficient control mechanism of the firmware BIOS, it can ensure that the ARM server maintains an efficient and stable operating state when using virtualization operations, and promote the development of domestic ARM CPU platform server services and domestic businesses.
[0050] In this embodiment, the local virtualization resource allocation function is set to the on state; the local basic input and output system is used to obtain the non-uniform memory access resource information currently occupied by the software, and the resource occupancy detection is performed based on the non-uniform memory access resource information; if the resource occupancy detection fails, the non-uniform memory access resource allocation is performed based on the non-uniform memory access resource information. This application sets the virtualization resource allocation function to the on state, and then determines whether the current non-uniform memory access resource information resource occupancy detection is qualified. If it fails, reasonable resource allocation and resource management are performed to ensure that while performing virtualization tasks on the server OS, the server HOST is kept running smoothly and efficiently by saving money and increasing revenue, thereby effectively avoiding the situation where the server crashes due to NUMA resource competition conflicts, and increasing the stability of server operation.
[0051] See also Figure 2 As shown, an embodiment of the present invention discloses a method for allocating non-uniform memory access resources, which may specifically include:
[0052] Step S21: Enable the local virtualization resource allocation function.
[0053] Step S22: using the local basic input and output system to obtain the non-uniform memory access resource information currently occupied by the software, and performing resource occupation detection based on the non-uniform memory access resource information.
[0054] Step S23: If the resource occupancy detection fails, performing non-uniform memory access resource allocation based on the non-uniform memory access resource information.
[0055] In this embodiment, if the resource occupancy rate detection fails, the local CPU is used to perform non-uniform memory access resource allocation operations based on the current resource occupancy information and the total resource information of the server; if the resource operation node detection fails, the unqualified resource operation node is determined based on the current resource operation node and the target resource operation node, and the local basic input and output system is used to put the unqualified resource operation node into a paused state.
[0056] It can be understood that the present application needs to call NUMA resources when the local virtualization resource allocation function is set to the on state, the BIOS allocates the NUMA resources, and then uses the local basic input and output system to obtain the non-uniform memory access resource information currently occupied by the software, and performs resource occupancy detection based on the non-uniform memory access resource information. If the resource occupancy detection fails, that is, there is a problem of high NUMA resource occupancy, the local CPU is used to perform non-uniform memory access resource allocation operations according to the current resource occupancy information and the total resource information of the server, and specifically through the allocation of CPUNUMA resources, the use of high-occupancy CPU NUMA virtualization software resources of some abnormal hardware is restricted; if the resource running node detection fails, that is, there is an uneven distribution of CPU NUMA resources or some hardware cooperates with the server host OS to maliciously occupy NUMA resources, then based on the current resource running node and the target resource running node, the unqualified resource running node is determined, and the local basic input and output system is used to set the unqualified resource running node to a suspended state, that is, the BIOS needs to identify the use of different NUMA nodes, and if there is an abnormality, remove the occupancy of other software and enable the write protection policy for the corresponding NUMA node.
[0057] Step S24: after performing non-uniform memory access resource allocation based on the non-uniform memory access resource information, jump again to the step of performing resource occupancy detection based on the non-uniform memory access resource information.
[0058] In this embodiment, the server firmware BIOS will perform a loop monitoring on the above steps.
[0059] For example, Figure 3As shown, first, the FT2000+ server is powered on and started normally; then the operating system of the server is run, and the local virtualization resource allocation function is turned on using the CPU of the server under the operating system. After the virtualization resource allocation function is turned on, operations such as establishing virtual machines and cloud desktops are started. Specifically, the resources of the NUMA node of the CPU are reported by the domestic server firmware BIOS. The BIOS reports the OS system of the HOST end of the server through ACPI (Advanced Configuration and Power Management Interface). The BIOS mainly reports CPU-related NUMA resources such as memory-related resources and PCIE (Peripheral Component Interconnect Express, high-speed serial computer expansion bus standard) device resource related information resource report, for the server OS side using NUMA stage function is generally in the OS virtualization operation, such as the establishment of virtual machines and cloud desktop operations; because the application when the local virtualization resource allocation function is set to the open state, it is necessary to call NUMA resources, and then use the local basic input and output system to obtain the non-uniform memory access resource information currently occupied by the software, and perform resource occupation detection based on the non-uniform memory access resource information, so as to perform resource allocation, wherein the resource occupation detection includes resource occupation rate detection and resource operation node detection; the specific steps of performing resource occupation detection on the current resource occupation information and the current resource operation node are as follows: the current resource occupation information and the pre-acquired server total resource information are calculated to obtain the current resource occupation rate, and the current resource occupation rate is judged whether it is greater than the preset threshold value, if the current resource occupation rate is greater than the preset threshold value, the resource occupation rate detection is unqualified. Determine all target resource operation nodes corresponding to the software, and then judge whether the current resource operation node is the same as the target resource operation node, if the current resource operation node is not the same as the target resource operation node, the resource operation node detection is unqualified.If the resource occupancy detection fails, that is, there is a problem of high NUMA resource occupancy, then the local CPU is used to perform a non-uniform memory access resource allocation operation according to the current resource occupancy information and the total resource information of the server, and specifically, by allocating CPU NUMA resources, the use of high-occupancy CPU NUMA virtualization software resources of some abnormal hardware is restricted; if the resource running node detection fails, that is, there is a problem of uneven distribution of CPU NUMA resources or some hardware cooperates with the server host OS to maliciously occupy NUMA resources, then based on the current resource running node and the target resource running node, the unqualified resource running node is determined, and the local basic input and output system is used to set the unqualified resource running node to a suspended state, that is, the BIOS needs to identify the use of different NUMA nodes, and if there is an abnormality, remove the occupancy of other software and enable the write protection policy for the corresponding NUMA node; finally, after performing non-uniform memory access resource allocation based on the non-uniform memory access resource information, jump back to the step of performing resource occupancy detection based on the non-uniform memory access resource information, and the server firmware BIOS will monitor the above steps in a loop.
[0060] In this embodiment, the steps of performing resource occupancy detection on the current resource occupancy information and the current resource operation node are as follows: the current resource occupancy information and the pre-acquired server total resource information are calculated to obtain the current resource occupancy rate, and whether the current resource occupancy rate is greater than a preset threshold value. If the current resource occupancy rate is greater than the preset threshold value, the resource occupancy rate detection fails. All target resource operation nodes corresponding to the software are determined, and then it is determined whether the current resource operation node is the same as the target resource operation node. If the current resource operation node is not the same as the target resource operation node, the resource operation node detection fails. Specifically, according to the data size of the circulation of the report NUMA node report resource of the BIOS ACPItable, at the same time, the firmware BIOS is increased to obtain the NUMA node resource competition usage status from the CPU NUMA node to calculate the usage rate of the NUMA node, and according to the resource usage rate judgment, when the NUMA resource conflicts, the BIOS identifies the effective resource utilization and shields some conflicting resource reports. If the occupancy rate of NUMA resources is too high, the server firmware BIOS will restrict the hardware that occupies and wastes resources. The server firmware BIOS itself will not restrict the high-occupancy hardware resources, but it can limit the use of high-occupancy CPU NUMA virtualization software resources by some abnormal hardware through the allocation of CPU NUMA resources; through the BIOS reporting allocation restrictions on CPU NUMA resources, the CPU NUMA resources are used reasonably; if the CPU NUMA resources are unevenly allocated or some hardware cooperates with the server host OS to maliciously occupy NUMA resources, the repeated occupation of resources will have a greater impact on the normal use and performance of the CPU. The server hardware BIOS increases the use of resources that endanger different NUMA channels by monitoring the allocation strategy of the allocated resources. If NUMA resources are reused, the BIOS can determine whether there is a conflicting use / malicious occupation problem by obtaining the CPU NUMA resource utilization rate. If there is a malicious occupation problem, the BIOS needs to identify the use of different NUMA nodes. If there is an abnormality, remove the occupation of other software and enable the write protection policy for the corresponding NUMA node.
[0061] The present application is applied to servers. Taking the FT2000+ server as an example, the present application is based on the FT2000+ server BIOS to avoid abnormal server downtime caused by NUMA resource competition conflicts. The present application mainly solves the problem that when using NUMA nodes under the OS of the server HOST, the resource competition caused by excessive use of CPU NUMA resources causes the CPU internal resources to be concentrated in a module and the resources are used in a high and chaotic manner, causing a partial collapse of CPU resources, which in turn causes a thousand ripples and causes system downtime and server crashes. In order to avoid the occurrence of this problem, it is necessary to avoid the server OS from calling the CPU's NUMA hardware resources and other problems such as abnormal competition and confusion, which causes concentrated waste of CPU and hardware resources and mutual competition. It is necessary to perform reasonable allocation and resource management on the OS when performing virtualization operations and calling CPU NUMA resources, to ensure that while performing virtualization tasks on the server OS, it is possible to increase revenue and save costs to keep the server HOST running smoothly and efficiently. The OS of the server in this application uses the NUMA resources of the CPU to provide the ACPI table through the server firmware BIOS to report the HOST OS in general. Therefore, the characteristics of the ACPI reporting channel provided by the BIOS can be used to reasonably allocate and efficiently use the corresponding hardware resources of the NUMA node; when there is a NUMA resource conflict, the BIOS identifies the effective resource utilization and shields some conflicting resource reports. When the resource occupancy rate of some hardware using NUMA resources is too high, the BIOS needs to identify the part whose utilization rate exceeds the CPU hardware resource limit value, and limit the corresponding resource consumption, to ensure the normal use of the server HOST customers while not letting the CPU and other related hardware go beyond the edge of the resource warning line, and maintain the stable and efficient operation of the server. Through the efficient control mechanism of the firmware BIOS, it can ensure that the ARM server maintains an efficient and stable operating state when using virtualization operations, and promote the development of domestic ARM CPU platform server services and domestic businesses.
[0062] In this embodiment, the local virtualization resource allocation function is set to the on state; the local basic input and output system is used to obtain the non-uniform memory access resource information currently occupied by the software, and the resource occupancy detection is performed based on the non-uniform memory access resource information; if the resource occupancy detection fails, the non-uniform memory access resource allocation is performed based on the non-uniform memory access resource information. This application sets the virtualization resource allocation function to the on state, and then determines whether the current non-uniform memory access resource information resource occupancy detection is qualified. If it fails, reasonable resource allocation and resource management are performed to ensure that while performing virtualization tasks on the server OS, the server HOST is kept running smoothly and efficiently by saving money and increasing revenue, thereby effectively avoiding the situation where the server crashes due to NUMA resource competition conflicts, and increasing the stability of server operation.
[0063] See also Figure 4 As shown, an embodiment of the present invention discloses a non-uniform memory access resource allocation device, which may specifically include:
[0064] A function activation module 11, used to set the local virtualization resource allocation function to an activated state;
[0065] A resource occupancy detection module 12, configured to obtain the non-uniform memory access resource information currently occupied by the software by using the local basic input and output system, and perform resource occupancy detection based on the non-uniform memory access resource information;
[0066] The resource allocation module 13 is configured to perform non-uniform memory access resource allocation based on the non-uniform memory access resource information if the resource occupancy detection fails.
[0067] In this embodiment, the local virtualization resource allocation function is set to the on state; the local basic input and output system is used to obtain the non-uniform memory access resource information currently occupied by the software, and the resource occupancy detection is performed based on the non-uniform memory access resource information; if the resource occupancy detection fails, the non-uniform memory access resource allocation is performed based on the non-uniform memory access resource information. This application sets the virtualization resource allocation function to the on state, and then determines whether the current non-uniform memory access resource information resource occupancy detection is qualified. If it fails, reasonable resource allocation and resource management are performed to ensure that while performing virtualization tasks on the server OS, the server HOST is kept running smoothly and efficiently by saving money and increasing revenue, thereby effectively avoiding the situation where the server crashes due to NUMA resource competition conflicts, and increasing the stability of server operation.
[0068] The present application is applied to servers. Taking the FT2000+ server as an example, the present application is based on the FT2000+ server BIOS to avoid abnormal server downtime caused by NUMA resource competition conflicts. The present application mainly solves the problem that when using NUMA nodes under the OS of the server HOST, the resource competition caused by excessive use of CPU NUMA resources causes the CPU internal resources to be concentrated in a module and the resources are used in a high and chaotic manner, causing a partial collapse of CPU resources, which in turn causes a thousand ripples and causes system downtime and server crashes. In order to avoid the occurrence of this problem, it is necessary to avoid the server OS from calling the CPU's NUMA hardware resources and other problems such as abnormal competition and confusion, which causes concentrated waste of CPU and hardware resources and mutual competition. It is necessary to perform reasonable allocation and resource management on the OS when performing virtualization operations and calling CPU NUMA resources, to ensure that while performing virtualization tasks on the server OS, it is possible to increase revenue and save costs to keep the server HOST running smoothly and efficiently. The OS of the server in this application uses the NUMA resources of the CPU to provide the ACPI table through the server firmware BIOS to report the HOST OS in general. Therefore, the characteristics of the ACPI reporting channel provided by the BIOS can be used to reasonably allocate and efficiently use the corresponding hardware resources of the NUMA node; when there is a NUMA resource conflict, the BIOS identifies the effective resource utilization and shields some conflicting resource reports. When the resource occupancy rate of some hardware using NUMA resources is too high, the BIOS needs to identify the part whose utilization rate exceeds the CPU hardware resource limit value, and limit the corresponding resource consumption, to ensure the normal use of the server HOST customers while not letting the CPU and other related hardware go beyond the edge of the resource warning line, and maintain the stable and efficient operation of the server. Through the efficient control mechanism of the firmware BIOS, it can ensure that the ARM server maintains an efficient and stable operating state when using virtualization operations, and promote the development of domestic ARM CPU platform server services and domestic businesses.
[0069] In some specific embodiments, the function activation module 11 may specifically include:
[0070] The function activation module is used to run the operating system of the server and use the CPU of the server to set the local virtualization resource allocation function to an activated state under the operating system.
[0071] In some specific embodiments, the resource occupancy detection module 12 may specifically include:
[0072] An information determination module, used to determine current resource occupancy information and current resource running node based on the non-uniform memory access resource information;
[0073] The resource occupancy detection module is used to perform resource occupancy detection on the current resource occupancy information and the current resource operation node; the resource occupancy detection includes resource occupancy rate detection and resource operation node detection.
[0074] In some specific embodiments, the resource occupancy detection module 12 may specifically include:
[0075] A resource occupancy rate calculation module, used to calculate the current resource occupancy information and the pre-acquired server total resource information to obtain the current resource occupancy rate;
[0076] The resource occupancy rate detection module is used to determine whether the current resource occupancy rate is greater than a preset threshold. If the current resource occupancy rate is greater than the preset threshold, the resource occupancy rate detection fails.
[0077] In some specific embodiments, the resource occupancy detection module 12 may specifically include:
[0078] A target resource running node determination module is used to determine all target resource running nodes corresponding to the software;
[0079] The resource operation node detection module is used to determine whether the current resource operation node is the same as the target resource operation node. If the current resource operation node is not the same as the target resource operation node, the resource operation node detection fails.
[0080] In some specific embodiments, the resource allocation module 13 may specifically include:
[0081] A resource occupancy allocation module, used for performing a non-uniform memory access resource allocation operation using a local CPU according to the current resource occupancy information and the total resource information of the server if the resource occupancy detection fails;
[0082] The resource operation node allocation module is used to determine the unqualified resource operation node based on the current resource operation node and the target resource operation node if the resource operation node detection is unqualified, and use the local basic input and output system to put the unqualified resource operation node into a suspended state.
[0083] In some specific embodiments, the resource allocation module 13 may specifically include:
[0084] The step jump module is used to jump again to the step of performing resource occupancy detection based on the non-uniform memory access resource information after performing non-uniform memory access resource allocation based on the non-uniform memory access resource information.
[0085] Figure 5A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the non-uniform memory access resource allocation method performed by the electronic device disclosed in any of the aforementioned embodiments.
[0086] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0087] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.
[0088] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20 to realize the operation and processing of the data 223 in the memory 22 by the processor 21, which can be Windows, Unix, Linux, etc. In addition to including a computer program that can be used to complete the non-uniform memory access resource allocation method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to including data transmitted from an external device received by the non-uniform memory access resource allocation device, the data 223 can also include data collected by its own input and output interface 25, etc.
[0089] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0090] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the non-uniform memory access resource allocation method disclosed in any of the aforementioned embodiments are implemented.
[0091] Finally, it should be noted that, in this article, 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 "include", "comprise" 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, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0092] The above is a detailed introduction to a non-uniform memory access resource allocation method, device, equipment and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for allocating non-uniform memory access resources. It is characterized in that Applicable to servers, including: Set the local virtualization resource allocation function to on; Using a local basic input and output system to obtain non-uniform memory access resource information currently occupied by the software, and performing resource occupancy detection based on the non-uniform memory access resource information; If the resource occupancy detection fails, performing non-uniform memory access resource allocation based on the non-uniform memory access resource information; The resource occupancy detection based on the non-uniform memory access resource information includes: Determine the current resource occupancy information and the current resource operation node based on the non-uniform memory access resource information; perform resource occupancy detection on the current resource occupancy information and the current resource operation node; the resource occupancy detection includes resource occupancy rate detection and resource operation node detection; Calculating the current resource occupancy information and the pre-acquired total resource information of the server to obtain the current resource occupancy rate; judging whether the current resource occupancy rate is greater than a preset threshold, if the current resource occupancy rate is greater than the preset threshold, the resource occupancy rate detection fails; Determine all target resource operation nodes corresponding to the software; determine whether the current resource operation node is the same as the target resource operation node, if the current resource operation node is not the same as the target resource operation node, the resource operation node detection fails; If the resource occupancy rate detection fails, the local CPU is used to perform non-uniform memory access resource allocation operations based on the current resource occupancy information and the total resource information of the server; if the resource operation node detection fails, the unqualified resource operation node is determined based on the current resource operation node and the target resource operation node, and the local basic input and output system is used to put the unqualified resource operation node into a paused state.
2. The non-uniform memory access resource allocation method according to claim 1, It is characterized in that The step of setting the local virtualization resource allocation function to an on state includes: The operating system of the server is run, and under the operating system, the local virtualization resource allocation function is turned on by using the CPU of the server.
3. The non-uniform memory access resource allocation method according to claim 1, It is characterized in that Also includes: After performing non-uniform memory access resource allocation based on the non-uniform memory access resource information, the process jumps again to the step of performing resource occupancy detection based on the non-uniform memory access resource information.
4. A non-uniform memory access resource allocation device, It is characterized in that include: A function activation module is used to enable the local virtualization resource allocation function; A resource occupancy detection module, used to obtain the non-uniform memory access resource information currently occupied by the software by using the local basic input and output system, and perform resource occupancy detection based on the non-uniform memory access resource information; A resource allocation module, configured to perform non-uniform memory access resource allocation based on the non-uniform memory access resource information if the resource occupancy detection fails; Wherein, the resource occupancy detection module includes: An information determination module, used to determine current resource occupancy information and current resource running node based on the non-uniform memory access resource information; A resource occupancy detection module, used to perform resource occupancy detection on the current resource occupancy information and the current resource operation node; the resource occupancy detection includes resource occupancy rate detection and resource operation node detection; A resource occupancy rate calculation module, used to calculate the current resource occupancy information and the pre-acquired server total resource information to obtain the current resource occupancy rate; A resource occupancy rate detection module, used to determine whether the current resource occupancy rate is greater than a preset threshold value. If the current resource occupancy rate is greater than the preset threshold value, the resource occupancy rate detection fails; A target resource running node determination module is used to determine all target resource running nodes corresponding to the software; A resource operation node detection module is used to determine whether the current resource operation node is the same as the target resource operation node. If the current resource operation node is not the same as the target resource operation node, the resource operation node detection fails; A resource occupancy allocation module, used for performing a non-uniform memory access resource allocation operation using a local CPU according to the current resource occupancy information and the total resource information of the server if the resource occupancy detection fails; The resource operation node allocation module is used to determine the unqualified resource operation node based on the current resource operation node and the target resource operation node if the resource operation node detection is unqualified, and use the local basic input and output system to put the unqualified resource operation node into a suspended state.
5. An electronic device, It is characterized in that include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the non-uniform memory access resource allocation method according to any one of claims 1 to 3.
6. A computer-readable storage medium, It is characterized in that Used to store a computer program; wherein, when the computer program is executed by a processor, the non-uniform memory access resource allocation method according to any one of claims 1 to 3 is implemented.
