Database performance evaluation method and device, equipment and storage medium

By calculating the time when the source database and the target database process the same task, the performance ratio is obtained, and the target database is configured according to this ratio, the database performance evaluation problem in a heterogeneous database environment is solved, and efficient and stable data transmission and reduced operation and maintenance costs are achieved.

CN119718870APending Publication Date: 2025-03-28太保科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411863046.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In a heterogeneous database environment, it is difficult to accurately evaluate database performance, resulting in the inability to meet business needs.

Method used

By obtaining the connection information of the source database and the target database, calculate the time when both of them process the same task, obtain the performance ratio, and configure the target database according to this ratio, including resource allocation and parameter tuning, and perform distributed transformation if necessary.

Benefits of technology

Accurate evaluation of database performance is achieved, ensuring the efficiency and stability of data transmission, avoiding resource waste or performance bottlenecks, and reducing operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718870A_ABST
    Figure CN119718870A_ABST
Patent Text Reader

Abstract

The invention provides a database performance evaluation method and device, equipment and a storage medium, and relates to the technical field of database management.The method comprises the steps that firstly, connection information of data of a source database and a target database to be subjected to data transmission is obtained, connecting the source database and the target database to be subjected to data transmission according to the connection information, calculating the time spent by the source database and the target database to process the same task, obtaining the performance proportion of the source database and the target database based on the time, and configuring the target database based on the performance proportion. Therefore, the performance of the target database server can be measured and calculated in advance before the database migration work is started, and the accuracy of resource evaluation is 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 management technology, and in particular to a database performance evaluation method, device, equipment and storage medium. Background Art

[0002] In recent years, with the widespread application of domestic databases in leading financial enterprises, the ease of use of domestic database products has been significantly enhanced, and the improvement of the ecosystem has been accelerated. For cost control and architecture optimization considerations, many systems are gradually migrating from using foreign commercial or open source databases such as Oracle and MySQL, and running on Intel-based X86 servers, to heterogeneous database environments based on different types of servers.

[0003] However, given the performance differences between servers and databases, there is an urgent need for an accurate method to help users evaluate the performance of heterogeneous databases on diverse servers to ensure that their business needs can be met. Summary of the invention

[0004] In view of the above problems, the present application provides a database performance evaluation method, device, equipment and storage medium, including the following contents:

[0005] In a first aspect, the present application provides a database performance evaluation method.

[0006] Obtain data connection information of the source database and the target database for data transmission;

[0007] Connecting the source database and the target database for data transmission according to the connection information;

[0008] Calculating the time taken by the source database and the target database to process the same task, and obtaining a performance ratio of the source database and the target database based on the time;

[0009] The target database is configured based on the performance ratio.

[0010] Optionally, configuring the target database based on the performance ratio includes:

[0011] When the performance ratio meets the preset performance ratio requirement, data transmission to the target database is allowed;

[0012] When the performance ratio does not meet the preset performance ratio requirement, data transmission to the target database is not allowed.

[0013] Optionally, it is characterized in that when the performance ratio meets the preset performance ratio requirement, the method further includes:

[0014] Determine whether the target database needs to be transformed into a distributed one;

[0015] If the target database needs to be transformed into a distributed database, after the target database has completed the distributed transformation, data transmission to the target database after the distributed transformation is allowed.

[0016] Optionally, if the target database needs to be transformed into a distributed database, the method further includes:

[0017] Acquire actual performance parameters of the target database, including the peak number of requests completed per second by the database, the peak number of transaction requests completed per second, the capacity of a single database, and the converted number of CPU cores of a single database;

[0018] For each parameter in the actual performance parameters, there is a corresponding preset parameter threshold; the number of nodes for distributed transformation is calculated based on the actual performance parameters and the corresponding preset parameter threshold.

[0019] Optionally, the number of nodes for distributed transformation calculated according to the actual performance parameter and the corresponding preset parameter threshold includes:

[0020] Calculate the ratio of the peak number of requests completed per second by the database to a preset peak number of requests completed per second threshold, and round up to obtain the first number of nodes;

[0021] Calculating a ratio of the peak number of transaction requests completed per second to a preset peak threshold number of transaction requests completed per second, and rounding up to obtain a second number of nodes;

[0022] Calculate the ratio of the single-database capacity to a preset single-database capacity threshold, and round it up to obtain the third number of nodes;

[0023] Calculate the ratio of the converted single-bank CPU core number to a preset converted single-bank CPU core number threshold, and round up to obtain a fourth node number;

[0024] The number of nodes for distributed transformation is obtained based on the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes.

[0025] Optionally, when the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes are the same, the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes are used as the number of nodes for distributed transformation;

[0026] When the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes are different, the number of nodes corresponding to the performance parameter with the highest importance is selected as the number of nodes for distributed transformation.

[0027] In a second aspect, the present application provides a database performance evaluation device, the device comprising:

[0028] An acquisition unit, used to acquire connection information of data of a source database and a target database for data transmission to be performed;

[0029] A processing unit, configured to connect the source database and the target database for data transmission according to the connection information;

[0030] a calculation unit, configured to calculate the time taken by the source database and the target database to process the same task, and obtain a performance ratio of the source database and the target database based on the time;

[0031] A configuration unit is used to configure the target database based on the performance ratio.

[0032] Optionally, the configuration unit is specifically configured to allow data to be transmitted to the target database when the performance ratio meets a preset performance ratio requirement;

[0033] When the performance ratio does not meet the preset performance ratio requirement, data transmission to the target database is not allowed.

[0034] Optionally, the device further includes a judgment unit, which is used to judge whether the target database needs to be transformed into a distributed database when the performance ratio meets the preset performance ratio requirement;

[0035] If the target database needs to be transformed into a distributed database, after the target database has completed the distributed transformation, data transmission to the target database after the distributed transformation is allowed.

[0036] Optionally, the acquisition unit is further used to acquire actual performance parameters of the target database after the target database needs to be transformed into a distributed database, the actual performance parameters including the peak number of requests completed per second by the database, the peak number of transaction requests completed per second, the capacity of a single database, and the converted number of CPU cores of a single database;

[0037] The calculation unit is also used to have a corresponding preset parameter threshold for each parameter in the actual performance parameters; and calculate the number of nodes for distributed transformation based on the actual performance parameters and the corresponding preset parameter threshold.

[0038] Optionally, the number of nodes to be distributedly transformed calculated by the calculation unit according to the actual performance parameter and the corresponding preset parameter threshold comprises:

[0039] Calculate the ratio of the peak number of requests completed per second by the database to a preset peak number of requests completed per second threshold, and round up to obtain the first number of nodes;

[0040] Calculating a ratio of the peak number of transaction requests completed per second to a preset peak threshold number of transaction requests completed per second, and rounding up to obtain a second number of nodes;

[0041] Calculate the ratio of the single-database capacity to a preset single-database capacity threshold, and round it up to obtain the third number of nodes;

[0042] Calculate the ratio of the converted single-bank CPU core number to a preset converted single-bank CPU core number threshold, and round up to obtain a fourth node number;

[0043] The number of nodes for distributed transformation is obtained based on the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes.

[0044] Optionally, when the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes are the same, the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes are used as the number of nodes for distributed transformation;

[0045] When the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes are different, the number of nodes corresponding to the performance parameter with the highest importance is selected as the number of nodes for distributed transformation.

[0046] In a third aspect, the present application provides a device comprising a memory and a processor, wherein the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device executes the database performance evaluation method introduced in any implementation of the first aspect.

[0047] In a fourth aspect, the present application provides a computer-readable storage medium, in which a code is stored. When the code is executed, a device executing the code implements the database performance evaluation method introduced in any implementation of the first aspect.

[0048] The present application provides a database performance evaluation method. When executing the method, first obtain the connection information of the source database and the target database for data transmission, then connect the source database and the target database for data transmission according to the connection information, and then calculate the time taken by the source database and the target database to process the same task, and obtain the performance ratio of the source database and the target database based on the time, and configure the target database based on the performance ratio. In this way, the performance difference between the source database and the target database can be accurately evaluated to ensure the efficiency and stability of data transmission. At the same time, the resource allocation strategy based on the performance ratio helps to avoid resource waste or performance bottlenecks and reduce operation and maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only 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.

[0050] Figure 1 A flowchart of a database performance evaluation method provided in an embodiment of the present application;

[0051] Figure 2 A flowchart of a target database configuration method provided in an embodiment of the present application;

[0052] Figure 3 A schematic diagram of the structure of a database performance evaluation device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0054] Figure 1 A flowchart of a database performance evaluation method provided in an embodiment of the present application. Figure 1 As shown, the database performance evaluation method provided in the embodiment of the present application may include:

[0055] S101: Acquire data connection information of a source database and a target database for data transmission.

[0056] The connection information includes the database IP address, port number, database name, user name and password, etc. This information is necessary for the database client to connect to the database.

[0057] S102: Connect the source database and the target database for data transmission according to the connection information.

[0058] After obtaining the connection information of the source database and the target database, select a suitable database client such as a MySQL client, an Oracle client, etc., and use this information to establish a connection between the source database and the target database.

[0059] At the same time, the acquired connection information can be stored in a database dedicated to managing database connection information, or in a configuration file, so that in the subsequent data transmission process, the connection information can be easily acquired and used without having to enter it manually each time.

[0060] S103: Calculate the time taken by the source database and the target database to process the same task, and obtain a performance ratio of the source database and the target database based on the time.

[0061] Before calculation, you need to obtain relevant information and collect data from the source database through data input, server monitoring, database monitoring, etc. Specifically, collect the required data from the source database through data input (such as manual entry), server monitoring (such as using tools such as Zabbix and Nagios), database monitoring (such as using the database's own monitoring tools or third-party tools), etc. These data may include server hardware information (such as the number of CPU cores, memory size, disk type and size, etc.), database performance indicators (such as QPS, response time, etc.), and database configuration information (such as database type, version, etc.).

[0062] The specific collection process includes: first, using scripting technology to collect various configuration information of the database server, including the server's IP address, the number of CPU cores, the server model, the total memory capacity, the disk type, and the disk capacity. This will serve as an important input source for multidimensional data integration in subsequent steps. During the collection process, the CPU usage rate is obtained by reading the / proc / stat file, the memory usage is understood by using the / proc / meminfo file, and the relevant indicators of the Runqueue and Waitqueue are captured using the vmstat command.

[0063] Further information about the database is obtained, including the database type, version number, database role (such as primary or standby), and the relationship between the primary and standby databases. Capacity information of the database is collected, including the overall size of the file system, usage rate, used space, free space, and the ratio of free space. At the same time, for the database tablespace, key data such as total size, usage rate, used size, free size, and free rate are also collected.

[0064] Finally, a special script tool is used to monitor and collect database performance indicators, mainly the number of requests per second (QPS) and the number of transactions per second (TPS). The average and peak values ​​of QPS and TPS are calculated, and these important performance data are used as data input into the database information.

[0065] Through the above process, a number of key database server and database information were collected, including but not limited to: the IP address of the database server, the number of CPU cores, the specific model or type of the server, the total capacity of the memory, the size of the disk, and the type of the disk. In addition, the performance indicators of the database were obtained, such as the average number of requests completed per second (QPS) and the peak value of QPS. These indicators reflect the query efficiency of the database. At the same time, the type, version number, and storage capacity of the database were also recorded. This information is crucial for subsequent hardware evaluation.

[0066] The data transmission function of the low-code platform will be used to transfer the information collected in the above process from the server of the source database to the hardware evaluation server, which is mainly used to evaluate and test the performance, stability, compatibility and energy efficiency of the server hardware. On the hardware evaluation server, this information is imported into a dedicated hardware evaluation database for subsequent data analysis and hardware performance evaluation.

[0067] This process not only ensures the accuracy and completeness of the data, but also greatly improves the efficiency and security of data transmission, laying a solid foundation for subsequent hardware evaluation and database optimization work.

[0068] After obtaining relevant data of the source database, the time taken by the source database and the target database to process the same task is calculated, and the performance ratio of the source database and the target database is obtained based on the time.

[0069] By calculating the CPU performance conversion ratio of the source database on the source server and the CPU performance conversion ratio of the heterogeneous target database on the target server, specifically, executing multiple SQL statements, the heterogeneous server performance is measured by execution time. Taking CPU performance as an example, the power function operation with high CPU consumption is selected for measurement, and the execution time comparison after multiple cycles is used as the performance indicator. For example, the execution time on the Intel server is 13.739 seconds, while the execution time on another heterogeneous database server is 25.921 seconds. The CPU performance ratio of the two database servers is 1:0.53.

[0070] S104: configuring the target database based on the performance ratio.

[0071] The target database is configured according to the obtained performance ratio, including: resource allocation, allocating sufficient resources for the target database on the target server according to the performance ratio, including CPU, memory, storage, etc. If the performance requirement of the target database is higher than that of the source database, more resources need to be allocated to it on the target server to ensure that it can run efficiently. Parameter tuning: In addition to resource allocation, the parameters of the target database also need to be tuned according to the performance ratio. This includes adjusting the number of connections, cache size, transaction processing strategy, etc. of the database to better adapt it to the hardware environment and business requirements of the target server. Architecture design: If the source database is a large database, distributed transformation may need to be considered during migration. In this step, the performance ratio can be used to evaluate whether a single target server can carry the database load after migration. If a single server cannot meet the requirements, a distributed architecture design is required to split the database into multiple parts and run it on multiple servers.

[0072] Combine the following Figure 2 The target database configuration method in the embodiment of the present application is introduced. Figure 2 A flowchart of a target database configuration method provided in an embodiment of the present application. In an implementation of the embodiment of the present application, configuring the target database based on the performance ratio includes:

[0073] S1041. When the performance ratio meets a preset performance ratio requirement, data transmission to the target database is allowed.

[0074] According to business needs and technical requirements, for example, based on the database's response time, throughput, concurrent processing capabilities, and other aspects, a reasonable performance ratio requirement is preset. If the calculated performance ratio meets this preset requirement, it is considered that the target database can run efficiently after migration and meet business needs. At this point, data is allowed to be transferred to the target database and the migration process begins.

[0075] S1042: When the performance ratio does not meet the preset performance ratio requirement, data transmission to the target database is not allowed.

[0076] Similarly, the calculated performance ratio is determined based on the preset performance ratio requirements. If the performance ratio does not meet the requirements, the data transfer process cannot be started, because this may cause the target database after migration to fail to meet business needs.

[0077] When the performance ratio meets the preset performance ratio requirement, after allowing data to be transmitted to the target database, the method further includes:

[0078] Determine whether the target database needs to be transformed into a distributed one. Distributed transformation is usually to solve challenges in data scale, query complexity, business scalability, etc. If the target database cannot handle the amount of data and query load after migration on a single node, or if the business needs require higher scalability and fault tolerance, distributed transformation is required. Taking the OceanBase database as an example, according to practical experience, for read-based businesses, the maximum carrying capacity of each logical CPU is about 1000 to 2000QPS. For businesses that mainly update transactions, the maximum carrying capacity of each logical CPU is about 100 to 200TPS. TPS is related to the transaction type and the number of SQLs in the transaction. Here, it is estimated based on 10 to 20 SQLs per transaction. Taking into account the additional overhead of OceanBase proxy, sys tenants, OS, etc., and the control of the CPU utilization rate of the OceanBase server below 70%, the 64-physical core x86 server is roughly controlled below 70,000QPS or 7,000TPS. Therefore, four judgment criteria are set in the embodiment of the present application, namely, the peak threshold of the number of requests completed per second (QPS), the peak threshold of the number of transaction requests completed per second (TPS), the single database capacity threshold, and the converted single database CPU core number threshold. When the target database exceeds the above thresholds, it is further necessary to consider the distributed transformation of the target database.

[0079] Specifically, the actual performance parameters of the target database are obtained, including the peak number of requests completed per second by the database, the peak number of transaction requests completed per second, the capacity of a single database, and the converted number of CPU cores of a single database; for each parameter in the actual performance parameters, there is a corresponding preset parameter threshold; the number of nodes for distributed transformation is calculated based on the actual performance parameters and the corresponding preset parameter threshold.

[0080] Calculate the ratio of the peak number of requests completed per second by the database to the preset peak number of requests completed per second threshold, and round up to get the first number of nodes. Calculate the ratio of the peak number of transaction requests completed per second to the preset peak number of transaction requests completed per second threshold, and round up to get the second number of nodes, calculate the ratio of the single library capacity to the preset single library capacity threshold, and round up to get the third number of nodes, calculate the ratio of the converted single library CPU core number to the preset converted single library CPU core number threshold, and round up to get the fourth number of nodes, based on the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes to obtain the number of nodes for distributed transformation. The actual performance parameter thresholds in the embodiment of the present application are: A) the peak number of requests completed per second (QPS) is greater than 70,000; B) the peak number of transaction requests completed per second (TPS) is greater than 7000; C) the single library capacity is greater than 20TB; D) the number of single library cores after conversion is greater than 70 cores. Specifically, when calculating, the actual value is divided by the threshold and rounded up according to the above rules to get the number of nodes that need to be divided into.

[0081] When the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes are the same, the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes are used as the number of nodes for distributed transformation.

[0082] For example, assuming that the actual QPS peak of an OceanBase database is 85,000, then according to rule A, the number of nodes to be divided into is: 85,000 / 70,000=1.21, rounded up to 2 nodes.

[0083] Assuming that the actual TPS peak is 8000, then according to rule B, the number of nodes to be divided into is: 8000 / 7000=1.14, rounded up to 2 nodes.

[0084] Assuming that the actual capacity of a single database is 25 TB, then according to rule C, the number of nodes that need to be divided is: 25 / 20=1.25, rounded up to 2 nodes.

[0085] Assuming that the actual number of cores in a single database after conversion is 80 cores, then according to rule D, the number of nodes to be divided is: 80 / 70=1.14, rounded up to 2 nodes.

[0086] Therefore, taking these four aspects into consideration, the database ultimately needs to be split into two nodes to build a distributed database system.

[0087] In the above calculation results, the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes are the same, so the result is obtained directly. When the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes are not the same, the reason for the difference is first analyzed to analyze why the number of nodes calculated in each aspect is different. It may be because the ratio of the actual value of different performance indicators to the threshold is different, or because some performance indicators have a greater impact on system performance. Then, according to business requirements and system characteristics, determine which performance indicators are more important to system performance. For example, for some business scenarios, QPS and TPS may be more critical, while for other scenarios, storage capacity or CPU resources may be more important. On the basis of determining the priority, the number of nodes calculated in various aspects is comprehensively considered. Select a larger number of nodes as a benchmark to ensure that the system can meet the requirements of all performance indicators. After the target database completes the distributed transformation, data transmission to the target database after the distributed transformation is allowed.

[0088] The above are some specific implementations of a database performance evaluation method provided in the embodiment of the present application. Based on this, the present application also provides a corresponding device. The device provided in the embodiment of the present application will be introduced from the perspective of functional modularization.

[0089] Figure 3 A schematic diagram of the structure of a database performance evaluation device provided in an embodiment of the present application. Figure 3 As shown, the database performance evaluation device 300 provided in the embodiment of the present application includes:

[0090] An acquisition unit 310 is used to acquire connection information of data of a source database and a target database for data transmission;

[0091] A processing unit 320 is used to connect the source database and the target database for data transmission according to the connection information;

[0092] A calculation unit 330 is used to calculate the time taken by the source database and the target database to process the same task, and obtain a performance ratio of the source database and the target database based on the time;

[0093] The configuration unit 340 is configured to configure the target database based on the performance ratio.

[0094] In an implementation of the embodiment of the present application, the configuration unit is specifically configured to allow data to be transmitted to the target database when the performance ratio meets a preset performance ratio requirement;

[0095] When the performance ratio does not meet the preset performance ratio requirement, data transmission to the target database is not allowed.

[0096] In an implementation of the embodiment of the present application, the device further includes a judgment unit, which is used to judge whether the target database needs to be distributed when the performance ratio meets the preset performance ratio requirement;

[0097] If the target database needs to be transformed into a distributed database, after the target database has completed the distributed transformation, data transmission to the target database after the distributed transformation is allowed.

[0098] In an implementation of the embodiment of the present application, the acquisition unit is further used to acquire actual performance parameters of the target database after the target database needs to be transformed into a distributed database, and the actual performance parameters include the peak number of requests completed per second by the database, the peak number of transaction requests completed per second, the capacity of a single database, and the converted number of CPU cores of a single database;

[0099] The calculation unit is also used to have a corresponding preset parameter threshold for each parameter in the actual performance parameters; and calculate the number of nodes for distributed transformation based on the actual performance parameters and the corresponding preset parameter threshold.

[0100] In an implementation of the embodiment of the present application, the number of nodes to be distributedly transformed calculated by the calculation unit according to the actual performance parameter and the corresponding preset parameter threshold includes:

[0101] Calculate the ratio of the peak number of requests completed per second by the database to a preset peak number of requests completed per second threshold, and round up to obtain the first number of nodes;

[0102] Calculating a ratio of the peak number of transaction requests completed per second to a preset peak threshold number of transaction requests completed per second, and rounding up to obtain a second number of nodes;

[0103] Calculate the ratio of the single-database capacity to a preset single-database capacity threshold, and round it up to obtain the third number of nodes;

[0104] Calculate the ratio of the converted single-bank CPU core number to a preset converted single-bank CPU core number threshold, and round up to obtain a fourth node number;

[0105] The number of nodes for distributed transformation is obtained based on the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes.

[0106] In an implementation of the embodiment of the present application, when the first number of nodes, the second number of nodes, the third number of nodes, and the fourth number of nodes are the same, the first number of nodes, the second number of nodes, the third number of nodes, and the fourth number of nodes are used as the number of nodes for distributed transformation;

[0107] When the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes are different, the number of nodes corresponding to the performance parameter with the highest importance is selected as the number of nodes for distributed transformation.

[0108] The embodiments of the present application also provide corresponding devices and computer storage media for implementing the solutions provided by the embodiments of the present application.

[0109] The device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device executes the method described in any embodiment of the present application.

[0110] The computer storage medium stores codes, and when the codes are executed, a device executing the codes implements the method described in any embodiment of the present application.

[0111] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.

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

[0113] It should also be noted that the various embodiments in this specification are described in a progressive manner, and the same and similar parts between the various embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and apparatus embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments. The device and apparatus embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0114] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A database performance evaluation method, characterized in that: The method comprises: Obtain data connection information of the source database and the target database for data transmission; Connecting the source database and the target database for data transmission according to the connection information; Calculating the time taken by the source database and the target database to process the same task, and obtaining a performance ratio of the source database and the target database based on the time; The target database is configured based on the performance ratio.

2. The method according to claim 1, characterized in that The configuring the target database based on the performance ratio includes: When the performance ratio meets the preset performance ratio requirement, data transmission to the target database is allowed; When the performance ratio does not meet the preset performance ratio requirement, data transmission to the target database is not allowed.

3. The method according to claim 2, characterized in that When the performance ratio meets the preset performance ratio requirement, the method further includes: Determine whether the target database needs to be transformed into a distributed one; If the target database needs to be transformed into a distributed database, after the target database has completed the distributed transformation, data transmission to the target database after the distributed transformation is allowed.

4. The method according to claim 3, characterized in that If the target database needs to be transformed into a distributed database, the method further includes: Acquire actual performance parameters of the target database, including the peak number of requests completed per second by the database, the peak number of transaction requests completed per second, the capacity of a single database, and the converted number of CPU cores of a single database; For each parameter in the actual performance parameters, there is a corresponding preset parameter threshold; the number of nodes for distributed transformation is calculated based on the actual performance parameters and the corresponding preset parameter threshold.

5. The method according to claim 4, characterized in that The number of nodes to be transformed into distributed nodes is calculated based on the actual performance parameter and the corresponding preset parameter threshold, including: Calculate the ratio of the peak number of requests completed per second by the database to a preset peak number of requests completed per second threshold, and round up to obtain the first number of nodes; Calculating a ratio of the peak number of transaction requests completed per second to a preset peak threshold number of transaction requests completed per second, and rounding up to obtain a second number of nodes; Calculate the ratio of the single-database capacity to a preset single-database capacity threshold, and round it up to obtain the third number of nodes; Calculate the ratio of the converted single-bank CPU core number to a preset converted single-bank CPU core number threshold, and round up to obtain a fourth node number; The number of nodes for distributed transformation is obtained based on the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes.

6. The method according to claim 5, characterized in that When the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes are the same, the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes are used as the number of nodes for distributed transformation; When the first number of nodes, the second number of nodes, the third number of nodes and the fourth number of nodes are different, the number of nodes corresponding to the performance parameter with the highest importance is selected as the number of nodes for distributed transformation.

7. A database performance evaluation device, characterized in that: The device comprises: An acquisition unit, used to acquire connection information of data of a source database and a target database for data transmission to be performed; A processing unit, configured to connect the source database and the target database for data transmission according to the connection information; a calculation unit, configured to calculate the time taken by the source database and the target database to process the same task, and obtain a performance ratio of the source database and the target database based on the time; A configuration unit is used to configure the target database based on the performance ratio.

8. The device according to claim 7, characterized in that The configuration unit is specifically configured to allow data to be transmitted to the target database when the performance ratio meets a preset performance ratio requirement; When the performance ratio does not meet the preset performance ratio requirement, data transmission to the target database is not allowed.

9. A computing device, characterized in that The computing device includes: a memory and a processor; The memory is used to store computer programs; The processor is configured to implement the method according to any one of claims 1 to 6 when executing the computer program.

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