A method for analyzing server performance data and related devices
By periodically obtaining and accumulating the operation information of server activity jobs, the problem of incomplete server performance analysis in the prior art is solved, and accurate analysis and optimization of server performance is achieved.
Patent Information
- Application Number
- CN202111364653.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-17
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2041-11-17
AI Technical Summary
The server performance analysis in the prior art is not comprehensive enough to accurately analyze the problems during the server operation.
The operation information of the active job is obtained periodically, including CPU queue waiting, CPU computing and interrupt waiting time, accumulate this information to generate performance data, and compare multiple performance data to determine resource usage.
Ability to accurately analyze server performance, locate performance bottlenecks and formulate optimization strategies to ensure smooth system operation.
Smart Images

Figure CN114020595B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of server technology, and in particular to a server performance data analysis method, a server performance data analysis device, a server performance data analysis equipment and a computer-readable storage medium. Background Art
[0002] IBM AS400 is a minicomputer produced by IBM that runs the DB2 / 400 database. From its release in 1989 to 2021, hundreds of thousands of servers have been sold worldwide. Performance analysis is an important indicator for evaluating server applications. The performance indicators of commercial servers include CPU utilization, memory transfer ratio, IOPS (Input / Output Operations Per Second) and other resource usage data. However, the analysis of server performance in the prior art is not comprehensive, and it is usually impossible to accurately analyze the problems in the server operation process. Therefore, how to provide an accurate server performance analysis method is an urgent problem that technicians in this field need to solve. Summary of the invention
[0003] An object of the present invention is to provide a server performance data analysis method, which can accurately analyze server performance; another object of the present invention is to provide a server performance data analysis device, a server performance data analysis equipment and a computer-readable storage medium, which can accurately analyze server performance.
[0004] In order to solve the above technical problems, the present invention provides a server performance data analysis method, comprising:
[0005] Periodically acquiring the running information of the active job within the sampling time according to the preset sampling time; the running information includes the time corresponding to the running state of the active job, and the running state includes CPU queue waiting, CPU operation and interrupt waiting;
[0006] Accumulating the operation information according to the corresponding operation status to obtain performance data of the target system;
[0007] The plurality of performance data are compared to determine resource usage during operation of the target system.
[0008] Optionally, also include:
[0009] Obtaining scheduling information of system resources within the sampling time; wherein the scheduling information and the performance data correspond to each other according to the sampling time;
[0010] The comparing of the plurality of performance data to determine the resource usage during the operation of the target system includes:
[0011] Compare multiple pieces of the performance data and the scheduling information to determine the resource usage during the operation of the target system.
[0012] Optionally, it further includes:
[0013] Obtain the scheduling metric information of the system resources within the sampling time; the scheduling metric information includes the time used for applying for the target system resources when the active job is in interrupt waiting; the scheduling metric information and the performance data correspond to each other according to the sampling time;
[0014] The comparison of multiple pieces of the performance data to determine the resource usage during the operation of the target system includes:
[0015] Compare multiple pieces of the performance data and the scheduling metric information to determine the resource usage during the operation of the target system.
[0016] Optionally, the scheduling metric information includes any one or any combination of the following:
[0017] Object lock usage time, record lock usage time, underlying lock usage time.
[0018] Optionally, it further includes:
[0019] Obtain the communication information of the system within the sampling time; the communication information and the performance data correspond to each other according to the sampling time;
[0020] The comparison of multiple pieces of the performance data to determine the resource usage during the operation of the target system includes:
[0021] Compare multiple pieces of the performance data and the communication information to determine the resource usage during the operation of the target system.
[0022] Optionally, before periodically obtaining the operation information of the active job within the sampling time according to the preset sampling time, it further includes:
[0023] Filter out the active jobs to be used from all active jobs according to the preset keywords;
[0024] The periodic obtaining of the operation information of the active job within the sampling time according to the preset sampling time includes:
[0025] Periodically obtain the operation information of the active jobs to be used within the sampling time according to the preset sampling time.
[0026] Optionally, after accumulating the operation information according to the corresponding operation status to obtain the performance data of the target system, it further includes:
[0027] Generate performance metric data corresponding to the target job based on multiple pieces of the performance data;
[0028] The comparing multiple pieces of the performance data to determine the resource usage in the operation of the target system includes:
[0029] Compare multiple pieces of the performance metric data to determine the resource usage in the operation of the target system.
[0030] The present invention also provides a server performance data analysis device, including:
[0031] An acquisition module, configured to periodically obtain the operation information of active jobs within the sampling time according to a preset sampling time; the operation information includes the time corresponding to the operation state of the active jobs, and the operation state includes CPU queue waiting, CPU operation, and interrupt waiting;
[0032] A performance data module, configured to accumulate the operation information according to the corresponding operation state to obtain the performance data of the target system;
[0033] An analysis module, configured to compare multiple pieces of the performance data to determine the resource usage in the operation of the target system.
[0034] The present invention also provides a server performance data analysis device, the device includes:
[0035] A memory: configured to store a computer program;
[0036] A processor: configured to implement the steps of the server performance data analysis method as described in any one of the above when executing the computer program.
[0037] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the server performance data analysis method as described in any one of the above are implemented.
[0038] A server performance data analysis method provided by the present invention includes periodically obtaining the operation information of active jobs within the sampling time according to a preset sampling time; the operation information includes the time corresponding to the operation state of the active jobs, and the operation state includes CPU queue waiting, CPU operation, and interrupt waiting; accumulating the operation information according to the corresponding operation state to obtain the performance data of the target system; comparing multiple pieces of the performance data to determine the resource usage in the operation of the target system.
[0039] By accurately accumulating the time each process takes to execute an active job, it is possible to determine whether the system running the server is running smoothly. And when a server has a performance problem, the performance bottleneck can be located based on the performance data representing the time corresponding to the running status of the active job, so that the server performance can be accurately analyzed and further optimization strategies can be formulated.
[0040] The embodiments of the present invention further provide a server performance data analysis device, a server performance data analysis equipment and a computer-readable storage medium, which also have the above-mentioned beneficial effects and will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions of 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 invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 A flow chart of a server performance data analysis method provided by an embodiment of the present invention;
[0043] Figure 2 A flowchart of a specific server performance data analysis method provided by an embodiment of the present invention;
[0044] Figure 3 A structural block diagram of a server performance data analysis device provided by an embodiment of the present invention;
[0045] Figure 4 A structural block diagram of a server performance data analysis device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The core of the present invention is to provide a server performance data analysis method. In the prior art, the server performance indicators of commercial servers include CPU usage, memory in / out ratio, IOPS and other resource usage data. However, the analysis of server performance in the prior art is not comprehensive, and usually cannot accurately analyze the problems in the server operation process.
[0047] A server performance data analysis method provided by the present invention includes periodically obtaining operation information of active jobs within a sampling time according to a preset sampling time; the operation information includes the time corresponding to the operation state of the active jobs, and the operation states include CPU queue waiting, CPU operation, and interrupt waiting; accumulating the operation information according to the corresponding operation states to obtain performance data of the target system; and comparing multiple pieces of performance data to determine the resource usage situation during the operation of the target system.
[0048] By accurately accumulating the time generated during the execution of each process when performing active jobs in its respective operation process, it can be determined whether the system running the server is operating smoothly. And when the server has performance problems, the performance bottleneck can be located based on the performance data representing the time corresponding to the operation state of the active jobs, so that the server performance can be accurately analyzed, and further strategies for optimization can be formulated.
[0049] To enable those skilled in the art to better understand the solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0050] Please refer to Figure 1 , Figure 1 which is a flowchart of a server performance data analysis method provided by an embodiment of the present invention.
[0051] Refer to Figure 1 In an embodiment of the present invention, the server performance data analysis method includes:
[0052] S101: Periodically obtain operation information of active jobs within a sampling time according to a preset sampling time.
[0053] In an embodiment of the present invention, the operation information includes the time corresponding to the operation state of the active jobs, and the operation states include CPU queue waiting, CPU operation, and interrupt waiting.
[0054] In an embodiment of the present invention, it is necessary to periodically obtain the running information of active jobs within the current sampling time when the system is running the target server according to a preset sampling period. Therefore, in this step, multiple sets of running information will be specifically obtained periodically. The above-mentioned running information includes the time corresponding to the running state of the active job, and the running state includes CPU queue waiting, CPU operation, and interrupt waiting. Therefore, the above-mentioned running information usually includes CPU queue waiting time, CPU operation time, and interrupt waiting time; each of the above times is usually also the CPU queue waiting duration, CPU operation duration, and interrupt waiting duration.
[0055] It should be noted that the running information obtained in this step may specifically include the CPU queue waiting time, CPU operation time, and interrupt waiting time corresponding to each active job, etc., so as to classify the running information according to different conditions in the subsequent steps.
[0056] S102: Accumulate the running information according to the corresponding running state to obtain the performance data of the target system.
[0057] In this step, each of the times included in the above-mentioned running information will be accumulated according to the corresponding running state to obtain the performance data of the target system, so as to provide the performance data of the overall server system at different times in the time dimension. Specifically, in this step, it is necessary to accumulate the data of all active jobs according to the running state at each sampling moment to obtain the performance data corresponding to each sampling time.
[0058] S103: Compare multiple performance data to determine the resource usage of the target system during operation.
[0059] In this step, specifically, it is possible to correspond to multiple pieces of the above-mentioned performance data, that is, compare the performance data collected at different sampling times at different moments to determine the resource usage of the target system during operation.
[0060] A server performance data analysis method provided by an embodiment of the present invention includes periodically obtaining the running information of active jobs within the sampling time according to a preset sampling time; the running information includes the time corresponding to the running state of the active job, and the running state includes CPU queue waiting, CPU operation, and interrupt waiting; accumulating the running information according to the corresponding running state to obtain the performance data of the target system; comparing multiple performance data to determine the resource usage of the target system during operation.
[0061] By accurately accumulating the time generated during the respective running processes of each process when executing the active jobs, it can be determined whether the system of the running server is operating smoothly. And when the server has performance problems, the performance bottleneck can be located based on the performance data representing the time corresponding to the running state of the active jobs, so that the server performance can be accurately analyzed, and further strategies for optimization can be formulated.
[0062] The specific content of a method for analyzing server performance data provided by the present invention will be described in detail in the following embodiments of the invention.
[0063] Please refer to Figure 2 , Figure 2 which is a flowchart of a specific method for analyzing server performance data provided by the embodiments of the present invention.
[0064] See Figure 2 , in the embodiments of the present invention, the method for analyzing server performance data includes:
[0065] S201: Screen out the active jobs to be used from all active jobs according to the preset keywords.
[0066] In this step, first, the active jobs can be screened based on the keywords, that is, the active jobs to be used are screened out from all active jobs according to the preset keywords input by the user. Of course, in the embodiments of the present invention, the active jobs may not be screened, and the calculation can also be specifically performed on all active jobs, which is not specifically limited herein.
[0067] The above-mentioned keywords can specifically include job names, subsystems where the jobs run, memory pools where the jobs run, program names executed by the jobs, module names, etc. for grouped filtering, so as to reduce the size of data analysis in subsequent steps and improve the speed of data analysis.
[0068] S202: Periodically obtain the running information of the active jobs to be used within the sampling time according to the preset sampling time.
[0069] After screening out the active jobs to be used from all active jobs through the keywords, this step can collect only the running information of the active jobs to be used within the sampling time. The rest of this step is basically the same as S101 in the above-mentioned embodiments of the invention. For detailed content, please refer to the above-mentioned embodiments of the invention, and will not be elaborated herein. Usually, in the embodiments of the present invention, the above-mentioned running information may also include the CPU cumulative usage time, the time used for IO operations. IO operations usually include synchronous read, synchronous write, asynchronous read, and asynchronous write; the time used for memory scheduling. Memory scheduling usually includes synchronous read and asynchronous read; the current stack call of the job, etc.
[0070] S203: Obtain the scheduling information of system resources within the sampling time.
[0071] In the embodiments of the present invention, the scheduling information and the performance data correspond to each other according to the sampling time. That is, in the embodiments of the present invention, specifically, the above-mentioned operation information and scheduling information are obtained simultaneously within one sampling time. Specifically, in the embodiments of the present invention, the scheduling information may include any one or any combination of the following: average CPU usage rate, paging space usage value, number of active jobs, number of idle-state jobs, memory page swapping, early page-in statistics, etc. The above-mentioned scheduling information is the information generated when each hardware is scheduled as obtained from the system hardware level in the prior art. Obviously, the scheduling information obtained in this step will naturally correspond to the above-obtained performance data according to the sampling time, thus generating an association. Of course, the above-mentioned scheduling information may also include other contents, which are not specifically limited herein.
[0072] S204: Obtain the scheduling metric information of system resources within the sampling time.
[0073] In the embodiments of the present invention, the scheduling metric information includes the time used for the active job to apply for the target system resources when it is in interrupt waiting; the scheduling metric information and the performance data correspond to each other according to the sampling time. In the embodiments of the present invention, when a certain active job is in interrupt waiting, according to its application for resources in the system, this interrupt waiting can generally be divided into: object lock, waiting to acquire the object lock; record lock, waiting for the database record lock; storage read, waiting for the data read to return; storage write: waiting for the data write to return; log waiting, waiting for the log write to return; underlying lock, waiting for the data access registration return of the microcode layer (TIMI, technical independent machine interface); serialization waiting: waiting for the linear resource access control return of the microcode layer; communication waiting, waiting for the socket communication control return.
[0074] Since the scheduling metric information includes the time used to apply for the target system resources when the active job is in interrupted waiting, the above scheduling metric information usually includes any one or any combination of the following: object lock usage time, record lock usage time, underlying lock usage time. Specifically, the scheduling metric information obtained in this step usually includes: the total serialized waiting usage within the current sampling time; the object applied for by each serialization control and the job information of the application; the total lock usage, the object applied for by each lock, and the job information of the application; the total serialization control usage, the object applied for by each serialization control, and the job information of the application. The above locks include object locks, record locks, underlying locks, etc. In this step, the above scheduling metric information can be specifically obtained. Obviously, the scheduling metric information obtained in this step will naturally correspond to the above-obtained performance data according to the sampling time, thus generating an association. Of course, the above scheduling metric information can also include other contents, which are not specifically limited here. The above scheduling metric information can be specifically obtained by reading the memory stack.
[0075] S205: Obtain the communication information of the system within the sampling time.
[0076] In the embodiment of the present invention, the communication information corresponds to the performance data according to the sampling time. In the embodiment of the present invention, the above communication information is usually the information of socket communication, usually the information of IPV4 socket communication. And in this step, the information collection of IPV4 socket communication will be specifically executed. The above communication information can specifically include the active IP interfaces, all socket ports in the listening state and the jobs where the listening programs are located, all connection sessions and the statistical information of the sessions, such as the number of input bytes, the number of output bytes, the idle time, the retransmission packet statistics, etc. Obviously, the communication information obtained in this step will naturally correspond to the above-obtained performance data according to the sampling time, thus generating an association. Of course, the above communication information can also include other contents, which are not specifically limited here.
[0077] It should also be noted that the above S202 to S205 are usually executed in parallel. Of course, they can also be executed serially. The specific method depends on the specific situation and is not specifically limited here.
[0078] S206: Accumulate the running information according to the corresponding running status to obtain the performance data of the target system.
[0079] This step is basically the same as S102 in the above embodiment of the invention. For the detailed content, please refer to the above embodiment of the invention and will not be elaborated here.
[0080] S207: Generate the performance metric data corresponding to the target job according to multiple performance data.
[0081] In this step, performance metric data corresponding to a target job can be further generated based on multiple pieces of performance data arranged in the order of sampling time. That is, data corresponding to a certain target job can be extracted from multiple pieces of performance data as performance metric data, so as to analyze the target system based on this performance metric data in subsequent steps.
[0082] S208: Compare multiple pieces of performance data to determine the resource usage during the operation of the target system.
[0083] In this step, specifically, the resource usage during the operation of the target system can be determined by combining the above-mentioned performance data and other parameters. Specifically, this step can be specifically: compare multiple pieces of the performance data and the scheduling information to determine the resource usage during the operation of the target system. That is, in this step, the performance data and the scheduling information between different sampling times can be specifically compared, and the scheduling information can be combined with the above-mentioned performance data to determine the resource usage during the operation of the target system.
[0084] Specifically, this step can be specifically: compare multiple pieces of the performance data and the scheduling metric information to determine the resource usage during the operation of the target system. That is, in this step, the resource usage during the operation of the target system can be further determined by combining the above-mentioned scheduling metric information. For example, in the case of a large number of record locks, obvious situations are shown in multiple active jobs. By statistically analyzing the time of record locks, it is easy to sort the names of the active jobs with the most serious problems, and then prioritize checking the stack calls of the top few most serious active jobs, and the following data can be located: which programs and modules the active job is running when there is a record lock waiting; which record of which table the active job is waiting for when there is a record lock waiting; which jobs are waiting for this record lock at the same time point; how many scenarios of record locks are caused by this record within a certain period of time; by checking the stack calls of the final resource-holding job through the usage of record locks, what program the active job is calling. Through the above data, the resource usage during the operation of the target system can be accurately analyzed.
[0085] For the object locks, record locks, underlying locks, and serialization control of the AS400, they are maintained in memory. Exporting the above scheduling metric information enables statistical analysis of the interdependencies among active jobs. In the case of common locks, there must be a relationship between the holder and the applicant, usually a one-to-many relationship. The key to locks lies in whether the resource occupancy of the holder job is reasonable and whether the lock can be released promptly to avoid deadlocks, which is a situation that must be considered and avoided in program design. Combining the interdependencies among the active jobs analyzed above can assist in analyzing the above problems. For example, in the case of lock waits, underlying lock waits, and serialization waits for a job, the relationships among the active jobs can be determined through the above information. For instance, the job that occupies the lock of a certain database record and the queue information of the jobs waiting for the lock of that record can be determined. If a certain special situation, such as a lock wait, occurs at multiple sampled time points during data collection, it can be determined that the handling of the lock has an abnormal delay. Observing the stack calls of the lock owner can effectively verify the reason for the lock abnormality.
[0086] Specifically, this step can be as follows: By comparing multiple pieces of the performance data and the communication information, determine the resource usage situation during the operation of the target system. That is, in this step, the communication information can be further combined to determine the resource usage situation during the operation of the target system. Specifically, the data transmitted in each session can be determined, such as the correspondence between the number of input bytes, the number of output bytes, idle time, retransmission message statistics, etc. and the running status of the active jobs, and then specific problems can be analyzed.
[0087] Specifically, this step can be as follows: By comparing multiple pieces of the performance metric data, determine the resource usage situation during the operation of the target system. That is, if performance metric data corresponding to jobs is generated with time as the horizontal axis, in this step, various time statistical data of the jobs can be specifically displayed in a two-dimensional graph according to time, visually showing the time scheduling of the jobs at each sampled time point during operation. By synthesizing the stack calls at each sampled time point, it can be clearly determined whether the module scheduling and time allocation of the jobs are reasonable.
[0088] Specifically, if the sampling time is 10 seconds, there are 100 active jobs in the current system, the cumulative time occupied by CPU operations is 100 seconds, the cumulative interruption waiting time is 500 seconds, and other values are very low; and interruption waiting usually indicates that the system is performing IO scheduling. In this way, I know that the IO pressure on the system is relatively high during these 10 seconds, but the job operations are still relatively normal and no other problems occur. In the next 10 seconds, the cumulative time occupied by CPU operations is 50 seconds, the record lock waiting statistic reaches 800 seconds, and other metrics are very low. I know that during these 10 seconds, there is an obvious record lock waiting problem in the system, and the program operation is no longer smooth. In the embodiment of the present invention, by calculating the time consumed by the system at each stage, the differences in the system operation in different time periods can be understood.
[0089] The remaining content of this step has been introduced in detail in the above-mentioned embodiment of the invention, and will not be elaborated here.
[0090] A server performance data analysis method provided by an embodiment of the present invention can determine whether the system running the server is operating smoothly by accurately accumulating the time generated during the execution of active jobs by each process. And when a performance problem occurs in the server, the performance bottleneck can be located based on the performance data representing the time corresponding to the running state of the active job, so that the server performance can be accurately analyzed, and further optimization strategies can be formulated.
[0091] Next, a server performance data analysis device provided by an embodiment of the present invention will be introduced. The server performance data analysis device described below can be correspondingly referred to the server performance data analysis method described above.
[0092] Please refer to Figure 3 , Figure 3 which is a structural block diagram of a server performance data analysis device provided by an embodiment of the present invention. Referring to Figure 3 ,the server performance data analysis device may include:
[0093] An acquisition module 100, configured to periodically obtain the running information of active jobs within the sampling time according to a preset sampling time; the running information includes the time corresponding to the running state of the active job, and the running state includes CPU queue waiting, CPU operation, and interruption waiting.
[0094] A performance data module 200, configured to accumulate the running information according to the corresponding running state to obtain the performance data of the target system.
[0095] An analysis module 300, configured to compare multiple pieces of the performance data to determine the resource usage situation during the operation of the target system.
[0096] Preferably, in the embodiment of the present invention, it further includes:
[0097] A scheduling information module, configured to obtain scheduling information of system resources within the sampling time; the scheduling information corresponds to the performance data according to the sampling time.
[0098] The analysis module 300 is specifically configured to:
[0099] Compare multiple pieces of the performance data and the scheduling information to determine the resource usage situation during the operation of the target system.
[0100] Preferably, in the embodiment of the present invention, it further includes:
[0101] A scheduling index information module, configured to obtain scheduling index information of system resources within the sampling time; the scheduling index information includes the time used for applying for the target system resources when the active job is in interrupted waiting; the scheduling index information corresponds to the performance data according to the sampling time.
[0102] The analysis module 300 is specifically configured to:
[0103] Compare multiple pieces of the performance data and the scheduling index information to determine the resource usage situation during the operation of the target system.
[0104] Preferably, in the embodiment of the present invention, the scheduling index information includes any one or any combination of the following:
[0105] Object lock usage time, record lock usage time, underlying lock usage time.
[0106] Preferably, in the embodiment of the present invention, it further includes:
[0107] A communication information module, configured to obtain communication information of the system within the sampling time; the communication information corresponds to the performance data according to the sampling time.
[0108] The analysis module 300 is specifically configured to:
[0109] Compare multiple pieces of the performance data and the communication information to determine the resource usage situation during the operation of the target system.
[0110] Preferably, in the embodiment of the present invention, it further includes:
[0111] A screening module, configured to screen out active jobs to be used from all active jobs according to a preset keyword.
[0112] The acquisition module 100 is specifically configured to:
[0113] Periodically obtain the running information of the active jobs to be used within the sampling time according to the preset sampling time.
[0114] Preferably, in the embodiment of the present invention, it further includes:
[0115] A performance index data module, configured to generate performance index data corresponding to the target job according to the multiple pieces of performance data.
[0116] The analysis module 300 is specifically configured to:
[0117] Compare the multiple pieces of performance index data to determine the resource usage situation during the operation of the target system.
[0118] The server performance data analysis device in this embodiment is used to implement the foregoing server performance data analysis method. Therefore, the specific implementation manners in the server performance data analysis device can be seen in the embodiment part of the server performance data analysis method in the foregoing text. For example, the acquisition module 100, the performance data module 200, and the analysis module 300 are respectively used to implement steps S101 to S103 in the foregoing server performance data analysis method. Therefore, its specific implementation manners can refer to the descriptions of the corresponding various part embodiments and will not be elaborated herein.
[0119] Next, a server performance data analysis device provided by an embodiment of the present invention will be introduced. The server performance data analysis device described below can be correspondingly referred to the server performance data analysis method and the server performance data analysis device described above.
[0120] Please refer to Figure 4 , Figure 4 which is a structural block diagram of a server performance data analysis device provided by an embodiment of the present invention.
[0121] Referring to Figure 4 , the server performance data analysis device may include a processor 11 and a memory 12.
[0122] The memory 12 is used to store a computer program; the processor 11 is used to implement the specific content of the server performance data analysis method described in the foregoing embodiment of the present invention when executing the computer program.
[0123] In the server performance data analysis device of this embodiment, the processor 11 is used to install the server performance data analysis device described in the above-mentioned invention embodiment. At the same time, the combination of the processor 11 and the memory 12 can implement the server performance data analysis method described in any of the above-mentioned invention embodiments. Therefore, the specific implementation manners in the server performance data analysis device can be seen in the embodiment part of the server performance data analysis method in the previous text. The specific implementation manners can refer to the descriptions of the corresponding various part embodiments and will not be elaborated here.
[0124] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements a server performance data analysis method introduced in any of the above-mentioned invention embodiments. The remaining content can refer to the prior art and will not be further described here.
[0125] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple. For the relevant parts, reference can be made to the descriptions in the method part.
[0126] Those skilled in the art can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0127] The steps of the methods or algorithms described in combination with the embodiments disclosed in this article can be directly implemented by hardware, software modules executed by a processor, or a combination of the two. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.
[0128] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising said element.
[0129] The above has introduced in detail a server performance data analysis method, a server performance data analysis device, a server performance data analysis equipment and a computer-readable storage medium provided by the present invention. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims
1. A method for analyzing server performance data, characterized in that, Including: Periodically obtaining, according to a preset sampling time, the operation information of active jobs within the sampling time; the operation information includes the time corresponding to the operation state of the active jobs, and the operation states include CPU queue waiting, CPU operation, and interrupt waiting; Accumulating the operation information according to the corresponding operation states to obtain the performance data of the target system; Comparing multiple pieces of the performance data to determine the resource usage situation during the operation of the target system; Also including: Obtaining the scheduling information of system resources within the sampling time; the scheduling information corresponds to the performance data according to the sampling time; the scheduling information includes any one or any combination of the following: average CPU usage rate, paging space usage value, number of active jobs, number of idle state jobs, memory page swapping, early page-in statistics; The step of comparing multiple pieces of the performance data to determine the resource usage situation during the operation of the target system includes: Comparing multiple pieces of the performance data and the scheduling information to determine the resource usage situation during the operation of the target system; Also including: Obtaining the scheduling metric information of system resources within the sampling time; the scheduling metric information includes the time used to apply for the target system resources when the active jobs are in interrupt waiting; the scheduling metric information corresponds to the performance data according to the sampling time; the scheduling metric information includes any one or any combination of the following: object lock usage time, record lock usage time, underlying lock usage time; The step of comparing multiple pieces of the performance data to determine the resource usage situation during the operation of the target system includes: Comparing multiple pieces of the performance data and the scheduling metric information to determine the resource usage situation during the operation of the target system.
2. The method according to claim 1, characterized in that, Also including: Obtaining the communication information of the system within the sampling time; The communication information corresponds to the performance data according to the sampling time; The step of comparing multiple pieces of the performance data to determine the resource usage situation during the operation of the target system includes: Comparing multiple pieces of the performance data and the communication information to determine the resource usage situation during the operation of the target system.
3. The method according to claim 1, characterized in that, Before periodically obtaining, according to a preset sampling time, the operation information of active jobs within the sampling time, it also includes: Screening out the active jobs to be used from all active jobs according to a preset keyword; The step of periodically obtaining, according to a preset sampling time, the operation information of active jobs within the sampling time includes: Periodically obtaining, according to a preset sampling time, the operation information of the active jobs to be used within the sampling time.
4. The method according to claim 1, characterized in that, After accumulating the operation information according to the corresponding operation states to obtain the performance data of the target system, it also includes: Generating performance metric data corresponding to the target jobs according to multiple pieces of the performance data; The step of comparing multiple pieces of the performance data to determine the resource usage situation during the operation of the target system includes: Comparing multiple pieces of the performance metric data to determine the resource usage situation during the operation of the target system.
5. A server performance data analysis device, characterized in that, Including: A collection module, configured to periodically obtain the operation information of active jobs within the preset sampling time; the operation information includes the time corresponding to the operation state of the active jobs, and the operation states include CPU queue waiting, CPU operation, and interrupt waiting; A performance data module, configured to accumulate the operation information according to the corresponding operation state to obtain the performance data of the target system; An analysis module, configured to compare multiple pieces of the performance data to determine the resource usage situation during the operation of the target system; It further includes: A scheduling information module, configured to obtain the scheduling information of system resources within the sampling time; the scheduling information corresponds to the performance data according to the sampling time; the scheduling information includes any one or any combination of the following: average CPU usage rate, paging space usage value, number of active jobs, number of idle state jobs, memory page swapping, early page-in statistics; The analysis module is specifically configured to: Compare multiple pieces of the performance data and the scheduling information to determine the resource usage situation during the operation of the target system; It further includes: A scheduling metric information module, configured to obtain the scheduling metric information of system resources within the sampling time; the scheduling metric information includes the time used to apply for the target system resources when the active jobs are in interrupt waiting; the scheduling metric information corresponds to the performance data according to the sampling time; the scheduling metric information includes any one or any combination of the following: object lock usage time, record lock usage time, underlying lock usage time; The analysis module is specifically configured to: Compare multiple pieces of the performance data and the scheduling metric information to determine the resource usage situation during the operation of the target system.
6. A server performance data analysis device, characterized in that, The device includes: A memory: used to store computer programs; A processor: used to implement the steps of the server performance data analysis method according to any one of claims 1 to 4 when executing the computer programs.
7. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the steps of the server performance data analysis method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Lock competition analysis method and device
CN107515789A
Resource management method and device of server and server
CN111831390A