Hard disk test method, device and equipment and readable storage medium

By obtaining the mapping information between the hard disk and the access node, adjusting the balance of the number of hard disks, and allocating the same number of processors to the access node, the problem of poor performance of individual disks in the hard disk test is solved, and the accuracy and efficiency of hard disk tests are achieved.

CN119724304AActive Publication Date: 2025-03-28INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202411998438.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-03-28
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

When conducting hard disk performance testing, there are always some disks that have poor performance, which is inconsistent with the actual situation, which will affect the accuracy of hard disk testing.

Method used

By obtaining the mapping information between the hard disk and the access node, determine whether the number of hard disks allocated by the access node is balanced. If it is unbalanced, make adjustments to ensure that the number of hard disks allocated by each access node is balanced, and then allocate the same number of processors to the access node, and perform hard disk testing based on the non-consistent memory access architecture.

Benefits of technology

By ensuring the balance of processors assigned by the hard disk, the read and write operation efficiency during hard disk testing is improved, the situation where individual disk detection is inconsistent with the actual situation is avoided, and the accuracy of hard disk testing is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119724304A_ABST
    Figure CN119724304A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of storage, in particular to a hard disk testing method, device and equipment and a readable storage medium. The method comprises the steps that mapping information of a hard disk and an access node is acquired; wherein the access node is a node in a non-uniform memory access architecture; determining whether the number of hard disks distributed to the access node is balanced by using the mapping information; if not, adjusting the number of the hard disks allocated to the access node, and returning to obtain the mapping information of the hard disks and the access node again; and if yes, allocating the same number of processors to the hard disk in the access node, and then testing the hard disk based on the non-consistent memory access architecture. According to the invention, after resource balanced allocation is satisfied, hard disk testing is carried out on the non-consistent memory access architecture, so that efficient processing of read-write operation on a processor level can be ensured, detection of individual disks is prevented from being inconsistent with reality, and the accuracy of hard disk testing can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of storage technology, and in particular to a hard disk testing method, device, equipment and readable storage medium. Background Art

[0002] In traditional computers, all processors (CPU, Central Processing Unit) generally access the entire DRAM (Dynamic Random Access Memory, system memory) at the same speed. The operating system treats all processors equally when allocating memory. The memory management module only needs to find a free space for the applicant. This memory architecture is called consistent memory access (UMA, Unified Memory Architeture).

[0003] Modern computers, especially servers, have numerous processors and massive memory, which may be distributed on multiple nodes. Processors have different access speeds to different nodes. Accordingly, the memory management module needs to allow each processor to access the memory node closest to it as much as possible to improve system performance. This architecture is called Non Uniform Memory Access Architecture (NUMA).

[0004] However, when multiple SSDs (Solid State Disks) on a server are tested for performance, it is found that the performance of some individual disks is always very poor, which is inconsistent with the actual situation.

[0005] In summary, how to effectively ensure the accuracy of hard disk testing is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0006] The purpose of this application is to provide a hard disk testing method, device, equipment and readable storage medium, which can improve the efficiency of read and write operations during the hard disk testing process, thereby ensuring the accuracy of the hard disk testing.

[0007] In order to solve the above technical problems, this application provides the following technical solutions:

[0008] A hard disk testing method, comprising:

[0009] Obtain mapping information between a hard disk and an access node; wherein the access node is a node in a non-uniform memory access architecture;

[0010] Using the mapping information, determine whether the number of hard disks allocated to the access node is balanced;

[0011] If not, the number of hard disks allocated to the access node is adjusted, and the mapping information between the hard disk and the access node is retrieved again;

[0012] If yes, after allocating the same number of processors to the hard disks in the access node, a hard disk test is performed based on the non-uniform memory access architecture.

[0013] Preferably, obtaining mapping information between a hard disk and an access node includes:

[0014] Get the drive letter corresponding to the hard disk to be tested;

[0015] Using the drive letter, query the hardware configuration information of the hard disk;

[0016] Determining the physical slot position of the hard disk from the hard disk configuration information;

[0017] The access node to which the hard disk belongs is determined using the physical slot position to obtain the mapping information.

[0018] Preferably, using the drive letter and the physical slot position to determine the access node to which the hard disk belongs to obtain the mapping information includes:

[0019] Use the physical slot location to determine the access node to which the hard disk belongs and build a mapping table;

[0020] The mapping information is acquired from the mapping table.

[0021] Preferably, adjusting the number of hard disks allocated to the access node includes:

[0022] Get the relationship information between the access node, the hard disk and the physical slot location of the hard disk;

[0023] The relationship information is used to adjust the number of hard disks allocated to the access nodes to balance the number of hard disks allocated to the access nodes.

[0024] Preferably, allocating the same number of processors to the hard disks in the access nodes includes:

[0025] Get the number of processors and hard disks corresponding to the access node;

[0026] The same number of processors is allocated to the hard disks in the access node using the number of processors and the number of hard disks.

[0027] Preferably, using the number of processors and the number of hard disks to allocate the same number of processors to the hard disks in the access node includes:

[0028] Get the specified number of processors assigned to the hard disk;

[0029] Calculating a ratio of the number of processors to the number of hard disks;

[0030] using the ratio to determine whether the hard disk can be allocated to the specified number of processors;

[0031] If yes, obtaining a list of available processors and determining the specified number of processors from the interval region;

[0032] Allocate the determined processor to the hard disk;

[0033] deleting the assigned processor from the list of available processors;

[0034] If not, determining whether the number of processors is less than the number of hard disks;

[0035] If the number of processors is less than the number of hard disks, an abnormality troubleshooting process is triggered;

[0036] After the abnormality is checked, the mapping information between the hard disk and the access node is retrieved;

[0037] If the number of processors is greater than or equal to the number of hard disks, the target number is determined using the ratio;

[0038] Obtain a list of available processors and determine the target number of processors from the interval area;

[0039] Allocate the determined processor to the hard disk;

[0040] The assigned processor is deleted from the list of available processors.

[0041] Preferably, performing a hard disk test based on the non-uniform memory access architecture includes:

[0042] Bind the read and write threads of the input and output test tool to the processor;

[0043] The input-output test tool is used to perform a performance test on a target hard disk in the non-uniform memory access architecture.

[0044] A hard disk testing device, comprising:

[0045] A mapping information acquisition module is used to acquire mapping information between a hard disk and an access node; wherein the access node is a node in a non-uniform memory access architecture;

[0046] A node hardware balance judgment module is used to use the mapping information to determine whether the number of hard disks allocated to the access node is balanced;

[0047] The node hardware balance processing module is used to adjust the number of hard disks allocated to the access node if the number of hard disks allocated to the access node is unbalanced, and return to re-acquire the mapping information between the hard disk and the access node;

[0048] The hard disk test module is used to perform hard disk testing based on the non-uniform memory access architecture after allocating the same number of processors to the hard disks in the access nodes if the number of hard disks allocated to the access nodes is balanced.

[0049] An electronic device, comprising:

[0050] Memory for storing computer programs;

[0051] A processor is used to implement the steps of the hard disk testing method when executing the computer program.

[0052] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the hard disk testing method are implemented.

[0053] A computer program product includes a computer program / instruction. When the computer program / instruction is executed by a processor, the steps of the hard disk testing method are implemented.

[0054] Apply the method provided in the embodiment of the present application to obtain mapping information between hard disks and access nodes; wherein the access nodes are nodes in a non-consistent memory access architecture; use the mapping information to determine whether the number of hard disks allocated to the access nodes is balanced; if not, adjust the number of hard disks allocated to the access nodes, and return to re-acquire the mapping information between the hard disks and the access nodes; if yes, after allocating the same number of processors to the hard disks in the access nodes, perform a hard disk test based on the non-consistent memory access architecture.

[0055] The non-consistent memory access architecture involves the processor having different access speeds to the hard disk. In this application, before performing the hard disk test, the mapping relationship between the hard disk and the access node is first obtained. Then, based on the mapping relationship, it is determined whether the number of hard disks allocated to the access node is balanced. If it is unbalanced, the number of hard disks allocated to the access node is adjusted to balance the number of hard disks allocated to the access node, and then return to re-acquire the mapping information of the hard disk and the access node. If it is balanced, the same number of processors can be further allocated to the hard disks in the access node. In this way, it can be ensured that each hard disk can be allocated the same number of processors, thereby achieving resource balancing. After satisfying the balanced allocation of resources, performing a hard disk test in the non-consistent memory access architecture can ensure efficient processing of read and write operations at the processor level, thereby avoiding the detection of individual disks that are inconsistent with the actual situation, and ensuring the accuracy of the hard disk test.

[0056] Correspondingly, the embodiments of the present application also provide a hard disk testing device, equipment, readable storage medium and computer program product corresponding to the above-mentioned hard disk testing method, which have the above-mentioned technical effects and are not repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. 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 creative work.

[0058] Figure 1 This is a flowchart of a hard disk testing method in an embodiment of the present application;

[0059] Figure 2 It is a schematic diagram of consistent memory access;

[0060] Figure 3 A schematic diagram of non-uniform memory access;

[0061] Figure 4 This is a schematic diagram of a specific implementation of a hard disk testing method in an embodiment of the present application;

[0062] Figure 5 This is a schematic diagram of a comparison before and after resource balanced allocation in an embodiment of the present application;

[0063] Figure 6 This is a structural schematic diagram of a hard disk testing device in an embodiment of the present application;

[0064] Figure 7 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application;

[0065] Figure 8 This is a schematic diagram of the specific structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0066] 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. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0067] When multiple SSDs on a server are tested for performance, it is found that some individual disks always have very poor performance. After verification, this is related to the imbalance of allocated resources. However, since the number of disks tested each time is not fixed, a fixed configuration cannot be used to perform the core binding operation. Therefore, in the hard disk testing method provided in this application, a set of dynamic core binding methods is proposed. By automatically associating the SSD device with the NUMA node, the dynamic adjustment strategy of the NUMA node CPU core and the SSD binding, the CPU core list is evenly distributed and dynamically adjusted to ensure efficient processing of IO operations at the CPU level, thereby avoiding the detection of individual disks that are inconsistent with the actual situation and ensuring the accuracy of hard disk testing. For details, please refer to Figure 1 , Figure 1 This is a flow chart of a hard disk testing method in an embodiment of the present application, the method comprising the following steps:

[0068] S101, obtaining mapping information between a hard disk and an access node.

[0069] The access node is a node in a non-uniform memory access architecture.

[0070] First, a brief description of UMA and NUMA is given.

[0071] Please refer to Figure 2 , all processors (CPU, Central Processing Unit) access the entire DRAM (Dynamic Random Access Memory, system memory) at the same speed. The operating system treats all processors equally when allocating memory. The memory management module only needs to find a free space for the applicant. This memory architecture is called consistent memory access (UMA, Unified Memory Architeture).

[0072] Please refer to Figure 3 , numerous processors and massive memory, these memories may be distributed on multiple different nodes, and the processors have different access speeds to different nodes. Accordingly, the memory management module needs to try to let each processor access the memory node closest to itself to improve system performance. This architecture is called Non-Uniform Memory Access Architecture (NUMA).

[0073] The NUMA architecture essentially divides M CPUs into N groups, each of which is connected by an IMC BUS bus. Each group is called a Node (i.e., a node, referred to as an access node in this article). Its structure is similar to a small UMA, and each Node has an integrated memory controller IMC (Intergrated Memory Controller). The CPUs in the group are connected by the IMCBUS bus, and the nodes are connected by the QPI (direct link) bus. The QPI latency is significantly higher than the IMCBUS.

[0074] from Figure 3 It can be seen that there is a mapping relationship between the Node and the SSD in the NUMA architecture. Therefore, in order to achieve balanced resource allocation, the mapping relationship between the hard disk and the access node can be obtained first.

[0075] In a specific implementation of the present application, obtaining mapping information between a hard disk and an access node includes:

[0076] Get the drive letter corresponding to the hard disk to be tested;

[0077] Use the drive letter to query the hardware configuration information of the hard disk;

[0078] Determine the physical slot location of the hard disk from the hard disk configuration information;

[0079] The physical slot location is used to determine the access node to which the hard disk belongs to obtain mapping information.

[0080] The access node to which the hard disk belongs is determined by using the drive letter and the physical slot position to obtain mapping information, including:

[0081] Use the physical slot location to determine the access node to which the hard disk belongs and build a mapping table;

[0082] Get mapping information from the mapping table.

[0083] For ease of description, the above steps are combined for explanation below.

[0084] First, the test engineer records in detail the identifiers (i.e., drive letters) of the multiple SSD devices to be tested.

[0085] Next, traverse the SSD devices through the recorded drive letters, and identify the physical slot location (i.e., physical slot location) to which each SSD device is connected by querying the system's hardware configuration information, and classify these SSDs according to the NUMANode (i.e., access node) to which they belong. In this way, a detailed mapping table of NUMA Node and SSD device identifier list can be constructed based on the classification. In this mapping table, multiple SSD device identifiers may be listed under each NUMA Node, which reflects the distribution of SSD devices on different NUMA Nodes. In other words, based on this mapping table, the mapping relationship between the hard disk and the access node can be clearly defined, that is, which access node the hard disk is under and which hard disks are under the access node.

[0086] S102: Using the mapping information, determine whether the number of hard disks allocated to the access nodes is balanced.

[0087] Since the mapping information can indicate which hard disks are under the access node, it is possible to determine whether the number of hard disks allocated to the access node is balanced based on the mapping information. For example, if there are two access nodes, access node 1 has N hard disks, and access node 2 has M hard disks, when N and M are not equal, it can be considered that the number of hard disks allocated to the access node is unbalanced.

[0088] After determining whether the hard disks allocated to the access node are balanced, subsequent processing operations can be performed according to the specific judgment result. Specifically, if the judgment result is no, step S103 can be performed, and if the judgment result is yes, step S104 can be performed.

[0089] S103: Adjust the number of hard disks allocated to the access node, and return to reacquire the mapping information between the hard disk and the access node.

[0090] For example, before adjustment, access node 1 is allocated 3 hard disks and access node 2 is allocated 5 hard disks. After adjustment, access node 1 is allocated 4 hard disks and access node 2 is allocated 4 hard disks. It is also possible that access node 1 is allocated 6 hard disks and access node 2 is allocated 2 hard disks.

[0091] In order to ensure the high efficiency of IO operations, in this embodiment, when it is found that the number of hard disks allocated to the access nodes is unbalanced, the number of hard disks allocated to the access nodes can be adjusted to balance the number of hard disks allocated to the access nodes. After adjusting the number of hard disks allocated to the access nodes, return to step S101 to continue executing step S104 when it is clear that the number of hard disks allocated to the access nodes is balanced.

[0092] Of course, in actual applications, if the number of hard disks allocated to the access nodes is adjusted, and it can be clearly determined that after the adjustment, the number of hard disks allocated to the access nodes is balanced, then there is no need to return to step S101, but to directly execute step S104. For example, before the adjustment, access node 1 is allocated with 3 hard disks, and access node 2 is allocated with 5 hard disks. During the adjustment, the ratio between the number of all hard disks and the number of access nodes is calculated, and the allocation is performed according to the ratio, that is, (3+5) / 2=4, and 4 hard disks are allocated to access node 1 and 4 hard disks are allocated to access node 2. This can achieve that after the reallocation, the number of hard disks allocated to the two access nodes is balanced, and the operation of step S104 can be directly executed.

[0093] In a specific implementation of the present application, adjusting the number of hard disks allocated to the access node includes:

[0094] Get the relationship information between the access node, the hard disk and the physical slot location of the hard disk;

[0095] The relationship information is used to adjust the number of hard disks allocated to the access nodes to balance the number of hard disks allocated to the access nodes.

[0096] For ease of description, the above steps are combined for explanation below.

[0097] To ensure optimal system performance, it is necessary to ensure that the number of SSDs allocated to each NUMA Node is equal. If uneven distribution is found, you can use the commands provided by the Linux system, such as lspci or lsblk, to obtain the exact physical slot information of each SSD, and generate a detailed relationship table between the NUMA Node and the SSD drive letter and physical slot. Based on this relationship table, engineers can adjust the physical connection of the SSD to ensure that the number of SSDs on each NUMA Node is balanced.

[0098] S104: After allocating the same number of processors to the hard disks in the access node, a hard disk test is performed based on a non-uniform memory access architecture.

[0099] After ensuring that the number of SSDs on each NUMA Node is balanced, the same number of processors can be allocated to the hard disks in the access node, so that the processors allocated to the hard disks are also balanced. In this way, it can be ensured that each hard disk can be allocated the same number of processors, thereby achieving resource balance. After satisfying the balanced resource allocation, hard disk testing in this non-uniform memory access architecture can ensure efficient processing of read and write operations at the processor level, thereby avoiding the situation where the detection of individual disks is inconsistent with the actual situation, and ensuring the accuracy of hard disk testing.

[0100] In a specific implementation of the present application, allocating the same number of processors to hard disks in access nodes includes:

[0101] Get the number of processors and hard disks corresponding to the access node;

[0102] Using the number of processors and the number of hard disks, the same number of processors is assigned to access the hard disks in the node.

[0103] The same number of processors is allocated to the hard disks in the access node by using the number of processors and the number of hard disks, including:

[0104] Get the specified number of processors assigned to the hard disk;

[0105] Calculate the ratio of the number of processors to the number of hard disks;

[0106] Use the ratio to determine whether the hard disk can be allocated to the specified number of processors;

[0107] If so, obtain a list of available processors and determine a specified number of processors from the interval region;

[0108] Allocate the determined processor to the hard disk;

[0109] Remove the assigned processor from the list of available processors;

[0110] If not, determine whether the number of processors is less than the number of hard disks;

[0111] If the number of processors is less than the number of hard disks, the abnormality troubleshooting process is triggered;

[0112] After the abnormality is checked, the mapping information between the hard disk and the access node is retrieved;

[0113] If the number of processors is greater than or equal to the number of hard disks, the ratio is used to determine the target number;

[0114] Get a list of available processors and determine a target number of processors from the interval area;

[0115] Allocate the determined processor to the hard disk;

[0116] Removes an assigned processor from the list of available processors.

[0117] For ease of description, the above steps are combined for explanation below.

[0118] Please refer to Figure 4After completing the physical allocation balance of the SSD, the system can traverse each NUMA Node and compare the number of CPU cores on the NUMA Node with the number of SSDs allocated to it (B). Through this comparison, A is compared with B, and based on the obtained ratio, it can be determined whether each SSD can be allocated to the preset number of CPU cores. If a certain SSD cannot be allocated enough CPU cores, the number of cores that can be allocated to each SSD will be reset according to the actual number of CPU cores. When it is found that A is less than B, that is, it cannot be guaranteed that each SSD is allocated at least one CPU core, the abnormality troubleshooting process will be triggered, such as reminding to replace the CPU or check the slot connection.

[0119] Considering that the CPU cores on each NUMA Node are distributed in intervals, such as the two regions 0-7 and 16-23, the number of CPU cores N actually allocated to each SSD is evenly distributed to these two regions. The specific operation is to select N / 2 CPU cores from each region, and after each selection, remove these allocated CPU cores from the list of available CPU cores to prevent them from being repeatedly allocated to other SSDs.

[0120] In this way, it is ultimately possible to ensure that each SSD can be allocated the same number of CPU cores. This configuration provides a solid foundation for performance testing using fio or other IO testing tools. During the test, by binding a specific SSD to a specific CPU core, the consistency of resource allocation can be ensured, resulting in more accurate and reliable test results. This not only improves the efficiency of the test, but also provides an important reference for system performance optimization.

[0121] In a specific implementation of the present application, a hard disk test is performed based on a non-uniform memory access architecture, including:

[0122] Bind the read and write threads of the input and output test tool to the processor;

[0123] Use the input and output test tool to perform performance testing on the target hard disk in the non-uniform memory access architecture.

[0124] For ease of description, the above steps are combined for explanation below.

[0125] When testing the SSD performance of a single disk on a NUMA architecture, bind the read and write threads of fio (an input and output testing tool) to the CPU core, so that the SSD rate will be closer to the theoretical data.

[0126] The core binding process is as follows:

[0127] 1. Confirm which NUMA Node the hard disk physically belongs to;

[0128] 2. Which CPU cores (i.e. CPU cores, corresponding to processors) does the NUMA Node correspond to, and select the CPU core from them;

[0129] 3. Bind the selected CPU core to the hard disk.

[0130] In a specific implementation of the present application, the core binding process includes:

[0131] Determine the target hard disk from the hard disk records to be tested;

[0132] Determine the target access node to which the target hard disk is physically subordinated by using the mapping table;

[0133] Determine the processors corresponding to the target access node by using the relationship table, and select the target processor from these processors;

[0134] Binding the target processor to a target hard disk;

[0135] Accordingly, after the binding is completed, the target hard disk is tested based on fio, and after the target hard disk test is completed, the target hard disk is deleted from the hard disk record to be tested;

[0136] Determine whether the hard disk record to be tested is empty;

[0137] If it is empty, the test ends; if it is not empty, the process returns to the step of determining the target hard disk from the hard disk records to be tested.

[0138] Apply the method provided in the embodiment of the present application to obtain mapping information between hard disks and access nodes; wherein the access nodes are nodes in a non-consistent memory access architecture; use the mapping information to determine whether the number of hard disks allocated to the access nodes is balanced; if not, adjust the number of hard disks allocated to the access nodes, and return to re-acquire the mapping information between the hard disks and the access nodes; if yes, after allocating the same number of processors to the hard disks in the access nodes, perform a hard disk test based on the non-consistent memory access architecture.

[0139] The non-consistent memory access architecture involves the processor having different access speeds to the hard disk. In this application, before performing the hard disk test, the mapping relationship between the hard disk and the access node is first obtained. Then, based on the mapping relationship, it is determined whether the number of hard disks allocated to the access node is balanced. If it is unbalanced, the number of hard disks allocated to the access node is adjusted, and the mapping information of the hard disk and the access node is returned to be re-acquired. If it is balanced, the same number of processors can be further allocated to the hard disks in the access node. In this way, it can be ensured that each hard disk can be allocated the same number of processors, thereby achieving resource balancing. After satisfying the balanced allocation of resources, performing a hard disk test in this non-consistent memory access architecture can ensure efficient processing of read and write operations at the processor level, thereby avoiding the detection of individual disks that are inconsistent with the actual situation, and ensuring the accuracy of the hard disk test.

[0140] To facilitate understanding, the hard disk testing method is described in detail below with reference to specific application examples.

[0141] Please refer to Figure 5 , assuming that there are two NUMA nodes (of course, in actual applications, there may be more, and in this example, for the sake of convenience, the node is 2) on the server, and 8 SSDs, according to the physical slot position, it can be found that 5 are in NUMA node 1 and the other 3 are in NUMA node 2. After executing the resource adjustment in the disk test method provided in the above embodiment, each NUMA node can be maintained to have 4 SSDs. The specific CPU cores allocated to each SSD are shown in the following table.

[0142]

[0143] It can be seen that the hard disk testing method provided in the embodiment of the present application is aimed at optimizing the allocation and management of SSD (solid state disk) devices in a multi-NUMA node server environment, thereby performing testing, and has the following technical effects:

[0144] 1. Improve system performance: By ensuring that each NUMA Node is assigned the same number of SSDs, the data processing load is balanced and data access across NUMA Nodes is reduced, thereby reducing access latency and improving data processing efficiency.

[0145] 2. Optimize resource utilization: By balancing the number of SSDs on each NUMA Node, the reasonable allocation of CPU resources and storage resources is ensured, so that each resource can be fully utilized and resource waste is avoided.

[0146] 3. Enhanced consistency of data processing: By ensuring that each SSD can be allocated the same number of CPU cores, it is ensured that each SSD has sufficient processing power when performing IO operations, thereby improving the consistency and stability of data processing.

[0147] 4. Simplify system management: The automated mapping and adjustment process simplifies the work of system administrators, reduces the need for manual configuration, and reduces management complexity and the possibility of errors.

[0148] 5. Improve system stability: Through the reasonable allocation of SSD and CPU cores, the risk of performance bottlenecks and system crashes caused by uneven resource allocation is reduced, and the overall stability of the system is improved.

[0149] 6. Improve test accuracy: When performing IO performance tests, by binding specific CPU cores and SSDs, storage performance can be measured more accurately, avoiding test result deviations caused by resource competition.

[0150] 7. Facilitate troubleshooting: By generating a relationship table between NUMA Node, SSD drive letter, and physical slot, administrators can quickly locate improper configuration or hardware failure, facilitating troubleshooting and repair.

[0151] That is to say, an innovative automated NUMA-Aware SSD allocation mechanism is introduced in this application, which reduces manual intervention and improves the efficiency and accuracy of configuration by automatically associating SSD devices with NUMA nodes and ensuring that each node is allocated the same number of SSDs. At the same time, the physical slot-based SSD classification method, as a hardware resource management strategy, ensures the locality of data access and further optimizes performance.

[0152] Specifically, by creating a mapping table between NUMA Node and SSD device identifier list, a clear resource allocation view can be provided to engineers, making it easier to quickly identify and resolve resource configuration issues.

[0153] In addition, the technical solution provided by this application also ensures the consistency of resource allocation and maintains the balance of system performance. Among them, the dynamic adjustment strategy of binding CPU cores to SSDs ensures efficient processing of IO operations at the CPU level by evenly allocating and dynamically adjusting the CPU core list.

[0154] Finally, the solution includes a troubleshooting and exception handling mechanism to troubleshoot and handle abnormal situations where it is impossible to ensure that each SSD is allocated at least one CPU core, thereby enhancing the robustness and reliability of the system.

[0155] Corresponding to the above method embodiment, the embodiment of the present application further provides a hard disk testing device. The hard disk testing device described below and the hard disk testing method described above can refer to each other.

[0156] See also Figure 6 As shown, the device includes the following modules:

[0157] A mapping information acquisition module 101 is used to acquire mapping information between a hard disk and an access node; wherein the access node is a node in a non-uniform memory access architecture;

[0158] The node hardware balance determination module 102 is used to determine whether the number of hard disks allocated to the access node is balanced by using the mapping information;

[0159] The node hardware balance processing module 103 is used to adjust the number of hard disks allocated to the access node if the number of hard disks allocated to the access node is unbalanced, and return to reacquire the mapping information between the hard disk and the access node;

[0160] The hard disk test module 104 is used to perform hard disk testing based on a non-uniform memory access architecture after allocating the same number of processors to the hard disks in the access nodes if the number of hard disks allocated to the access nodes is balanced.

[0161] The device provided in the embodiment of the present application is used to obtain mapping information between hard disks and access nodes; wherein the access nodes are nodes in a non-consistent memory access architecture; using the mapping information, it is determined whether the number of hard disks allocated to the access nodes is balanced; if not, the number of hard disks allocated to the access nodes is adjusted, and the mapping information between the hard disks and the access nodes is returned to be re-acquired; if yes, after allocating the same number of processors to the hard disks in the access nodes, a hard disk test is performed based on the non-consistent memory access architecture.

[0162] The non-consistent memory access architecture involves the processor having different access speeds to the hard disk. In this application, before performing the hard disk test, the mapping relationship between the hard disk and the access node is first obtained. Then, based on the mapping relationship, it is determined whether the number of hard disks allocated to the access node is balanced. If it is unbalanced, the number of hard disks allocated to the access node is adjusted, and the mapping information of the hard disk and the access node is returned to be re-acquired. If it is balanced, the same number of processors can be further allocated to the hard disks in the access node. In this way, it can be ensured that each hard disk can be allocated the same number of processors, thereby achieving resource balancing. After satisfying the balanced allocation of resources, performing a hard disk test in this non-consistent memory access architecture can ensure efficient processing of read and write operations at the processor level, thereby avoiding the detection of individual disks that are inconsistent with the actual situation, and ensuring the accuracy of the hard disk test.

[0163] In a specific implementation of the present application, the mapping information acquisition module is specifically used to obtain the drive letter corresponding to the hard disk to be tested;

[0164] Use the drive letter to query the hardware configuration information of the hard disk;

[0165] Determine the physical slot location of the hard disk from the hard disk configuration information;

[0166] The physical slot location is used to determine the access node to which the hard disk belongs to obtain mapping information.

[0167] In a specific implementation of the present application, the mapping information acquisition module is specifically used to determine the access node to which the hard disk belongs by using the physical slot position and construct a mapping table;

[0168] Get mapping information from the mapping table.

[0169] In a specific implementation of the present application, the node hardware balance processing module is specifically used to obtain the relationship information between the access node, the hard disk and the physical slot position of the hard disk;

[0170] The relationship information is used to adjust the number of hard disks allocated to the access nodes to balance the number of hard disks allocated to the access nodes.

[0171] In a specific implementation of the present application, the processor allocation module is used to obtain the number of processors and the number of hard disks corresponding to the access node;

[0172] Using the number of processors and the number of hard disks, the same number of processors is assigned to access the hard disks in the node.

[0173] In a specific implementation of the present application, the hard disk test module is specifically used to obtain a specified number of processors allocated to the hard disk;

[0174] Calculate the ratio of the number of processors to the number of hard disks;

[0175] Use the ratio to determine whether the hard disk can be allocated to the specified number of processors;

[0176] If so, obtain a list of available processors and determine a specified number of processors from the interval region;

[0177] Allocate the determined processor to the hard disk;

[0178] Remove the assigned processor from the list of available processors;

[0179] If not, determine whether the number of processors is less than the number of hard disks;

[0180] If the number of processors is less than the number of hard disks, the abnormality troubleshooting process is triggered;

[0181] After the abnormality is checked, the mapping information between the hard disk and the access node is retrieved;

[0182] If the number of processors is greater than or equal to the number of hard disks, the ratio is used to determine the target number;

[0183] Get a list of available processors and determine a target number of processors from the interval area;

[0184] Allocate the determined processor to the hard disk;

[0185] Removes an assigned processor from the list of available processors.

[0186] In a specific implementation of the present application, the hard disk test module is specifically used to bind the read and write threads of the input and output test tool to the processor;

[0187] Use the input and output test tool to perform performance testing on the target hard disk in the non-uniform memory access architecture.

[0188] Corresponding to the above method embodiment, the embodiment of the present application further provides an electronic device. The electronic device described below and the hard disk testing method described above can refer to each other.

[0189] See also Figure 7 As shown, the electronic device includes:

[0190] A memory 332, for storing computer programs;

[0191] The processor 322 is used to implement the steps of the hard disk testing method of the above method embodiment when executing the computer program.

[0192] For details, please refer to Figure 8 , Figure 8 A schematic diagram of the specific structure of an electronic device provided for this embodiment, which may have relatively large differences due to different configurations or performances, may include one or more processors (central processing units, CPU) (for example, one or more processors) and a memory 332, and the memory 332 stores one or more computer programs 342 or data 344. Among them, the memory 332 can be a temporary storage or a permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device. Furthermore, the processor 322 can be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the electronic device 301.

[0193] The electronic device 301 may further include one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and / or one or more operating systems 341 .

[0194] The steps in the hard disk testing method described above can be implemented by the structure of an electronic device.

[0195] That is, the electronic device may implement the following steps including but not limited to:

[0196] Obtain mapping information between a hard disk and an access node; wherein the access node is a node in a non-uniform memory access architecture;

[0197] Using the mapping information, determine whether the number of hard disks allocated to the access node is balanced;

[0198] If not, the number of hard disks allocated to the access node is adjusted, and the mapping information between the hard disk and the access node is retrieved again;

[0199] If yes, after allocating the same number of processors to the hard disks in the access node, a hard disk test is performed based on the non-uniform memory access architecture.

[0200] Among them, obtaining the mapping information between the hard disk and the access node includes:

[0201] Get the drive letter corresponding to the hard disk to be tested;

[0202] Using the drive letter, query the hardware configuration information of the hard disk;

[0203] Determining the physical slot position of the hard disk from the hard disk configuration information;

[0204] The access node to which the hard disk belongs is determined using the physical slot position to obtain the mapping information.

[0205] Wherein, using the drive letter and the physical slot position to determine the access node to which the hard disk belongs to obtain the mapping information includes:

[0206] Use the physical slot location to determine the access node to which the hard disk belongs and build a mapping table;

[0207] The mapping information is acquired from the mapping table.

[0208] Among them, the number of hard disks allocated to the access node is adjusted, including:

[0209] Get the relationship information between the access node, the hard disk and the physical slot location of the hard disk;

[0210] The relationship information is used to adjust the number of hard disks allocated to the access nodes to balance the number of hard disks allocated to the access nodes.

[0211] The same number of processors are allocated to access the hard disks in the nodes, including:

[0212] Get the number of processors and hard disks corresponding to the access node;

[0213] The same number of processors is allocated to the hard disks in the access node using the number of processors and the number of hard disks.

[0214] The method of allocating the same number of processors to the hard disks in the access node by using the number of processors and the number of hard disks includes:

[0215] Get the specified number of processors assigned to the hard disk;

[0216] Calculating a ratio of the number of processors to the number of hard disks;

[0217] using the ratio to determine whether the hard disk can be allocated to the specified number of processors;

[0218] If yes, obtaining a list of available processors and determining the specified number of processors from the interval region;

[0219] Allocate the determined processor to the hard disk;

[0220] deleting the assigned processor from the list of available processors;

[0221] If not, determining whether the number of processors is less than the number of hard disks;

[0222] If the number of processors is less than the number of hard disks, an abnormality troubleshooting process is triggered;

[0223] After the abnormality is checked, the mapping information between the hard disk and the access node is retrieved;

[0224] If the number of processors is greater than or equal to the number of hard disks, the target number is determined using the ratio;

[0225] Obtain a list of available processors and determine the target number of processors from the interval area;

[0226] Allocate the determined processor to the hard disk;

[0227] The assigned processor is deleted from the list of available processors.

[0228] The hard disk test is performed based on the non-uniform memory access architecture, including:

[0229] Bind the read and write threads of the input and output test tool to the processor;

[0230] The input-output test tool is used to perform a performance test on a target hard disk in the non-uniform memory access architecture.

[0231] Corresponding to the above method embodiment, the embodiment of the present application further provides a readable storage medium. The readable storage medium described below and the hard disk testing method described above can refer to each other.

[0232] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the hard disk testing method of the above method embodiment are implemented.

[0233] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.

[0234] The hard disk testing method includes:

[0235] Obtain mapping information between a hard disk and an access node; wherein the access node is a node in a non-uniform memory access architecture;

[0236] Using the mapping information, determine whether the number of hard disks allocated to the access node is balanced;

[0237] If not, the number of hard disks allocated to the access node is adjusted, and the mapping information between the hard disk and the access node is retrieved again;

[0238] If yes, after allocating the same number of processors to the hard disks in the access node, a hard disk test is performed based on the non-uniform memory access architecture.

[0239] Among them, obtaining the mapping information between the hard disk and the access node includes:

[0240] Get the drive letter corresponding to the hard disk to be tested;

[0241] Using the drive letter, query the hardware configuration information of the hard disk;

[0242] Determining the physical slot position of the hard disk from the hard disk configuration information;

[0243] The access node to which the hard disk belongs is determined using the physical slot position to obtain the mapping information.

[0244] Wherein, using the drive letter and the physical slot position to determine the access node to which the hard disk belongs to obtain the mapping information includes:

[0245] Use the physical slot location to determine the access node to which the hard disk belongs and build a mapping table;

[0246] The mapping information is acquired from the mapping table.

[0247] Among them, the number of hard disks allocated to the access node is adjusted, including:

[0248] Get the relationship information between the access node, the hard disk and the physical slot location of the hard disk;

[0249] The relationship information is used to adjust the number of hard disks allocated to the access nodes to balance the number of hard disks allocated to the access nodes.

[0250] The same number of processors are allocated to access the hard disks in the nodes, including:

[0251] Get the number of processors and hard disks corresponding to the access node;

[0252] The same number of processors is allocated to the hard disks in the access node using the number of processors and the number of hard disks.

[0253] The method of allocating the same number of processors to the hard disks in the access node by using the number of processors and the number of hard disks includes:

[0254] Get the specified number of processors assigned to the hard disk;

[0255] Calculating a ratio of the number of processors to the number of hard disks;

[0256] using the ratio to determine whether the hard disk can be allocated to the specified number of processors;

[0257] If yes, obtaining a list of available processors and determining the specified number of processors from the interval region;

[0258] Allocate the determined processor to the hard disk;

[0259] deleting the assigned processor from the list of available processors;

[0260] If not, determining whether the number of processors is less than the number of hard disks;

[0261] If the number of processors is less than the number of hard disks, an abnormality troubleshooting process is triggered;

[0262] After the abnormality is checked, the mapping information between the hard disk and the access node is retrieved;

[0263] If the number of processors is greater than or equal to the number of hard disks, the target number is determined using the ratio;

[0264] Obtain a list of available processors and determine the target number of processors from the interval area;

[0265] Allocate the determined processor to the hard disk;

[0266] The assigned processor is deleted from the list of available processors.

[0267] The hard disk test is performed based on the non-uniform memory access architecture, including:

[0268] Bind the read and write threads of the input and output test tool to the processor;

[0269] The input-output test tool is used to perform a performance test on a target hard disk in the non-uniform memory access architecture.

[0270] Corresponding to the above method embodiment, the embodiment of the present application further provides a computer program product. The computer program product described below and the hard disk testing method described above can refer to each other.

[0271] A computer program product includes a computer program / instruction. When the computer program / instruction is executed by a processor, the steps of the hard disk testing method are implemented.

[0272] That is to say, the computer program / instructions included in the computer program product, after being executed, can implement the following steps:

[0273] Obtain mapping information between a hard disk and an access node; wherein the access node is a node in a non-uniform memory access architecture;

[0274] Using the mapping information, determine whether the number of hard disks allocated to the access node is balanced;

[0275] If not, the number of hard disks allocated to the access node is adjusted, and the mapping information between the hard disk and the access node is retrieved again;

[0276] If yes, after allocating the same number of processors to the hard disks in the access node, a hard disk test is performed based on the non-uniform memory access architecture.

[0277] Among them, obtaining the mapping information between the hard disk and the access node includes:

[0278] Get the drive letter corresponding to the hard disk to be tested;

[0279] Using the drive letter, query the hardware configuration information of the hard disk;

[0280] Determining the physical slot position of the hard disk from the hard disk configuration information;

[0281] The access node to which the hard disk belongs is determined using the physical slot position to obtain the mapping information.

[0282] Wherein, using the drive letter and the physical slot position to determine the access node to which the hard disk belongs to obtain the mapping information includes:

[0283] Use the physical slot location to determine the access node to which the hard disk belongs and build a mapping table;

[0284] The mapping information is acquired from the mapping table.

[0285] Among them, the number of hard disks allocated to the access node is adjusted, including:

[0286] Get the relationship information between the access node, the hard disk and the physical slot location of the hard disk;

[0287] The relationship information is used to adjust the number of hard disks allocated to the access nodes to balance the number of hard disks allocated to the access nodes.

[0288] The same number of processors are allocated to access the hard disks in the nodes, including:

[0289] Get the number of processors and hard disks corresponding to the access node;

[0290] The same number of processors is allocated to the hard disks in the access node using the number of processors and the number of hard disks.

[0291] The method of allocating the same number of processors to the hard disks in the access node by using the number of processors and the number of hard disks includes:

[0292] Get the specified number of processors assigned to the hard disk;

[0293] Calculating a ratio of the number of processors to the number of hard disks;

[0294] using the ratio to determine whether the hard disk can be allocated to the specified number of processors;

[0295] If yes, obtaining a list of available processors and determining the specified number of processors from the interval region;

[0296] Allocate the determined processor to the hard disk;

[0297] deleting the assigned processor from the list of available processors;

[0298] If not, determining whether the number of processors is less than the number of hard disks;

[0299] If the number of processors is less than the number of hard disks, an abnormality troubleshooting process is triggered;

[0300] After the abnormality is checked, the mapping information between the hard disk and the access node is retrieved;

[0301] If the number of processors is greater than or equal to the number of hard disks, the target number is determined using the ratio;

[0302] Obtain a list of available processors and determine the target number of processors from the interval area;

[0303] Allocate the determined processor to the hard disk;

[0304] The assigned processor is deleted from the list of available processors.

[0305] The hard disk test is performed based on the non-uniform memory access architecture, including:

[0306] Bind the read and write threads of the input and output test tool to the processor;

[0307] The input-output test tool is used to perform a performance test on a target hard disk in the non-uniform memory access architecture.

[0308] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the 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.

[0309] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0310] 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.

[0311] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only 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, include or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes 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.

[0312] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A hard disk testing method, characterized in that: include: Obtain mapping information between a hard disk and an access node; wherein the access node is a node in a non-uniform memory access architecture; Using the mapping information, determine whether the number of hard disks allocated to the access node is balanced; If not, the number of hard disks allocated to the access node is adjusted, and the mapping information between the hard disk and the access node is retrieved again; If yes, after allocating the same number of processors to the hard disks in the access node, a hard disk test is performed based on the non-uniform memory access architecture.

2. The method according to claim 1, characterized in that Get the mapping information between hard disk and access node, including: Get the drive letter corresponding to the hard disk to be tested; Using the drive letter, query the hardware configuration information of the hard disk; Determining the physical slot position of the hard disk from the hard disk configuration information; The access node to which the hard disk belongs is determined using the physical slot position to obtain the mapping information.

3. The method according to claim 2, characterized in that Using the drive letter and the physical slot position to determine the access node to which the hard disk belongs to obtain the mapping information, including: Use the physical slot location to determine the access node to which the hard disk belongs and build a mapping table; The mapping information is acquired from the mapping table.

4. The method according to claim 1, characterized in that Adjust the number of hard disks allocated to access nodes, including: Get the relationship information between the access node, the hard disk and the physical slot location of the hard disk; The relationship information is used to adjust the number of hard disks allocated to the access nodes to balance the number of hard disks allocated to the access nodes.

5. The method according to claim 1, characterized in that Allocate an equal number of processors to access the hard disks in the nodes, including: Get the number of processors and hard disks corresponding to the access node; The same number of processors is allocated to the hard disks in the access node using the number of processors and the number of hard disks.

6. The method according to claim 4, characterized in that Using the number of processors and the number of hard disks, allocating the same number of processors to the hard disks in the access node includes: Get the specified number of processors assigned to the hard disk; Calculating a ratio of the number of processors to the number of hard disks; using the ratio to determine whether the hard disk can be allocated to the specified number of processors; If yes, obtaining a list of available processors and determining the specified number of processors from the interval region; Allocate the determined processor to the hard disk; deleting the assigned processor from the list of available processors; If not, determining whether the number of processors is less than the number of hard disks; If the number of processors is less than the number of hard disks, an abnormality troubleshooting process is triggered; After the abnormality is checked, the mapping information between the hard disk and the access node is retrieved; If the number of processors is greater than or equal to the number of hard disks, the target number is determined using the ratio; Obtain a list of available processors and determine the target number of processors from the interval area; Allocate the determined processor to the hard disk; The assigned processor is deleted from the list of available processors.

7. The method according to any one of claims 1 to 6, characterized in that: Performing hard disk testing based on the non-uniform memory access architecture includes: Bind the read and write threads of the input and output test tool to the processor; The input-output test tool is used to perform a performance test on a target hard disk in the non-uniform memory access architecture.

8. A hard disk testing device, characterized in that: include: A mapping information acquisition module is used to acquire mapping information between a hard disk and an access node; wherein the access node is a node in a non-uniform memory access architecture; A node hardware balance judgment module is used to use the mapping information to determine whether the number of hard disks allocated to the access node is balanced; The node hardware balance processing module is used to adjust the number of hard disks allocated to the access node if the number of hard disks allocated to the access node is unbalanced, and return to re-acquire the mapping information between the hard disk and the access node; The hard disk test module is used to perform hard disk testing based on the non-uniform memory access architecture after allocating the same number of processors to the hard disks in the access nodes if the number of hard disks allocated to the access nodes is balanced.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the hard disk testing method according to any one of claims 1 to 7 when executing the computer program.

10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the hard disk testing method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • PCIE (Peripheral Component Interface Express) SSD (Solid State Device) optimization method

    CN105353981A

  • Hard disk performance test method and device, equipment and storage medium

    CN115202944A

  • Storage optimization method, system and equipment and readable storage medium

    CN115543222A

  • Hard disk performance test method and device, equipment, storage medium and program product

    CN115757066A

  • Cluster capacity expansion storage allocation method and device, equipment, medium and program product

    CN118152136A

Cited By

  • Method and device for mapping actual hard disk physical slot position and hard disk information of server

    CN120510905A

  • Resource allocation method and device, electronic equipment and storage medium

    CN120704901A

  • Resource allocation method and apparatus, electronic device, and storage medium

    CN120704901B