Test method and device, computer equipment, storage medium and computer program product

By building database instances matching the hardware environment for testing, the problem of inaccurate performance testing of NUMA architecture server database in traditional methods is solved, and the test accuracy and system stability are improved.

CN119271542APending Publication Date: 2025-01-07SUGON INFORMATION IND +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411146686.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

Traditional database performance testing methods are difficult to accurately test database performance on servers based on NUMA architecture, and fail to fully consider the impact of the hardware environment, resulting in inaccurate test results.

Method used

By constructing database instances corresponding to each processing node based on the relevant hardware information of each processing node of the server, and running database instances on each processing node for testing, ensuring that the database instance matches the hardware resources, and performing performance tests in consideration of the hardware environment.

Benefits of technology

Improve the accuracy of database performance testing, avoid performance bottlenecks and failures caused by hardware resource mismatch, and improve system stability and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271542A_ABST
    Figure CN119271542A_ABST
Patent Text Reader

Abstract

The invention relates to a test method and device, computer equipment, a storage medium and a computer program product, and the method comprises the steps: constructing a database instance corresponding to each processing node according to related hardware information of each processing node in a server, and then running the corresponding database instance on each processing node for testing to obtain a test result. According to the method, the database performance test is carried out by constructing the corresponding database instances on the processing nodes, the structure of the database can be adapted to or compatible with the architecture of the server, and the hardware environment of the server can be considered during subsequent database performance test; according to the method, the problem that the test result is inaccurate due to the fact that the influence of the hardware environment on the database performance is not considered in the prior art is solved, the multi-dimensional test environment of the software level and the hardware level is comprehensively considered, and the test accuracy of the database can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of database technology, and in particular to a testing method, apparatus, computer equipment, storage medium and computer program product. Background Art

[0002] With the development and popularization of multi-core server architecture, NUMA (Non-Uniform Memory Access) architecture divides memory and central processing unit (CPU) into multiple nodes, which enables CPU to access local node memory faster, reduce competition between CPUs, and reduce memory access latency. It is widely used in major commercial data centers and scientific computing cluster applications. In order to maximize the computing power of the CPU, it is usually necessary to perform performance testing on the database running on the server.

[0003] However, it is difficult to accurately test the database performance on a server based on the NUMA architecture using traditional database performance testing methods. Summary of the invention

[0004] Based on this, it is necessary to provide a testing method, apparatus, computer equipment, storage medium and computer program product that can improve the accuracy of database performance testing in response to the above technical problems.

[0005] In a first aspect, the present application provides a testing method, the method comprising:

[0006] According to the relevant hardware information of each processing node in the server, a database instance corresponding to each processing node is constructed;

[0007] Run the corresponding database instance on each processing node to perform the test and obtain the test results.

[0008] The test method provided in the embodiment of the present application is to construct a database instance corresponding to each processing node according to the relevant hardware information of each processing node in the server, and then run the corresponding database instance on each processing node for testing to obtain the test result. In the above method, by constructing a corresponding database instance on each processing node to perform database performance testing, the structure of the database can be adapted or compatible with the architecture of the server, and the hardware environment of the server can be considered in the subsequent database performance testing, which solves the existing problem of inaccurate test results caused by not considering the impact of the hardware environment on database performance. The above method comprehensively considers the multi-dimensional test environment at the software level and the hardware level, which can improve the test accuracy of the database.

[0009] In one embodiment, according to the relevant hardware information of each processing node in the server, a database instance corresponding to each processing node is constructed, including:

[0010] Constructing an initial database instance corresponding to each processing node;

[0011] According to the relevant hardware information of each processing node and the initial database parameters of the corresponding initial database instance, each initial database instance is configured to obtain the database instance corresponding to each processing node.

[0012] The method described in the embodiment of the present application can ensure that the database instance can fully utilize the hardware performance when running on specific hardware and avoid performance bottlenecks by configuring according to the hardware information of the processing node and the initial parameters of the database instance. In addition, by configuring according to the hardware characteristics of each processing node, the stability and reliability of the database can be improved, and failures or performance problems caused by hardware resource mismatch can be reduced.

[0013] In one embodiment, each initial database instance is configured according to the relevant hardware information of each processing node and the initial database parameters of the corresponding initial database instance to obtain the database instance corresponding to each processing node, including:

[0014] Allocate hardware resources for the corresponding initial database instance according to the relevant hardware information of each processing node; the hardware resources include at least one of CPU, memory, disk, and network;

[0015] Each initial database instance is configured according to the hardware resources corresponding to each initial database instance and the initial database parameters of the corresponding initial database instance to obtain a database instance corresponding to each processing node.

[0016] The method described in the embodiment of the present application can ensure that the resource configuration of the database instance matches the actual hardware capabilities by allocating resources to the database instance according to the hardware resources of the processing node, thereby giving full play to the hardware performance and avoiding over-allocation or under-allocation of resources.

[0017] In one embodiment, each initial database instance is configured according to the hardware resources corresponding to each initial database instance and the initial database parameters of the corresponding initial database instance to obtain the database instance corresponding to each processing node, including:

[0018] Modifying the initial database parameters of each initial database instance according to each hardware resource to obtain modified database parameters of each initial database instance;

[0019] Generate configuration files corresponding to each initial database instance according to hardware resources and modified database parameters corresponding to each initial database instance;

[0020] Each initial database instance is configured according to a configuration file corresponding to each initial database instance to obtain a database instance corresponding to each processing node.

[0021] In one embodiment, the initial database parameters of each initial database instance are modified according to each hardware resource to obtain the modified database parameters of each initial database instance, including:

[0022] Extracting specification parameters from resource information of each hardware resource; the specification parameters include at least one of CPU main frequency and core number, memory size, bandwidth and rate, disk size, network rate and bandwidth;

[0023] The associated parameters in the initial database parameters are modified according to the specification parameters to obtain the modified database parameters of each initial database instance.

[0024] The method described in the embodiment of the present application can accurately correct the initial database parameters by extracting the specification parameters of the hardware resources to better match the actual hardware resources. Moreover, correcting the database parameters according to the hardware specifications can avoid system instability or crash problems caused by improper resource configuration.

[0025] In one embodiment, the method further comprises:

[0026] Bind each database instance to the corresponding processing node;

[0027] Run the corresponding database instance on each processing node to test and obtain the test results, including:

[0028] Run the corresponding bound database instance on each processing node to perform the test and obtain the test results.

[0029] The method described in the embodiment of the present application can verify whether the previous configuration is accurate by binding the database instance and the processing node and then performing a test, which can reduce the risk of encountering problems in the production environment and thus improve the stability and reliability of the system.

[0030] In one embodiment, the method further comprises:

[0031] Determine whether the relevant hardware information of each processing node conforms to the standard hardware information;

[0032] When it is determined that there is a processing node that does not conform to the standard hardware information, prompt information is output.

[0033] The method described in the embodiment of the present application can ensure that all nodes meet the set standards by checking the hardware information of the processing nodes, avoiding system failures or performance problems caused by hardware incompatibility. In addition, the output prompt information can help operation and maintenance personnel quickly locate the problem node, so that they can quickly take measures to repair or replace it, avoiding the problem of overall system performance degradation.

[0034] In a second aspect, the present application also provides a testing device, the device comprising:

[0035] A construction module, used to construct a database instance corresponding to each processing node according to relevant hardware information of each processing node in the server;

[0036] The test module is used to run the corresponding database instance on each processing node to perform tests and obtain test results.

[0037] In a third aspect, the present application further provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:

[0038] According to the relevant hardware information of each processing node in the server, a database instance corresponding to each processing node is constructed;

[0039] Run the corresponding database instance on each processing node to perform the test and obtain the test results.

[0040] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0041] According to the relevant hardware information of each processing node in the server, a database instance corresponding to each processing node is constructed;

[0042] Run the corresponding database instance on each processing node to perform the test and obtain the test results.

[0043] In a fifth aspect, the present application further provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0044] According to the relevant hardware information of each processing node in the server, a database instance corresponding to each processing node is constructed;

[0045] Run the corresponding database instance on each processing node to perform the test and obtain the test results.

[0046] The above-mentioned test method, device, computer equipment, storage medium and computer program product, the method constructs a database instance corresponding to each processing node according to the relevant hardware information of each processing node in the server, and then runs the corresponding database instance on each processing node for testing to obtain the test result. In the above-mentioned method, by constructing the corresponding database instance on each processing node to perform database performance testing, the structure of the database can be adapted or compatible with the architecture of the server, and the hardware environment of the server can be considered in the subsequent database performance testing, which solves the existing problem of inaccurate test results caused by not considering the impact of the hardware environment on the database performance. The above-mentioned method comprehensively considers the multi-dimensional test environment at the software level and the hardware level, which can improve the accuracy of database testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 is an internal structure diagram of a server in one embodiment;

[0048] Figure 2 A schematic diagram of a test method in one embodiment;

[0049] Figure 3 A schematic flow chart of a testing method in another embodiment;

[0050] Figure 4 A schematic flow chart of a testing method in another embodiment;

[0051] Figure 5 A schematic flow chart of a testing method in another embodiment;

[0052] Figure 6 A schematic flow chart of a testing method in another embodiment;

[0053] Figure 7 A schematic flow chart of a testing method in another embodiment;

[0054] Figure 8 A schematic flow chart of a testing method in another embodiment;

[0055] Fig. 9 A schematic flow chart of a testing method in another embodiment;

[0056] Fig.10 FIG. 4 is a structural block diagram of a testing device in an embodiment. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0058] With the development and popularization of server multi-core architecture, the NUMA (Non-Uniform Memory Access) architecture divides the memory and central processing unit (CPU) into multiple nodes, so that the CPU can access the memory of the local node faster, reduce the competition between CPUs, and reduce the latency of memory access. It is widely used in major commercial data centers and scientific computing cluster application fields. In order to maximize the computing power of the CPU, it is usually necessary to perform performance testing on the database running on the server. However, it is difficult to accurately test the performance of the database on the server based on the NUMA architecture using traditional database performance testing methods. The present application provides a testing method to solve the above technical problems. The following embodiments will specifically illustrate the testing method described in the present application.

[0059] The test method provided in the embodiment of the present application can be applied to Figure 1 A server is provided as shown, and its internal structure diagram can be shown as Figure 1 As shown, the server includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the server is used to provide computing and control capabilities. The memory of the server includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the server is used to exchange information between the processor and the external device. The communication interface of the server is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a test method is implemented. The display unit of the server is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the server can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the server shell, or an external keyboard, touchpad or mouse.

[0060] Those skilled in the art will understand that Figure 1The structure shown in the figure is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the server to which the solution of the present application is applied. The specific server may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0061] In one embodiment, Figure 2 As shown, a test method is provided, which is applied to Figure 1 The server in the example is used to illustrate the following steps:

[0062] S201, constructing a database instance corresponding to each processing node according to relevant hardware information of each processing node in the server.

[0063] Among them, the architecture of the server is NUMA architecture. The processing node is a node in the NUMA architecture. The database is composed of multiple database instances. The database instance includes hardware resources and library parameters. The hardware resources include at least one of CPU resources, memory resources, disk resources, and network resources. CPU resources include the number, model, main frequency, number of physical cores, number of logical cores, and number of enabled NUMA nodes of physical CPUs. Memory resources include the number, size, bandwidth, rate model, DIMM insertion method, SWAP setting, total capacity and available capacity of memory bars. Disk resources include the number, size, model, NUMA node connection information, interface type, total capacity and available capacity of disks. Network resources include the number, rate bandwidth, model, NUMA node connection information, network configuration and connectivity of network cards.

[0064] In the embodiment of the present application, when it is necessary to test the performance of a database running on a server with a NUMA architecture, the server can obtain the hardware-related information on each current processing node through the corresponding hard disk management software, a suitable interface or a monitoring tool. After obtaining the hardware-related information on each processing node of the current server, a database instance adapted to the current server architecture can be constructed according to the current hardware-related information, specifically including the number adaptation of the database instance and the hardware resource adaptation of the database instance.

[0065] S202, running the corresponding database instance on each processing node to perform a test and obtain a test result.

[0066] The test result is a performance test result of the database, which may include a test pass or a test fail.

[0067] In the embodiment of the present application, after the server obtains the database instance corresponding to each processing node based on the above steps, it can perform performance testing on each database instance to achieve performance testing of the database. Specifically, the corresponding database instance can be run on each processing node, and the operating performance of the database can be monitored during the operation to obtain the test results of each database instance, and then the test results of each database instance can be analyzed and evaluated to obtain the performance test results of the database.

[0068] The test method provided in the embodiment of the present application is to construct a database instance corresponding to each processing node according to the relevant hardware information of each processing node in the server, and then run the corresponding database instance on each processing node for testing to obtain the test result. In the above method, by constructing a corresponding database instance on each processing node to perform database performance testing, the structure of the database can be adapted or compatible with the architecture of the server, and the hardware environment of the server can be considered in the subsequent database performance testing, which solves the existing problem of inaccurate test results caused by not considering the impact of the hardware environment on the server performance. The above method comprehensively considers the multi-dimensional test environment at the software level and the hardware level, which can improve the test accuracy of the database.

[0069] In one embodiment, a specific implementation method for constructing a database instance corresponding to each processing node is also provided, such as Figure 3 As shown, the above step S201 of "building a database instance corresponding to each processing node according to the relevant hardware information of each processing node in the server" includes:

[0070] S301, constructing an initial database instance corresponding to each processing node.

[0071] The initial database instance includes initial database parameters, and its hardware resources are blank. The initial database parameters include the size of the cache pool, the refresh area per second, the write log size, the read log size, etc.

[0072] In an embodiment of the present application, after the server obtains the relevant hardware information of the processing node, it can further determine the number of each processing node, and then construct an initial database instance with the same number of processing nodes, so as to obtain the initial database instance on each processing node, and the library parameters in the initial database instance are pre-set default values.

[0073] S302 , configuring each initial database instance according to the relevant hardware information of each processing node and the initial database parameters of the corresponding initial database instance to obtain a database instance corresponding to each processing node.

[0074] In an embodiment of the present application, after the server obtains the relevant hardware information of each processing node, it can use the relevant hardware information of each processing node to adjust the initial library parameters of the initial database instance so that the initial database instance on each processing node and the relevant hardware information of the node are adapted, and then the initial database instance is configured according to the adapted database instance information to obtain the database instance corresponding to each processing node.

[0075] The method described in the embodiment of the present application can ensure that the database instance can fully utilize the hardware performance when running on specific hardware and avoid performance bottlenecks by configuring according to the hardware information of the processing node and the initial parameters of the database instance. In addition, by configuring according to the hardware characteristics of each processing node, the stability and reliability of the database can be improved, and failures or performance problems caused by hardware resource mismatch can be reduced.

[0076] In one embodiment, a specific implementation method for configuring each initial database instance to obtain a database instance corresponding to each processing node is also provided, such as Figure 4 As shown, the above step S302 of "configuring each initial database instance according to the relevant hardware information of each processing node and the initial library parameters of the corresponding initial database instance to obtain the database instance corresponding to each processing node" includes:

[0077] S401, allocating hardware resources to the corresponding initial database instance according to the relevant hardware information of each processing node.

[0078] The hardware resources include at least one of CPU, memory, disk and network.

[0079] In the embodiment of the present application, after the server obtains the relevant hardware information of each processing node and constructs the corresponding initial database instance for each processing node, for any processing node, hardware resources can be allocated to the initial database instance on the processing node according to the relevant hardware information on the processing node, and specifically, the hardware resources on the processing node can be allocated to the initial database instance on the processing node. It should be noted that the server can allocate corresponding hardware resources to each initial database instance at the same time, or determine the hardware resource allocation order according to the position of each processing node, and then allocate hardware resources to each initial database instance according to the resource allocation order.

[0080] S402 , configuring each initial database instance according to the hardware resources corresponding to each initial database instance and the initial database parameters of the corresponding initial database instance, to obtain a database instance corresponding to each processing node.

[0081] In an embodiment of the present application, after the server allocates hardware resources to each initial database instance, for any initial database instance, the initial library parameters can be adjusted according to the hardware resources corresponding to the initial database instance so that the initial database instance on each processing node matches the hardware resources of the initial database instance, and then the initial database instance is configured according to the matching database instance information to obtain the database instance corresponding to each processing node.

[0082] The method described in the embodiment of the present application can ensure that the resource configuration of the database instance matches the actual hardware capabilities by allocating resources to the database instance according to the hardware resources of the processing node, thereby giving full play to the hardware performance and avoiding over-allocation or under-allocation of resources.

[0083] In one embodiment, another specific implementation method of configuring each initial database instance to obtain a database instance corresponding to each processing node is provided, such as Figure 5 As shown, the above step S402 of "configuring each initial database instance according to the hardware resources corresponding to each initial database instance and the initial database parameters of the corresponding initial database instance to obtain a database instance corresponding to each processing node" includes:

[0084] S501, modifying the initial database parameters of each initial database instance according to each hardware resource to obtain modified database parameters of each initial database instance.

[0085] The modified library parameters are the library parameters modified from the initial library parameters. The modified library parameters include modified library parameters associated with the CPU, modified library parameters associated with the memory, modified library parameters associated with the disk, and modified library parameters associated with the network, and specifically may include the modified size of the cache pool, the modified refresh area per second, the modified write log size, the modified read log size, etc.

[0086] In an embodiment of the present application, after allocating corresponding hardware resources to each initial database instance, the server can aim to match the initial database instance on each processing node with the hardware resources on the initial database instance, and modify the initial library parameters according to the resources allocated to each initial database instance to obtain modified library parameters.

[0087] Optional, such as Figure 6 As shown, the above step S501 of "correcting the initial database parameters of each initial database instance according to each hardware resource to obtain the corrected database parameters of each initial database instance" includes:

[0088] S5011, extract specification parameters from resource information of each hardware resource.

[0089] Among them, the specification parameters include CPU specification parameters, memory specification parameters, disk specification parameters, and network specification parameters. Specifically, the CPU specification parameters include the CPU's main frequency and core number, the memory specification parameters include the memory size, bandwidth, and rate, the disk specification parameters include the disk size, and the network specification parameters include at least one of the network rate and bandwidth.

[0090] In the embodiment of the present application, after allocating hardware resources to each initial database instance, the server can extract specification parameters from the hardware resources.

[0091] S5012, modify the associated parameters in the initial database parameters according to the specification parameters to obtain modified database parameters of each initial database instance.

[0092] In the embodiment of the present application, after the server obtains the specification parameters based on the above steps, the initial library parameters can be corrected according to the specification parameters to obtain the corrected library parameters. Specifically, the library parameters associated with the CPU in the initial library parameters can be corrected according to the CPU specification parameters to obtain the corrected library parameters associated with the CPU; the library parameters associated with the memory in the initial library parameters can be corrected according to the memory specification parameters to obtain the corrected library parameters associated with the memory; the library parameters associated with the disk in the initial library parameters can be corrected according to the disk specification parameters to obtain the corrected library parameters associated with the disk; the library parameters associated with the network in the initial library parameters can be corrected according to the network specification parameters to obtain the corrected library parameters associated with the network. Then, the corrected library parameters of the initial database instance can be determined based on the corrected library parameters associated with the CPU, the corrected library parameters associated with the memory, the corrected library parameters associated with the disk, and the corrected library parameters associated with the network.

[0093] S502: Generate a configuration file corresponding to each initial database instance according to the hardware resources and modified library parameters corresponding to each initial database instance.

[0094] The configuration file includes hardware resources and correction library parameters.

[0095] In an embodiment of the present application, after the server obtains the hardware resources and revised library parameters corresponding to the initial database instance based on the above steps, it can generate a configuration file for the initial database instance based on the hardware resources and revised library parameters.

[0096] S503, configuring each initial database instance according to the configuration file corresponding to each initial database instance, to obtain a database instance corresponding to each processing node.

[0097] The database instance is a database instance obtained by configuring the initial database instance using the configuration file.

[0098] In an embodiment of the present application, after the server obtains the configuration files of each initial database instance based on the above steps, it can configure each initial database instance according to the configuration files corresponding to each initial database instance to obtain the database instance corresponding to each processing node.

[0099] The method described in the embodiment of the present application can accurately correct the initial database parameters by extracting the specification parameters of the hardware resources to better match the actual hardware resources. Moreover, correcting the database parameters according to the hardware specifications can avoid system instability or crash problems caused by improper resource configuration.

[0100] In one embodiment, Figure 7 As shown, the above test method includes:

[0101] S203, binding each database instance to the corresponding processing node.

[0102] In the embodiment of the present application, after obtaining the database instance corresponding to each processing node, the server may bind each database instance to the corresponding processing node.

[0103] Correspondingly, when the server executes step S202, the server specifically executes the following steps: running the corresponding bound database instance on each processing node to perform a test and obtain a test result.

[0104] In an embodiment of the present application, after the server binds each database instance to the corresponding processing node based on the above steps, the server can run the corresponding bound database instance on each processing node for testing, and monitor the running performance of the database during the running process to obtain the test results of each database instance. Then, the test results of each database instance can be analyzed and evaluated to obtain the performance test results of the database.

[0105] The method described in the embodiment of the present application can verify whether the previous configuration is accurate by binding the database instance and the processing node and then performing a test, which can reduce the risk of encountering problems in the production environment and thus improve the stability and reliability of the system.

[0106] In one embodiment, Figure 8 As shown, the above test method includes:

[0107] S601, determining whether the relevant hardware information of each processing node conforms to standard hardware information.

[0108] The standard hardware information is the hardware information preset by the server, including standard CPU information, standard memory information, standard disk information, and standard network information.

[0109] In an embodiment of the present application, the server can store its standard hardware information under a specified path. After the server obtains the relevant hardware information of each processing node, it can obtain the standard hardware information by formulating a path, and then compare the hardware-related information of each processing node with the standard hardware information to determine whether the relevant hardware information of each processing node conforms to the standard hardware information.

[0110] S602: When it is determined that there is a processing node that does not conform to the standard hardware information, output prompt information.

[0111] The prompt information is used to prompt that the relevant hardware information of the current server does not conform to the standard hardware information, and specifically may include that the relevant hardware information of a processing node in the current processor does not conform to the standard hardware information.

[0112] In an embodiment of the present application, when the server determines that there is hardware information that does not meet the standard in the current relevant hardware information, it can output a prompt message to instruct the user to perform maintenance so that the relevant hardware information after the maintenance meets the standard hardware information, and then perform a performance test on the database.

[0113] The method described in the embodiment of the present application can ensure that all nodes meet the set standards by checking the hardware information of the processing nodes, avoiding system failures or performance problems caused by hardware incompatibility. In addition, the output prompt information can help operation and maintenance personnel quickly locate the problem node, so that they can quickly take measures to repair or replace it, avoiding the problem of overall system performance degradation.

[0114] Combining all the above embodiments, Fig. 9 As shown, a testing method is also provided, the method comprising:

[0115] S701, determining whether the relevant hardware information of each processing node conforms to standard hardware information.

[0116] S702: When it is determined that there is a processing node that does not conform to the standard hardware information, output prompt information.

[0117] S703: construct an initial database instance corresponding to each processing node.

[0118] S704: Allocate hardware resources to the corresponding initial database instance according to the relevant hardware information of each processing node, wherein the hardware resources include at least one of CPU, memory, disk, and network.

[0119] S705: extract specification parameters from the resource information of each hardware resource. The specification parameters include at least one of the CPU main frequency and core number, memory size, bandwidth and rate, disk size, network rate and bandwidth.

[0120] S706, modify the associated parameters in the initial database parameters according to the specification parameters to obtain modified database parameters of each initial database instance.

[0121] S707, generating configuration files corresponding to each initial database instance according to the hardware resources and modified library parameters corresponding to each initial database instance.

[0122] S708 , configuring each initial database instance according to the configuration file corresponding to each initial database instance, to obtain a database instance corresponding to each processing node.

[0123] S709: Bind each database instance to the corresponding processing node.

[0124] S710, running the corresponding bound database instance on each processing node to perform a test and obtain a test result.

[0125] The method described in the embodiment of the present application realizes the partitioning and blocking of server resources by automatically analyzing resources and dynamically load balancing and binding each target NUMA node under a multi-NUMA architecture, effectively avoiding the resource contention and access delay caused by traditional testing methods when accessing memory and IO across NUMA nodes on modern servers, and provides an objective automatic testing method for database application performance of servers under a multi-NUMA architecture, which effectively improves the accuracy of the understanding of server database application performance under a modern multi-NUMA architecture.

[0126] The methods described in the above steps are all described in the above embodiments. Please refer to the above description for details and will not be repeated here.

[0127] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0128] Based on the same inventive concept, the embodiment of the present application also provides a test device for implementing the test method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more test device embodiments provided below can refer to the limitations on the test method above, and will not be repeated here.

[0129] In one embodiment, Fig.10 As shown, a testing device is provided, comprising:

[0130] The construction module 11 is used to construct a database instance corresponding to each processing node according to the relevant hardware information of each processing node in the server.

[0131] The test module 12 is used to run the corresponding database instance on each processing node to perform a test and obtain a test result.

[0132] In one embodiment, the test module 12 includes:

[0133] The construction unit is used to construct an initial database instance corresponding to each processing node.

[0134] The configuration unit is used to configure each initial database instance according to the relevant hardware information of each processing node and the initial library parameters of the corresponding initial database instance to obtain the database instance corresponding to each processing node.

[0135] In one embodiment, the configuration unit includes:

[0136] The allocation subunit is used to allocate hardware resources to the corresponding initial database instance according to the relevant hardware information of each processing node; the hardware resources include at least one of CPU, memory, disk, and network.

[0137] The configuration subunit is used to configure each initial database instance according to the hardware resources corresponding to each initial database instance and the initial library parameters of the corresponding initial database instance to obtain the database instance corresponding to each processing node.

[0138] In one embodiment, the above-mentioned configuration sub-unit is specifically used to modify the initial library parameters of each initial database instance according to each hardware resource to obtain the modified library parameters of each initial database instance; generate a configuration file corresponding to each initial database instance according to the hardware resources and modified library parameters corresponding to each initial database instance; configure each initial database instance according to the configuration file corresponding to each initial database instance to obtain a database instance corresponding to each processing node.

[0139] In one embodiment, the above-mentioned configuration subunit is also specifically used to extract specification parameters from the resource information of each hardware resource; the specification parameters include at least one of the CPU's main frequency and core number, memory size, bandwidth and rate, disk size, network rate and bandwidth; according to the specification parameters, the parameters associated with the initial library parameters are corrected to obtain the corrected library parameters of each initial database instance.

[0140] In one embodiment, the above-mentioned testing device further includes:

[0141] The binding module is used to bind each database instance to the corresponding processing node.

[0142] Correspondingly, the test module 12 is specifically used to run the corresponding bound database instance on each processing node to perform a test and obtain a test result.

[0143] In one embodiment, the above-mentioned testing device further includes:

[0144] The determination module is used to determine whether the relevant hardware information of each processing node conforms to the standard hardware information.

[0145] The prompt module is used to output prompt information when it is determined that there is a processing node that does not meet the standard hardware information.

[0146] Each module in the above-mentioned test device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0147] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0148] According to the relevant hardware information of each processing node in the server, a database instance corresponding to each processing node is constructed;

[0149] Run the corresponding database instance on each processing node to perform the test and obtain the test results.

[0150] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0151] Constructing an initial database instance corresponding to each processing node;

[0152] According to the relevant hardware information of each processing node and the initial database parameters of the corresponding initial database instance, each initial database instance is configured to obtain the database instance corresponding to each processing node.

[0153] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0154] Allocate hardware resources for the corresponding initial database instance according to the relevant hardware information of each processing node; the hardware resources include at least one of CPU, memory, disk, and network;

[0155] Each initial database instance is configured according to the hardware resources corresponding to each initial database instance and the initial database parameters of the corresponding initial database instance to obtain a database instance corresponding to each processing node.

[0156] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0157] Modifying the initial database parameters of each initial database instance according to each hardware resource to obtain modified database parameters of each initial database instance;

[0158] Generate configuration files corresponding to each initial database instance according to hardware resources and modified database parameters corresponding to each initial database instance;

[0159] Each initial database instance is configured according to a configuration file corresponding to each initial database instance to obtain a database instance corresponding to each processing node.

[0160] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0161] Extracting specification parameters from resource information of each hardware resource; the specification parameters include at least one of CPU main frequency and core number, memory size, bandwidth and rate, disk size, network rate and bandwidth;

[0162] The associated parameters in the initial database parameters are modified according to the specification parameters to obtain the modified database parameters of each initial database instance.

[0163] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0164] Bind each database instance to the corresponding processing node;

[0165] Run the corresponding database instance on each processing node to test and obtain the test results, including:

[0166] Run the corresponding bound database instance on each processing node to perform the test and obtain the test results.

[0167] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0168] Determine whether the relevant hardware information of each processing node conforms to the standard hardware information;

[0169] When it is determined that there is a processing node that does not conform to the standard hardware information, prompt information is output.

[0170] The above embodiment provides a computer device, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.

[0171] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0172] According to the relevant hardware information of each processing node in the server, a database instance corresponding to each processing node is constructed;

[0173] Run the corresponding database instance on each processing node to perform the test and obtain the test results.

[0174] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0175] Constructing an initial database instance corresponding to each processing node;

[0176] According to the relevant hardware information of each processing node and the initial database parameters of the corresponding initial database instance, each initial database instance is configured to obtain the database instance corresponding to each processing node.

[0177] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0178] Allocate hardware resources for the corresponding initial database instance according to the relevant hardware information of each processing node; the hardware resources include at least one of CPU, memory, disk, and network;

[0179] Each initial database instance is configured according to the hardware resources corresponding to each initial database instance and the initial database parameters of the corresponding initial database instance to obtain a database instance corresponding to each processing node.

[0180] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0181] Modifying the initial database parameters of each initial database instance according to each hardware resource to obtain modified database parameters of each initial database instance;

[0182] Generate configuration files corresponding to each initial database instance according to hardware resources and modified database parameters corresponding to each initial database instance;

[0183] Each initial database instance is configured according to a configuration file corresponding to each initial database instance to obtain a database instance corresponding to each processing node.

[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0185] Extracting specification parameters from resource information of each hardware resource; the specification parameters include at least one of CPU main frequency and core number, memory size, bandwidth and rate, disk size, network rate and bandwidth;

[0186] The associated parameters in the initial database parameters are modified according to the specification parameters to obtain the modified database parameters of each initial database instance.

[0187] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0188] Bind each database instance to the corresponding processing node;

[0189] Run the corresponding database instance on each processing node to test and obtain the test results, including:

[0190] Run the corresponding bound database instance on each processing node to perform the test and obtain the test results.

[0191] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0192] Determine whether the relevant hardware information of each processing node conforms to the standard hardware information;

[0193] When it is determined that there is a processing node that does not conform to the standard hardware information, prompt information is output.

[0194] The above embodiment provides a computer-readable storage medium, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.

[0195] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0196] According to the relevant hardware information of each processing node in the server, a database instance corresponding to each processing node is constructed;

[0197] Run the corresponding database instance on each processing node to perform the test and obtain the test results.

[0198] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0199] Constructing an initial database instance corresponding to each processing node;

[0200] According to the relevant hardware information of each processing node and the initial database parameters of the corresponding initial database instance, each initial database instance is configured to obtain the database instance corresponding to each processing node.

[0201] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0202] Allocate hardware resources for the corresponding initial database instance according to the relevant hardware information of each processing node; the hardware resources include at least one of CPU, memory, disk, and network;

[0203] Each initial database instance is configured according to the hardware resources corresponding to each initial database instance and the initial database parameters of the corresponding initial database instance to obtain a database instance corresponding to each processing node.

[0204] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0205] Modifying the initial database parameters of each initial database instance according to each hardware resource to obtain modified database parameters of each initial database instance;

[0206] Generate configuration files corresponding to each initial database instance according to hardware resources and modified database parameters corresponding to each initial database instance;

[0207] Each initial database instance is configured according to a configuration file corresponding to each initial database instance to obtain a database instance corresponding to each processing node.

[0208] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0209] Extracting specification parameters from resource information of each hardware resource; the specification parameters include at least one of CPU main frequency and core number, memory size, bandwidth and rate, disk size, network rate and bandwidth;

[0210] The associated parameters in the initial database parameters are modified according to the specification parameters to obtain the modified database parameters of each initial database instance.

[0211] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0212] Bind each database instance to the corresponding processing node;

[0213] Run the corresponding database instance on each processing node to test and obtain the test results, including:

[0214] Run the corresponding bound database instance on each processing node to perform the test and obtain the test results.

[0215] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0216] Determine whether the relevant hardware information of each processing node conforms to the standard hardware information;

[0217] When it is determined that there is a processing node that does not conform to the standard hardware information, prompt information is output.

[0218] The above embodiment provides a computer program product, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.

[0219] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0220] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0221] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A testing method, characterized in that: Applied to a server, the method comprises: Building a database instance corresponding to each processing node according to the relevant hardware information of each processing node in the server; The corresponding database instance is run on each of the processing nodes to perform a test and obtain a test result.

2. The method according to claim 1, characterized in that The step of constructing a database instance corresponding to each processing node according to the relevant hardware information of each processing node in the server includes: Constructing an initial database instance corresponding to each of the processing nodes; According to the relevant hardware information of each processing node and the initial database parameters of the corresponding initial database instance, each initial database instance is configured to obtain a database instance corresponding to each processing node.

3. The method according to claim 2, characterized in that The configuring each of the initial database instances according to the relevant hardware information of each of the processing nodes and the initial library parameters of the corresponding initial database instance to obtain the database instance corresponding to each of the processing nodes includes: Allocate hardware resources for the corresponding initial database instance according to the relevant hardware information of each processing node; the hardware resources include at least one of CPU, memory, disk, and network; Each of the initial database instances is configured according to the hardware resources corresponding to each of the initial database instances and the initial database parameters of the corresponding initial database instances to obtain a database instance corresponding to each of the processing nodes.

4. The method according to claim 3, characterized in that The configuring each of the initial database instances according to the hardware resources corresponding to each of the initial database instances and the initial database parameters of the corresponding initial database instances to obtain the database instances corresponding to each of the processing nodes includes: Modifying the initial database parameters of each of the initial database instances according to each of the hardware resources to obtain modified database parameters of each of the initial database instances; Generate configuration files corresponding to the initial database instances according to the hardware resources and modified library parameters corresponding to the initial database instances; Each of the initial database instances is configured according to a configuration file corresponding to each of the initial database instances to obtain a database instance corresponding to each of the processing nodes.

5. The method according to claim 4, characterized in that The step of modifying the initial database parameters of each of the initial database instances according to each of the hardware resources to obtain the modified database parameters of each of the initial database instances includes: Extracting specification parameters from the resource information of each of the hardware resources; the specification parameters include at least one of the CPU main frequency and core number, memory size, bandwidth and rate, disk size, network rate and bandwidth; The associated parameters in the initial database parameters are modified according to the specification parameters to obtain the modified database parameters of each initial database instance.

6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Binding each of the database instances to a corresponding processing node; The corresponding database instance is run on each of the processing nodes to perform a test and obtain a test result, including: The corresponding bound database instance is run on each of the processing nodes to perform a test and obtain a test result.

7. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Determining whether the relevant hardware information of each of the processing nodes conforms to the standard hardware information; When it is determined that there is a processing node that does not conform to the standard hardware information, prompt information is output.

8. A testing device, characterized in that: The device comprises: A construction module, used to construct a database instance corresponding to each processing node in the server according to the relevant hardware information of each processing node; The test module is used to run the corresponding database instance on each of the processing nodes to perform a test and obtain a test result.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.