Server cluster monitoring method, device and server cluster
By combining relational databases and time-series databases in a server cluster, a resource usage matrix is generated for data correction, which solves the problem of low efficiency in server cluster monitoring data correction and achieves fast and accurate data analysis and improved system stability.
Patent Information
- Application Number
- CN202411126806.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2044-08-16
AI Technical Summary
Existing technologies have low efficiency in correcting server cluster monitoring data, making it impossible to accurately analyze resource usage data, which leads to a decrease in system stability and reliability.
By combining relational databases and time-series databases, a resource usage matrix is generated. Matrix operations are then used to determine data deviations and perform automatic corrections, reducing manual intervention.
It improves the efficiency of server cluster monitoring data correction, enhances the accuracy of resource usage data analysis and system stability, and reduces the workload of manual troubleshooting.
Smart Images

Figure CN119311509B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a server cluster monitoring method, apparatus, and server cluster. Background Technology
[0002] A server cluster is a system composed of multiple servers that are connected via a network and work together to achieve higher computing power, availability, and reliability. For example, it can run large neural network models and provide artificial intelligence computing services. To ensure that a server cluster can provide better service, it is necessary to monitor the resource usage data within the server cluster.
[0003] Related technologies use different types of databases to record resource usage data in server clusters. In the event of data inconsistencies, manual checks are usually performed to compare data from different databases. This results in low efficiency in correcting server cluster monitoring data and makes it impossible to accurately analyze resource usage data in server clusters.
[0004] Therefore, improving the efficiency of server cluster monitoring data correction has become a pressing technical problem for the industry. Summary of the Invention
[0005] This application provides a server cluster monitoring method, apparatus, and server cluster to address the technical problem of how to improve the correction efficiency of server cluster monitoring data.
[0006] This application provides a server cluster monitoring method, including: Resource usage data of each computing task in the server cluster is collected to generate first data, and the first data is stored in a relational database; Resource usage data at each monitoring time in the server cluster is collected to generate second data, and the second data is stored in a time-series database. The first data and the second data are scanned to generate a first resource usage matrix and a second resource usage matrix, respectively; the resource usage matrix is used to represent the resource usage data of each computing task in the server cluster at each monitoring time. Based on the difference between the first resource usage matrix and the second resource usage matrix, data correction is performed on the relational database or the time-series database.
[0007] In some embodiments, scanning the first data and the second data to generate a first resource usage matrix and a second resource usage matrix respectively includes: Determine the target time period and the types of resource usage to be monitored within the target time period; The first data corresponding to the target time period is scanned in the relational database to generate a first resource usage matrix corresponding to each resource usage type; The second data corresponding to the target time period is scanned in the time series database to generate a second resource usage matrix corresponding to each resource usage type; In this matrix, the rows in the first resource usage matrix and the second resource usage matrix are determined based on the computing task, the columns are determined based on the monitoring time, and the element values are determined based on the resource usage data of any computing task at any monitoring time.
[0008] In some embodiments, the element values in the first resource usage matrix and the second resource usage matrix are determined based on the following steps: Determine the resource usage type corresponding to the element value; Based on the time-series database, resource usage data of each computing task for the resource usage type is obtained at each monitoring time. Based on the resource usage data of each computing task for the resource usage type at each monitoring time, determine the resource usage baseline value of each computing task at each monitoring time. If, at any monitoring time, the resource usage data of any computing task for the resource usage type is greater than the resource usage baseline value, the element value corresponding to the computing task at any monitoring time is determined as the first preset value. If, at any monitoring time, the resource usage data of any computing task for the resource usage type is less than the resource usage baseline value, the element value corresponding to the computing task at that monitoring time is determined as the second preset value.
[0009] In some embodiments, the step of correcting the data in the relational database or the time-series database based on the difference between the first resource usage matrix and the second resource usage matrix includes: Obtain the system load of the server cluster; When the system load is less than the preset load, the relational database or the time-series database is corrected based on the difference between the first resource usage matrix and the second resource usage matrix.
[0010] In some embodiments, the step of correcting the data in the relational database or the time-series database based on the difference between the first resource usage matrix and the second resource usage matrix includes: Perform a difference operation between the element value at any position in the first resource usage matrix and the element value at the corresponding position in the first resource usage matrix; If the difference is zero, it is determined that there is no deviation between the first data and the second data; If the difference is not zero, it is determined that there is a deviation between the first data and the second data, the credibility of the first data and the second data is determined, and the data correction is performed on the relational database or the time series database based on the data with higher credibility.
[0011] In some embodiments, after correcting the relational database or the time-series database based on the difference between the first resource usage matrix and the second resource usage matrix, the method further includes: Based on the data correction status of the relational database or the time-series database, generate a report; The report is sent to the monitoring platform of the server cluster.
[0012] This application provides a server cluster monitoring device, including: The first acquisition module is used to collect resource usage data of each computing task in the server cluster, generate first data, and store the first data in a relational database. The second acquisition module is used to acquire resource usage data at each monitoring time in the server cluster, generate second data, and store the second data in a time-series database. The data scanning module is used to scan the first data and the second data to generate a first resource usage matrix and a second resource usage matrix, respectively; the resource usage matrix is used to represent the resource usage data of each computing task in the server cluster at each monitoring time. The data correction module is used to correct the data in the relational database or the time-series database based on the difference between the first resource usage matrix and the second resource usage matrix.
[0013] This application provides a server cluster, including a server cluster monitoring device and multiple server nodes; The server cluster monitoring device is connected to the server node and is used to execute the server cluster monitoring method.
[0014] This application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the server cluster monitoring method described above.
[0015] This application provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the server cluster monitoring method described above.
[0016] The server cluster monitoring method, apparatus, and server cluster provided in this application collect resource usage data of each computing task in the server cluster, generate first data, and store the first data in a relational database; collect resource usage data at each monitoring time in the server cluster, generate second data, and store the second data in a time-series database; scan the first data and the second data to generate a first resource usage matrix and a second resource usage matrix, respectively; and correct the data in the relational database or the time-series database based on the difference between the first resource usage matrix and the second resource usage matrix. Since the resource usage data of each computing task in the server cluster at each monitoring time is represented by a resource usage matrix, matrix operations can be used to quickly and accurately determine the data deviation between the two databases and the location of the data with deviation, eliminating the need for manual investigation, thus improving the data correction efficiency of server cluster monitoring and the accuracy of resource usage data analysis in the server cluster. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0018] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is one of the flowcharts illustrating the server cluster monitoring method provided in this application.
[0020] Figure 2 This is the second flowchart of the server cluster monitoring method provided in this application.
[0021] Figure 3 This is a schematic diagram of the server cluster monitoring device provided in this application.
[0022] Figure 4 This is a schematic diagram of the server cluster structure provided in this application.
[0023] Figure 5 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0024] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first," "second," etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps, units, or modules is not necessarily limited to those explicitly listed, but may include other steps, units, or modules not explicitly listed or inherent to such processes, methods, products, or devices.
[0026] In monitoring server clusters, databases play a crucial role, and different types of databases are typically used to store monitoring data. Monitoring data helps users (administrators) better understand cluster issues, and monitoring statistics need to provide users with more detailed and accurate data reports. However, over time and with a surge in data volume, the data stored in the database may become inconsistent, leading to inaccurate monitoring results, impacting system stability and reliability, and increasing the workload of cluster maintenance personnel.
[0027] In order to address the shortcomings of related technologies, Figure 1 This is one of the flowcharts illustrating the server cluster monitoring method provided in this application, such as... Figure 1 As shown, the method includes steps 110, 120, 130 and 140.
[0028] Step 110: Collect resource usage data for each computing task in the server cluster, generate first data, and store the first data in a relational database.
[0029] Specifically, the server cluster monitoring method provided in this application is executed by a server cluster monitoring device. This device can be implemented in software, such as a server cluster monitoring program running in a storage system; or it can be a device that executes the server cluster monitoring method, such as a desktop computer or server in a storage system.
[0030] Computational tasks refer to data processing tasks performed by the server cluster, such as neural network model training and inference tasks. Resource usage data refers to the usage of various hardware and software resources in the server cluster, including system load, network traffic usage, processor utilization, memory usage, and disk usage.
[0031] Resource usage data for various computing tasks can be collected to generate primary data. This primary data can be resource usage data recorded on a task-by-task basis and can be stored in a relational database. Relational databases organize data in a tabular format, consisting of rows and columns. Tables can be connected and linked through relationships such as foreign keys. Relational databases support complex queries, data integrity, and transaction processing, making them suitable for storing and managing structured data. Common relational database systems include MySQL.
[0032] Step 120: Collect resource usage data at each monitoring time in the server cluster, generate second data, and store the second data in the time series database.
[0033] Specifically, relational databases may encounter performance bottlenecks when processing large-scale time-series data, so time-series databases can be used simultaneously to store resource usage data.
[0034] The main difference between time-series databases and relational databases lies in their design philosophy and data storage methods. Time-series databases are specifically designed for processing time-series data, which is typically a series of records generated in chronological order. In server cluster monitoring, time-series databases can efficiently store and query monitoring data that changes over time, such as system load, network traffic, and storage usage.
[0035] Resource usage data for each computing task in the server cluster can be collected in chronological order at each monitoring moment, forming secondary data, and stored in a time-series database.
[0036] Relational databases and time-series databases store monitoring data from server clusters synchronously. Relational databases operate on a task-by-task basis, supporting complex queries and transaction processing with high data consistency, but they suffer from performance bottlenecks when handling large-scale data and high-concurrency scenarios. Time-series databases, on the other hand, operate on a time-series basis, optimizing the storage and query performance of time-series data. They can efficiently handle high-frequency data writes and queries, but are not suitable for complex relational queries and transaction management. Combining the two provides an effective way to store server monitoring data.
[0037] Step 130: Scan the first data and the second data to generate the first resource usage matrix and the second resource usage matrix respectively; the resource usage matrix is used to represent the resource usage data of each computing task in the server cluster at each monitoring time.
[0038] Specifically, as time goes on and the amount of data increases, discrepancies may arise between relational databases and time-series databases. Related technologies employ manual review, retrieving all business data from the relational database for a specific time period and then comparing each record with the data in the time-series database.
[0039] In this embodiment, the first data in the relational database can be scanned to generate a first resource usage matrix based on the resource usage data of each computing task at each monitoring time in the server cluster; the second data in the time-series database can be scanned to generate a second resource usage matrix based on the resource usage data of each computing task at each monitoring time in the server cluster.
[0040] Step 140: Based on the difference between the first resource usage matrix and the second resource usage matrix, perform data correction on the relational database or time series database.
[0041] Specifically, the difference between the first and second resource usage matrices can be calculated to quickly determine the data discrepancies between the two databases and their corresponding locations, thereby correcting the data in relational or time-series databases. Comparing resource usage matrices can also reduce interference with large amounts of normal data and accurately locate abnormal data.
[0042] For example, if the difference between any element values is zero, it means that the resource usage data of the same computing task represented by the element value in the two databases are consistent at the same monitoring time, and no correction is needed; if the difference is not zero, it means that the resource usage data of the same computing task represented by the element value in the two databases are inconsistent at the same monitoring time, and correction is needed. Based on the position of the element value in the matrix, the corresponding computing task and monitoring time can be quickly located, and the data in the other database can be corrected based on the database with higher credibility.
[0043] The server cluster monitoring method provided in this application collects resource usage data of each computing task in the server cluster to generate first data, which is then stored in a relational database. It also collects resource usage data at various monitoring times in the server cluster to generate second data, which is then stored in a time-series database. The first and second data are scanned to generate a first resource usage matrix and a second resource usage matrix, respectively. Based on the difference between the first and second resource usage matrices, data correction is performed on the relational database or the time-series database. Since the resource usage data of each computing task at each monitoring time is represented by a resource usage matrix, matrix operations can quickly and accurately determine the data discrepancies between the two databases and the locations of the discrepancies, eliminating the need for manual investigation. This improves the efficiency of data correction in server cluster monitoring and enhances the accuracy of resource usage data analysis in the server cluster.
[0044] It should be noted that each implementation method of this application can be freely combined, rearranged, or executed individually, and does not need to rely on or depend on a fixed execution order.
[0045] In some embodiments, scanning the first data and the second data to generate a first resource usage matrix and a second resource usage matrix respectively includes: Determine the target time period and the types of resource usage to be monitored within that time period; Scan the first data corresponding to the target time period in the relational database to generate the first resource usage matrix corresponding to each resource usage type; Scan the second data corresponding to the target time period in the time series database to generate a second resource usage matrix corresponding to each resource usage type; In the first and second resource usage matrices, the rows are determined based on the computing tasks, the columns are determined based on the monitoring time, and the element values are determined based on the resource usage data of any computing task at any monitoring time.
[0046] Specifically, due to the large volume of data monitored by the server cluster, comparisons can be made by specifying a time period and a specific resource usage type. When scanning the first and second data sets, a target time period and the resource usage types to be monitored within that period can be determined. Resource usage types can include processors (including CPUs and GPUs), memory, network traffic, and disk usage.
[0047] The first data corresponding to the target time period is scanned in the relational database. For each data entry, according to the data entry or recording rules of the relational database, the first resource usage matrix is determined, with the computing task as the row, the monitoring time as the column, and the resource usage data of any computing task at any monitoring time as the element value. For example, if the target time period is from 11:00 AM to 12:00 PM, and monitoring is performed every 15 minutes, a total of 4 computing tasks are monitored. The resource usage types are CPU usage data and GPU usage data. The first resource usage matrix corresponding to the CPU and the first resource usage matrix corresponding to the GPU can be obtained, which can be represented as:
[0048] In the formula, an element value of 0 indicates that the corresponding resource was not used, and an element value of 1 indicates that the corresponding resource was used.
[0049] The first resource usage matrix corresponding to the central processing unit has 4 rows, each corresponding to one of the 4 computing tasks; and 5 columns, each corresponding to one of the 5 monitoring times (11:00, 11:15, 11:30, 11:45, and 12:00). The meanings of the rows and columns in the other resource usage matrices are the same as in this matrix, and will not be repeated here.
[0050] The second data corresponding to the target time period is scanned in the time-series database. For each data entry, according to the data entry or recording rules of the time-series database, the second resource usage matrix is determined with the computation task as the row, the monitoring time as the column, and the resource usage data of any computation task at any monitoring time as the element value. For example, the second resource usage matrix corresponding to the central processing unit and the second resource usage matrix corresponding to the graphics processing unit can be obtained, which can be represented as:
[0051] In the formula, an element value of 0 indicates that the corresponding resource was not used, and an element value of 1 indicates that the corresponding resource was used.
[0052] The server cluster monitoring method provided in this application scans the first data and the second data to generate a first resource usage matrix and a second resource usage matrix, respectively. The resource usage data of each computing task in the server cluster at each monitoring time is represented by the resource usage matrix, which is beneficial to quickly and accurately determine the data deviation between the two databases by using matrix operations.
[0053] In some embodiments, the element values in the first resource usage matrix and the second resource usage matrix are determined based on the following steps: Determine the resource usage type corresponding to the element value; Based on a time-series database, obtain resource usage data for each computing task at each monitoring time based on resource usage type; Based on the resource usage data of each computing task at each monitoring time, the baseline value of resource usage for each computing task at each monitoring time is determined. If the resource usage data of any computing task at any monitoring time is greater than the resource usage baseline value for the resource usage type, the element value corresponding to any computing task at any monitoring time will be determined as the first preset value. If the resource usage data of any computing task at any monitoring time is less than the resource usage baseline value, the element value corresponding to any computing task at any monitoring time is determined as the second preset value.
[0054] Specifically, to facilitate comparison, resource usage data can be effectively parameterized, that is, represented by appropriate effective parameters, which is beneficial for achieving fast matrix calculations.
[0055] Understandably, the parameterization methods differ for different types of resources. For discrete resource usage data, two preset values can be used, such as 1 to indicate resource usage and 0 to indicate unused resources. For continuous resource usage data, a baseline value can be determined based on relevant records in the database, using the average, median, etc. The resource usage data of each calculation task at each monitoring time is then compared with the baseline value to achieve parameterization, represented by a small number of effective parameters.
[0056] Specifically, the first step is to determine the resource usage type corresponding to the element value. Then, resource usage data for each computing task at each monitoring time is retrieved from the time-series database. The time-series database collects various resource usage data according to the monitoring time, can store large amounts of time-series data, and its data storage format is suitable for rapid retrieval and analysis of time-series data.
[0057] Based on the resource usage data of each computing task at each monitoring time, the baseline value of resource usage for each computing task at each monitoring time is determined by methods such as finding the least common divisor, average, or median.
[0058] If the resource usage data of any computing task at any monitoring time is greater than the resource usage baseline value for the resource usage type, the element value corresponding to any computing task at any monitoring time is determined as the first preset value, for example, represented by 1.
[0059] If the resource usage data of any computing task at any monitoring time is less than the resource usage baseline value, the element value corresponding to any computing task at any monitoring time is determined as the second preset value, for example, represented by 0.
[0060] The server cluster monitoring method provided in this application parameterizes resource usage data and determines the element values in the first resource usage matrix and the second resource usage matrix. This is beneficial for quickly and accurately determining the data discrepancies between the two databases using matrix operations.
[0061] In some embodiments, data correction is performed on a relational database or a time-series database based on the difference between a first resource usage matrix and a second resource usage matrix, including: Get the system load of the server cluster; When the system load is less than the preset load, the relational database or time series database is corrected based on the difference between the first resource usage matrix and the second resource usage matrix.
[0062] Specifically, the server cluster runs business computing tasks, such as artificial intelligence computing tasks. To avoid resource contention and conflicts between the server cluster and these business computing tasks during data correction, data correction can be performed during system idle time. A scheduled task with configurable intervals can be set up to scan and compare data in a relational database and a time-series database within a certain time period. This task can be manually triggered, requiring a specified time period. For example, it can be scheduled to run during system idle time, such as early morning. Alternatively, the timing can be determined based on system load.
[0063] It can statistically analyze the resource configuration data of all server nodes in a server cluster, including the number of processors, processor computing power, memory allocation, memory space, network traffic data, and the number of server nodes. Based on the resource configuration data, it determines the maximum system load that the server cluster can handle. Based on the maximum system load and a preset ratio coefficient, it determines the preset load. The preset ratio coefficient can be a coefficient less than 1 and can be set according to actual conditions.
[0064] Obtain the system load of the server cluster and compare it with the preset load. If the system load is greater than or equal to the preset load, it indicates a high system load, heavy business computing tasks, and insufficient resources. If the system load is less than the preset load, it indicates a low system load, light business computing tasks, and sufficient resources, allowing for data correction. In this case, data correction can be performed on the relational database or time-series database based on the difference between the first and second resource usage matrices.
[0065] The server cluster monitoring method provided in this application determines the timing of data correction based on the system load of the server cluster. This allows for seamless execution without the user's awareness and avoids the server cluster competing for resources to perform data correction during peak user usage periods, thereby improving the operational stability of the server cluster and the user experience.
[0066] In some embodiments, data correction is performed on a relational database or a time-series database based on the difference between a first resource usage matrix and a second resource usage matrix, including: Perform a difference operation between the element value at any position in the first resource usage matrix and the element value at the corresponding position in the first resource usage matrix; If the difference is zero, it can be determined that there is no deviation between the first and second data. If the difference is not zero, it is determined that there is a deviation between the first data and the second data, the reliability of the first data and the second data is determined, and the data in the relational database or time series database is corrected based on the data with higher reliability.
[0067] Specifically, when correcting data, the difference between the element value at any position in the first resource usage matrix and the element value at the corresponding position in the first resource usage matrix can be calculated. A corresponding position refers to a position where the row and column of the element value are the same, representing resource usage data for the same computational task at the same monitoring time.
[0068] If the difference is zero, it means that there is no discrepancy between the resource usage data of the first and second data for the computing task represented by that location at that monitoring time. If the difference is not zero, it means that there is a discrepancy between the resource usage data of the first and second data for the computing task represented by that location at that monitoring time, and the specific computing task and the specific monitoring time can be determined.
[0069] At this point, it is necessary to determine the reliability of the first and second data. If the reliability of the first data is high, it indicates that the data in the relational database is relatively accurate and can be used to correct the data in the time-series database; if the reliability of the second data is high, it indicates that the data in the time-series database is relatively accurate and can be used to correct the data in the relational database.
[0070] The number of data corrections in relational databases and time-series databases can be statistically analyzed. The fewer the number of data corrections, the higher the reliability of the corresponding database.
[0071] The server cluster monitoring method provided in this application can quickly and accurately determine the data deviation between two databases based on matrix operations, and correct the data in the relational database or time series database based on data with high credibility, thereby improving the data correction efficiency of server cluster monitoring and improving the accuracy of resource usage data analysis in the server cluster.
[0072] In some embodiments, after correcting the data in the relational database or time-series database based on the difference between the first resource usage matrix and the second resource usage matrix, the method further includes: Generate reports based on data corrections from relational or time-series databases; Send the report to the monitoring platform of the server cluster.
[0073] Specifically, after data correction, the data correction status of relational databases or time-series databases can be collected and summarized, reports can be generated, and sent to the monitoring platform of the server cluster so that users (administrators) can verify the data correction status.
[0074] The server cluster monitoring method provided in this application generates reports based on the data correction status of relational databases or time-series databases. By dividing the work between relational databases and time-series databases and summarizing the statistics of different databases, the monitoring platform processes and displays the data to the user, helping the user to accurately obtain cluster information and improving the user experience of server clusters.
[0075] Figure 2 This is the second flowchart of the server cluster monitoring method provided in this application, as shown below. Figure 2 As shown, the method includes: Step 1: Categorize the monitored resources. These are generally divided into all cluster resources, resources used by the cluster's built-in services, resources requested by users, and resources currently in use by users. Monitor the server cluster and store the monitoring data in a relational database and a time-series database, respectively.
[0076] Step 2: Scan the relational database and the time-series database respectively to generate resource usage matrices for the relational database and the time-series database.
[0077] Step 3: If the time-series database data is controllable, then process the data based on the relational database and perform data update or insertion operations; If the time-series database is not empty, the difference between the resource usage matrix corresponding to the relational database and the resource usage matrix corresponding to the time-series database is determined according to the time statistical interval. If the difference is 0, no correction is made; otherwise, the data that needs correction is determined by the element values in the matrix. The data from the relational database (which has higher reliability) is used as the standard. Using the relational database as the standard ensures that the time-series data statistics are closer to the user experience.
[0078] Step 4: After data comparison is complete, generate a corresponding report and send it to the administrator. The administrator can verify the data difference correction status. The administrator can download and view the original and replacement data, approve the changes after verification, or manually execute a scheduled task if verification fails.
[0079] If other types of monitoring data anomalies exist, it is necessary to construct matrix parameters specifically, set the number of matrix columns and rows based on the parameters captured from the time series database, and fill the values with actual business data as the real data.
[0080] The server cluster monitoring method provided in this application converts resource usage data into a resource usage matrix. By subtracting the matrix, it can quickly locate and correct abnormal data. The matrix generated from business data can eliminate unnecessary information, more accurately identifying inconsistent business parameters. All information regarding the corrected data is packaged and sent to the administrator, who analyzes whether the corrected data is correct. If abnormalities are found, the administrator can re-correct the data based on the correction report. This method quickly locates the range of inconsistent data and corrects the data with minimal database operations, improving overall efficiency, especially when dealing with large amounts of data and issues occurring over irregular time periods.
[0081] The apparatus provided in the embodiments of this application is described below. The apparatus described below can be referred to in correspondence with the method described above.
[0082] Figure 3 This is a schematic diagram of the server cluster monitoring device provided in this application, as shown below. Figure 3 As shown, the device includes: The first acquisition module 310 is used to collect resource usage data of each computing task in the server cluster, generate first data, and store the first data in a relational database. The second acquisition module 320 is used to collect resource usage data at various monitoring times in the server cluster, generate second data, and store the second data in the time series database. The data scanning module 330 is used to scan the first data and the second data to generate a first resource usage matrix and a second resource usage matrix, respectively; the resource usage matrix is used to represent the resource usage data of each computing task in the server cluster at each monitoring time. The data correction module 340 is used to correct data in a relational database or a time-series database based on the difference between the first resource usage matrix and the second resource usage matrix.
[0083] The server cluster monitoring device provided in this application collects resource usage data of each computing task in the server cluster, generates first data, and stores the first data in a relational database; it collects resource usage data at each monitoring time in the server cluster, generates second data, and stores the second data in a time-series database; it scans the first data and the second data to generate a first resource usage matrix and a second resource usage matrix, respectively; and it corrects the data in the relational database or the time-series database based on the difference between the first resource usage matrix and the second resource usage matrix. Since the resource usage data of each computing task in the server cluster at each monitoring time is represented by a resource usage matrix, matrix operations can quickly and accurately determine the data deviation between the two databases and the location of the data with deviation, eliminating the need for manual investigation, thus improving the data correction efficiency of server cluster monitoring and the accuracy of resource usage data analysis in the server cluster.
[0084] In some embodiments, the data scanning module is used for: Determine the target time period and the types of resource usage to be monitored within that time period; Scan the first data corresponding to the target time period in the relational database to generate the first resource usage matrix corresponding to each resource usage type; Scan the second data corresponding to the target time period in the time series database to generate a second resource usage matrix corresponding to each resource usage type; In the first and second resource usage matrices, the rows are determined based on the computing tasks, the columns are determined based on the monitoring time, and the element values are determined based on the resource usage data of any computing task at any monitoring time.
[0085] In some embodiments, the data scanning module is further configured to: Determine the resource usage type corresponding to the element value; Based on a time-series database, obtain resource usage data for each computing task at each monitoring time based on resource usage type; Based on the resource usage data of each computing task at each monitoring time, the baseline value of resource usage for each computing task at each monitoring time is determined. If the resource usage data of any computing task at any monitoring time is greater than the resource usage baseline value for the resource usage type, the element value corresponding to any computing task at any monitoring time will be determined as the first preset value. If the resource usage data of any computing task at any monitoring time is less than the resource usage baseline value, the element value corresponding to any computing task at any monitoring time is determined as the second preset value.
[0086] In some embodiments, the data correction module is used for: Get the system load of the server cluster; When the system load is less than the preset load, the relational database or time series database is corrected based on the difference between the first resource usage matrix and the second resource usage matrix.
[0087] In some embodiments, the data correction module is used for: Perform a difference operation between the element value at any position in the first resource usage matrix and the element value at the corresponding position in the first resource usage matrix; If the difference is zero, it can be determined that there is no deviation between the first and second data. If the difference is not zero, it is determined that there is a deviation between the first data and the second data, the reliability of the first data and the second data is determined, and the data in the relational database or time series database is corrected based on the data with higher reliability.
[0088] In some embodiments, the data correction module is further configured to: Generate reports based on data corrections from relational or time-series databases; Send the report to the monitoring platform of the server cluster.
[0089] Figure 4 This is a schematic diagram of the server cluster structure provided in this application, such as... Figure 4 As shown, the server cluster 400 includes a server cluster monitoring device 410 and multiple server nodes 420. The server cluster monitoring device is connected to the server node and is used to execute the server cluster monitoring method in the above embodiments.
[0090] The server cluster provided in this application embodiment, because the server cluster monitoring device executes the server cluster monitoring method, and because the resource usage data of each computing task in the server cluster is represented by a resource usage matrix at each monitoring time, the matrix operation can quickly and accurately determine the data deviation between the two databases and the location of the data with deviation, without the need for manual investigation, thereby improving the data correction efficiency of server cluster monitoring and improving the accuracy of resource usage data analysis in the server cluster.
[0091] Figure 5 This is a schematic diagram of the structure of the electronic device provided in this application, such as... Figure 5 As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communications bus 540, wherein the processor 510, the communications interface 520, and the memory 530 communicate with each other via the communications bus 540. The processor 510 can call logical commands stored in the memory 530 to execute the methods described in the above embodiments, for example: Resource usage data for each computing task in the server cluster is collected to generate first data, which is then stored in a relational database. Resource usage data for each monitoring time in the server cluster is collected to generate second data, which is then stored in a time-series database. The first and second data are scanned to generate a first resource usage matrix and a second resource usage matrix, respectively. The resource usage matrix is used to represent the resource usage data of each computing task in the server cluster at each monitoring time. Based on the difference between the first and second resource usage matrices, data correction is performed on the relational database or the time-series database.
[0092] Furthermore, the logical commands in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several commands to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0093] The processor in the electronic device provided in this application embodiment can call logical instructions in the memory to implement the above method. Its specific implementation method is the same as the aforementioned method implementation method and can achieve the same beneficial effects, which will not be repeated here.
[0094] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the methods provided in the above embodiments.
[0095] The specific implementation method is the same as the aforementioned method implementation method and can achieve the same beneficial effects, so it will not be repeated here.
[0096] This application provides a computer program product, including a computer program that, when executed by a processor, implements the method described above.
[0097] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0098] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A server cluster monitoring method, characterized in that, include: Resource usage data of each computing task in the server cluster is collected to generate first data, and the first data is stored in a relational database; Resource usage data at each monitoring time in the server cluster is collected to generate second data, and the second data is stored in a time-series database. The first data and the second data are scanned to generate a first resource usage matrix and a second resource usage matrix, respectively; the resource usage matrix is used to represent the resource usage data of each computing task in the server cluster at each monitoring time. Based on the difference between the first resource usage matrix and the second resource usage matrix, data correction is performed on the relational database or the time-series database; The rows in the first resource usage matrix and the second resource usage matrix are determined based on the computing task, the columns are determined based on the monitoring time, and the element values are determined based on the resource usage data of any computing task at any monitoring time. The element values in the first resource usage matrix and the second resource usage matrix are determined based on the following steps: Determine the resource usage type corresponding to the element value; Based on the time-series database, resource usage data of each computing task for the resource usage type is obtained at each monitoring time. Based on the resource usage data of each computing task for the resource usage type at each monitoring time, determine the baseline value of resource usage for each computing task at each monitoring time. If, at any monitoring time, the resource usage data of any computing task for the resource usage type is greater than the resource usage baseline value, the element value corresponding to the computing task at any monitoring time is determined as the first preset value. If, at any monitoring time, the resource usage data of any computing task for the resource usage type is less than the resource usage baseline value, the element value corresponding to the computing task at that monitoring time is determined as the second preset value.
2. The server cluster monitoring method according to claim 1, characterized in that, The step of scanning the first data and the second data to generate a first resource usage matrix and a second resource usage matrix respectively includes: Determine the target time period and the types of resource usage to be monitored within the target time period; The first data corresponding to the target time period is scanned in the relational database to generate a first resource usage matrix corresponding to each resource usage type; The second data corresponding to the target time period is scanned in the time series database to generate a second resource usage matrix corresponding to each resource usage type.
3. The server cluster monitoring method according to claim 1, characterized in that, The step of correcting the data in the relational database or the time-series database based on the difference between the first resource usage matrix and the second resource usage matrix includes: Obtain the system load of the server cluster; When the system load is less than the preset load, the relational database or the time-series database is corrected based on the difference between the first resource usage matrix and the second resource usage matrix.
4. The server cluster monitoring method according to claim 1, characterized in that, The step of correcting the data in the relational database or the time-series database based on the difference between the first resource usage matrix and the second resource usage matrix includes: Perform a difference operation between the element value at any position in the first resource usage matrix and the element value at the corresponding position in the first resource usage matrix; If the difference is zero, it is determined that there is no deviation between the first data and the second data; If the difference is not zero, it is determined that there is a deviation between the first data and the second data, the credibility of the first data and the second data is determined, and the data correction is performed on the relational database or the time series database based on the data with higher credibility.
5. The server cluster monitoring method according to any one of claims 1 to 4, characterized in that, After correcting the relational database or the time-series database based on the difference between the first resource usage matrix and the second resource usage matrix, the method further includes: Based on the data correction status of the relational database or the time-series database, generate a report; The report is sent to the monitoring platform of the server cluster.
6. A server cluster monitoring device, characterized in that, include: The first acquisition module is used to collect resource usage data of each computing task in the server cluster, generate first data, and store the first data in a relational database. The second acquisition module is used to acquire resource usage data at each monitoring time in the server cluster, generate second data, and store the second data in a time-series database. The data scanning module is used to scan the first data and the second data to generate a first resource usage matrix and a second resource usage matrix, respectively; the resource usage matrix is used to represent the resource usage data of each computing task in the server cluster at each monitoring time. The data correction module is used to correct the data in the relational database or the time-series database based on the difference between the first resource usage matrix and the second resource usage matrix. The rows in the first resource usage matrix and the second resource usage matrix are determined based on the computing task, the columns are determined based on the monitoring time, and the element values are determined based on the resource usage data of any computing task at any monitoring time. The element values in the first resource usage matrix and the second resource usage matrix are determined based on the following steps: Determine the resource usage type corresponding to the element value; Based on the time-series database, resource usage data of each computing task for the resource usage type is obtained at each monitoring time. Based on the resource usage data of each computing task for the resource usage type at each monitoring time, determine the baseline value of resource usage for each computing task at each monitoring time. If, at any monitoring time, the resource usage data of any computing task for the resource usage type is greater than the resource usage baseline value, the element value corresponding to the computing task at any monitoring time is determined as the first preset value. If, at any monitoring time, the resource usage data of any computing task for the resource usage type is less than the resource usage baseline value, the element value corresponding to the computing task at that monitoring time is determined as the second preset value.
7. A server cluster, characterized in that, Includes server cluster monitoring devices and multiple server nodes; The server cluster monitoring device is connected to the server node and is used to execute the server cluster monitoring method according to any one of claims 1 to 5.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the server cluster monitoring method according to any one of claims 1 to 5.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the server cluster monitoring method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Load time sequence regulation potential prediction method based on error correction
CN117293791A
Power consumer power consumption low-rank matrix completion method in power spot transaction
CN118395053A