Data operation performance statistics method, device, equipment and readable storage medium
By using a method of alternating storage of operation parameters in the first and second storage areas in the data operation device, the problem of cumbersome data operation performance statistics in the prior art is solved, and efficient performance statistics are achieved.
Patent Information
- Application Number
- CN202411214941.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2044-08-30
AI Technical Summary
In existing technologies, the data operation performance statistics process is cumbersome, resulting in low efficiency.
The operation parameters corresponding to the data operation are stored alternately in the first storage area and the second storage area. When writing operation parameters to a certain storage area, the stored operation parameters are obtained from the other storage area to determine the performance of the data operation device.
It improves the statistical efficiency of data operation performance and enables efficient performance statistics during the continuous execution of data operations.
Smart Images

Figure CN119226108B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of storage, and in particular to a data operation performance statistical method and device, electronic equipment and computer readable storage medium. BACKGROUND
[0002] Statistical data operation performance of a storage system is a key means for evaluating and optimizing system efficiency. Through performance statistics, the performance of the storage system under different workloads can be comprehensively understood, so that decisions and optimization adjustments can be made.
[0003] Currently, the statistical initiator first issues a statistical task to a data operation device in the storage system, the data operation device performs statistics by itself and then notifies the initiator that the statistics have been completed, and then the statistical initiator collects the performance statistical data of the data operation device.
[0004] However, the current scheme requires a process of issuing a task, self-statistics, notifying completion, and data collection to obtain performance statistical data, which is relatively cumbersome and results in low performance statistical efficiency. SUMMARY
[0005] Embodiments of the present application provide a data operation performance statistical method, device, electronic equipment and readable storage medium to solve the problem of low performance statistical efficiency caused by the cumbersome statistical process in the prior art.
[0006] In a first aspect, embodiments of the present application provide a data operation performance statistical method, comprising:
[0007] determining a first storage area and a second storage area; the first storage area and the second storage area are used to store operation parameters corresponding to data operations in a case where a data operation device performs data operations, the operation parameters being used to describe the execution of the data operations;
[0008] In a case where writing operation parameters to the first storage area is started, the operation parameters stored in the second storage area are obtained;
[0009] In a case where writing operation parameters to the second storage area is started, the operation parameters stored in the first storage area are obtained;
[0010] Based on the stored operation parameters, the data operation performance of the data operation device is determined.
[0011] In a second aspect, embodiments of the present application provide a data operation performance statistical device, comprising:
[0012] The storage area module is configured to determine a first storage area and a second storage area, and the first storage area and the second storage area are configured to alternately store operation parameters corresponding to data operations in a case where a data operation device performs the data operations, and the operation parameters are configured to describe execution of the data operations.
[0013] The first parameter module is configured to acquire the operation parameters stored in the second storage area in a case where the operation parameters are started to be written into the first storage area.
[0014] The second parameter module is configured to acquire the operation parameters stored in the first storage area in a case where the operation parameters are started to be written into the second storage area.
[0015] The performance statistics module is configured to determine data operation performance of the data operation device based on the stored operation parameters.
[0016] In a third aspect, an electronic device is provided, and the electronic device comprises a processor, a communication interface, a memory and a communication bus.
[0017] The memory is configured to store a computer program.
[0018] The processor is configured to execute the program stored in the memory, and implement the steps of the data operation performance statistics method in the first aspect.
[0019] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the program is executed by a processor to implement the steps of the data operation performance statistics method in the first aspect.
[0020] Compared with the prior art, the present application has the following advantages:
[0021] In the embodiments of the present application, the first storage area and the second storage area are determined, and the first storage area and the second storage area are configured to alternately store operation parameters corresponding to data operations in a case where a data operation device performs the data operations, and the operation parameters are configured to describe execution of the data operations, and the operation parameters stored in the second storage area are acquired in a case where the operation parameters are started to be written into the first storage area, or the operation parameters stored in the first storage area are acquired in a case where the operation parameters are started to be written into the second storage area, and data operation performance of the data operation device is determined based on the stored operation parameters. In the process of continuously performing the data operations of the data operation device, the operation parameters can be continuously written into one storage area, and the operation parameters can be continuously acquired in another storage area to determine the data operation performance, and the alternately writing and acquiring process can improve the statistical efficiency of the data operation performance.
[0022] The above description is only a summary of the technical solutions of the present application. In order to make the technical solutions of the present application more clearly understood and implemented, and to make the above and other purposes, features and advantages of the present application more apparent and easy to understand, the specific embodiments of the present application are described below. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiment description will be briefly introduced.
[0024] Figure 1 A step diagram of a data operation performance statistical method provided by the embodiment of the present application;
[0025] Figure 2 A step diagram of another data operation performance statistical method provided by the embodiment of the present application;
[0026] Figure 3 A relationship diagram of a storage area, a thread and an object provided by the embodiment of the present application;
[0027] Figure 4 A diagram of storage area division provided by the embodiment of the present application;
[0028] Figure 5 A diagram of a data operation performance statistical device provided by the embodiment of the present application;
[0029] Figure 6 A block diagram of an electronic device provided by the embodiment of the present application. DETAILED DESCRIPTION
[0030] Exemplary embodiments of the present application will be described below in greater detail with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present application can be more thoroughly understood and the scope of the present application can be accurately conveyed to those skilled in the art.
[0031] Figure 1 The data operation performance statistical method provided by the embodiment of the present application includes:
[0032] Step 101, determining a first storage area and a second storage area; the first storage area and the second storage area are used to store operation parameters corresponding to data operations in turn in the case that a data operation device performs data operations, and the operation parameters are used to describe the execution of the data operations.
[0033] In the embodiments of the present disclosure, the execution subject of the data operation performance statistics method can be a performance statistics module for performing performance statistics. The data operation device is a part of a storage system, and can be a volume, a volume group, a host, a host group, a disk, an array virtual storage management device (mdisk), a fibre channel card (FC) for connecting a storage device and a server, a remote direct memory access (RDMA) card, a serial attached storage (SAS) card for connecting a server motherboard and a hard disk drive, a non-volatile memory express (NVMe) card, and the like. The data operation can refer to input / output (I / O).
[0034] The performance statistics module can apply two cache resources, i.e., a first storage area and a second storage area, for storing performance data, i.e., operation parameters. The first storage area and the second storage area are used for alternately storing operation parameters, for example, an alternating process of the first storage area, the second storage area, the first storage area, and the like. The operation parameters can describe the execution of the data operation, for example, the amount of data transmitted in this data operation, the delay time of this data operation, and the like. The operation parameters can be written by the performance statistics module, or the writing step of the operation parameters can be performed by other business modules.
[0035] In step 102, in the case of starting to write operation parameters to the first storage area, the operation parameters stored in the second storage area are obtained.
[0036] In the embodiments of the present disclosure, as described in step 101, the first storage area and the second storage area are used for alternately storing operation parameters, and therefore only one storage area is used for writing operation parameters at any time. In the case of starting to write operation parameters to the first storage area, i.e., the current writing is the first storage area, since it is alternately stored, the second storage area can have written operation parameters, and therefore the operation parameters stored in the second storage area can be obtained.
[0037] It can be understood that if the writing of the entire operation parameters starts from the first storage area, when the first storage area is written at the beginning, the second storage area can also have no written operation parameters. Continuing the cycle, the second storage area is started to be written, and at this time, the operation parameters in the first storage area can be obtained; continuing the cycle, the first storage area is written again, and at this time, the second storage area has written operation parameters.
[0038] Step 103, in the case of starting to write operation parameters to the second storage area, obtaining the stored operation parameters in the first storage area.
[0039] In the embodiment of the present disclosure, the specific content of step 103 is similar to step 102. In the case of starting to write operation parameters to the second storage area, the stored operation parameters in the first storage area can also be obtained, unless this time of writing operation parameters to the second storage area is the first time of writing the entire operation parameters, otherwise the stored operation parameters in the first storage area can be obtained.
[0040] Step 104, determining the data operation performance of the data operation device based on the stored operation parameters.
[0041] In the embodiment of the present disclosure, the operation parameters are used to describe the execution of the data operation, such as the data amount, delay time and other parameters of the operation. The larger the data amount is, the stronger the data operation performance of the current data operation device is, and the smaller the data amount is, the weaker the data operation performance of the current data operation device is. The larger the delay time is, the weaker the data operation performance of the current data operation device is, and the smaller the delay time is, the stronger the data operation performance of the current data operation device is.
[0042] Mathematical operations can be performed based on the operation parameters to determine the specific data operation performance of the data operation device. The type of operation parameters and how to determine the data operation performance of the data operation device based on the operation parameters are not specifically limited here.
[0043] In the embodiment of the present disclosure, by determining the first storage area and the second storage area, the first storage area and the second storage area are used to store the operation parameters corresponding to the data operation in turn in the case of executing the data operation by the data operation device. In the case of starting to write operation parameters to the first storage area, the stored operation parameters in the second storage area are obtained; or in the case of starting to write operation parameters to the second storage area, the stored operation parameters in the first storage area are obtained; based on the stored operation parameters, the data operation performance of the data operation device is determined. It can make the data operation of the data operation device in the process of continuous execution, can continuously write operation parameters to one storage area, and continuously obtain operation parameters in another storage area to determine the data operation performance. The alternating process of writing and obtaining can improve the statistical efficiency of the data operation performance.
[0044] Figure 2 is another step flow chart of a data transmission method provided by the embodiment of the present disclosure;
[0045] Step 201, determining a first storage area and a second storage area; the first storage area and the second storage area are used to alternately store operation parameters corresponding to data operations in a case where a data operation device performs the data operations, and the operation parameters are used to describe execution of the data operations;
[0046] Step 202, in a case where writing of the operation parameters to the first storage area is started, obtaining operation parameters stored in the second storage area;
[0047] Step 203, in a case where writing of the operation parameters to the second storage area is started, obtaining operation parameters stored in the first storage area;
[0048] Based on the stored operation parameters, determining data operation performance of the data operation device.
[0049] Specific contents of the steps 201-203 can be referred to Figure 1 Embodiments are not described herein again.
[0050] Optionally, the step 201 of determining the first storage area and the second storage area comprises:
[0051] Sub-step 2011, determining the first storage area and the second storage area with consistent space sizes;
[0052] Sub-step 2012, according to a number of threads used to perform the data operations, respectively determining a plurality of sub-areas corresponding to the number of threads in the first storage area and the second storage area;
[0053] Sub-step 2013, wherein a mapping relationship exists between the sub-areas and the threads, and different sub-areas are used to store operation parameters of the data operations performed on different threads.
[0054] In the embodiments of the present disclosure, since the first storage area and the second storage area actually have the same function of storing the operation parameters, only the alternation occurs in the process of alternately storing. Therefore, the space sizes of the first storage area and the second storage area can be consistent.
[0055] A plurality of sub-regions corresponding to the number of threads can be determined in the first storage region and the second storage region according to the number of threads used to perform the data operation. The data operation device can perform the data operation through threads, and the number of threads can be multiple. A plurality of data operations of the data operation device can be distributed and performed through different threads. Therefore, a mapping relationship can exist between the sub-regions and the threads, and different sub-regions can be used to store operation parameters of data operations performed on different threads. That is, if a plurality of data operations are performed through the same thread, the operation parameters of the plurality of data operations can be stored in the same sub-region.
[0056] Figure 3 FIG. 1 is a schematic diagram of a relationship among a storage region, a thread, and an object according to an embodiment of the present disclosure; Figure 3 The first storage region 311 and the second storage region 312, a plurality of threads 320, and a plurality of data operation devices 330 are included in the system. Each of the storage regions has a plurality of sub-regions corresponding to the threads, and each of the sub-regions corresponding to the threads can be used to store operation parameters of data operations performed by the data operation devices.
[0057] According to the embodiment of the present disclosure, the first storage region and the second storage region with the same space size are determined, and a plurality of sub-regions corresponding to the number of threads used to perform the data operation are determined in the first storage region and the second storage region according to the number of threads. Each thread is allocated an independent storage space, which can avoid the problem that more than one data operation device is in a multi-thread working mode and a plurality of threads correspond to the same storage space, solve the concurrency statistics problem of the multi-thread program, realize lock-free of the data operation, and improve the clarity and accuracy of the data operation performance statistics process.
[0058] Optionally, the method further includes:
[0059] Step A1, when the data operation device performs a data operation, determining a target thread used to perform the data operation and a target storage region currently used to write operation parameters; the target storage region is any one of the first storage region and the second storage region;
[0060] Step A2, determining a target sub-region corresponding to the target thread in the target storage region according to the mapping relationship;
[0061] Step A3, obtaining operation parameters of the data operation and writing the operation parameters into the target sub-region.
[0062] In the embodiments of the present disclosure, when the data operation device performs data operation, the target thread for performing the data operation needs to be determined. The data operation can be determined to be initiated in which thread by checking the code logic and relevant code. The thread call stack can also be analyzed, and the thread call stack can be viewed by using a debugging tool to find the thread in which the function or method for performing the data operation is located. The manner of determining the target thread corresponding to the data operation is not specifically limited here.
[0063] It is also necessary to determine which target storage area is currently written. The target storage area here can be any one of the first storage area and the second storage area, that is, no matter which target storage area is, it is suitable for the current processing step.
[0064] Then, according to the correspondence between the sub-area and the thread, the target sub-area corresponding to the target thread is determined. The operation parameter of the data operation can be written into the target sub-area to perform differentiated storage of the operation parameter.
[0065] In the embodiments of the present disclosure, when the data operation device performs data operation, the target thread for performing the data operation is determined, and the current target storage area is determined. According to the mapping relationship, the target sub-area corresponding to the target thread is determined. The operation parameter of the data operation is obtained, and the operation parameter is written into the target sub-area. The operation parameter of the data operation performed based on different threads can be stored in a targeted manner, the clarity of the operation parameter storage is improved, the subsequent operation parameter statistics are facilitated, and the convenience of performance statistics is improved.
[0066] Optionally, the data operation device has a plurality of data operation devices, and each data operation device has a corresponding parameter variable in each sub-area. The method further includes:
[0067] When the data operation device performs data operation, the target thread for performing the data operation is determined, and the target storage area for writing the operation parameter is determined. The target storage area is any one of the first storage area and the second storage area.
[0068] According to the mapping relationship, the target sub-area corresponding to the target thread in the target storage area is determined.
[0069] The target parameter variable corresponding to the data operation device in the target sub-area is determined.
[0070] The operation parameter of the data operation is obtained, and the operation parameter is written into the target parameter variable.
[0071] In the embodiments of the present disclosure, there are multiple data operation devices in the storage system, and performance statistics can be performed for each data operation device. One sub-area can be used to store operation parameters of multiple data operation devices, and the implementation can be that each data operation device has corresponding parameter variables in each sub-area.
[0072] The process of determining the target thread of data operation, the current target storage area, and the target sub-area is not repeated here. When writing operation parameters, the corresponding target parameter variable of the current data operation device in the target sub-area can be determined first, and then the operation parameters of the current data operation device are written into the target parameter variable.
[0073] Figure 4 is a schematic diagram of storage area division provided by the embodiments of the present disclosure; Figure 4 It can be a first storage area or a second storage area, and the storage area includes multiple threads corresponding first sub-area 401, second sub-area 402, third sub-area 403, and more, and each sub-area includes multiple data operation device corresponding parameter variable area, the parameter variable corresponding to the first data operation device in multiple sub-areas can be in the block 404, and the parameter variable corresponding to the second data operation device in multiple sub-areas can be in the block 405.
[0074] In the embodiments of the present disclosure, when the data operation device performs data operation, the target thread of data operation and the current target storage area are determined, the target sub-area corresponding to the target thread is determined according to the mapping relationship, the target parameter variable corresponding to the data operation device in the target sub-area is determined; the operation parameters of the data operation are obtained, and the operation parameters are written into the target parameter variable. On the basis of distinguishing the sub-area corresponding to the thread, the parameter variable of different data operation devices in the same sub-area is further distinguished, and the storage process of the operation parameters is further clarified, which facilitates subsequent statistics of the operation parameters and improves the convenience of performance statistics.
[0075] Optionally, the target parameter variable includes an operation frequency variable, a delay time variable, and a data size variable.
[0076] The step of obtaining the operation parameters of the data operation and writing the operation parameters into the target parameter variable includes:
[0077] The operation quantity of at least one data operation executed by the data operation device is obtained, and the operation quantity is written into the operation frequency variable.
[0078] The delay time of at least one data operation is obtained, and the delay time is written into the delay time variable.
[0079] acquire a data size of the at least one data operation, and write the data size into the data size variable.
[0080] In the embodiments of the present disclosure, since the data operation performed by the data operation device can be at least one, the operation parameter of the data operation can be an operation number of the at least one data operation, a delay time of the at least one data operation, and a data size of the at least one data operation.
[0081] The operation number is the number of the at least one data operation, for example, if 5 data operations are performed, the operation number is 5. In addition, each data operation in the at least one data operation can have different delay time and data size.
[0082] Further, the operation number is written into the operation number variable, the delay time is written into the delay time variable, and the data size is written into the data size variable. It can be understood that the writing of the variable can be a dynamic accumulation process. When only one data operation is performed, the operation number variable is 1, the delay time variable only stores the delay time of the one data operation, and the data size variable only stores the data size of the one data operation. When a second data operation is performed, the operation number variable is updated to 2 by adding 1 on the basis of the first data operation, the delay time corresponding to the second data operation is added to the delay time variable, and the data size corresponding to the second data operation is added to the data size variable. After each new data operation is performed, the operation number variable, the delay time variable, and the data size variable need to be updated by accumulation.
[0083] Optionally, the parameter variable corresponding to the data operation device in each sub-region carries device information of the data operation device.
[0084] The step of acquiring the operation parameter stored in the second storage region in the case of starting to write the operation parameter into the first storage region comprises:
[0085] In the case of starting to write the operation parameter into the first storage region, a target data operation device to be subjected to performance statistics is determined, and target device information corresponding to the target data operation device is determined.
[0086] According to the target device information, the parameter variable corresponding to the target device information is determined in each sub-region of the second storage region, so as to acquire the operation parameter stored in the second storage region in the parameter variable.
[0087] The step of acquiring the operation parameter stored in the first storage region in the case of starting to write the operation parameter into the second storage region comprises:
[0088] In a case where the writing of the operation parameters to the second storage area is started, a target data operation device to be subjected to the performance statistics is determined, and target device information corresponding to the target data operation device is determined;
[0089] According to the target device information, in each sub-area of the second storage area, a parameter variable corresponding to the target device information is determined one by one, so as to obtain the operation parameters stored in the first storage area in the parameter variable.
[0090] In the embodiments of the present disclosure, since each data operation device has a corresponding parameter variable in each sub-area, the device information of the corresponding data operation device can be configured for the parameter variable, so that the data operation device corresponding to each parameter variable can be determined. The device information can be a device number, which can be obj1, obj2, and the like. The content of the device information used to distinguish the parameter variables is not specifically limited here.
[0091] In a case where the writing of the operation parameters to the first storage area is started, a target data operation device to be subjected to the performance statistics can be determined in the plurality of data operation devices, and target device information corresponding to the target data operation device is determined. According to the target device information and the device information carried by each parameter variable, in the sub-area corresponding to each thread, the parameter variable corresponding to the target device information is determined, and then the operation parameters of the target data operation device stored in the second storage area can be obtained in the parameter variable.
[0092] Similarly, in a case where the writing of the operation parameters to the second storage area is started, a target data operation device to be subjected to the performance statistics is determined, and target device information corresponding to the target data operation device is determined. According to the target device information, in each sub-area of the second storage area, the parameter variable corresponding to the target device information is determined, and then the operation parameters stored in the first storage area can be obtained in the parameter variable.
[0093] Optionally, the first storage area and the second storage area are used to alternately store the operation parameters based on a preset rotation period; the method further comprises:
[0094] determining a target storage area currently used for writing the operation parameters;
[0095] when the target storage area is the first storage area, the target storage area is switched to the second storage area after the preset rotation period is elapsed, so as to start the writing of the operation parameters to the second storage area;
[0096] When the target storage area is the second storage area, the target storage area is switched to the first storage area after the preset rotation period, so as to start writing operation parameters to the first storage area.
[0097] In the embodiments of the present disclosure, the first storage area and the second storage area are used to store operation parameters in turn based on a preset rotation period. The preset rotation period can be 1 second, 5 seconds, etc. It can be understood that the first storage area, the second storage area, and the preset rotation period are used to realize the ping-pong cache.
[0098] At any time, the target storage area currently used to write operation parameters can be determined. When the target storage area is the first storage area, the target storage area is switched to the second storage area after the preset rotation period, for example, 5 seconds, and then writing operation parameters to the second storage area can be started, and the first storage area is switched back again after 5 seconds.
[0099] Similarly, when the target storage area is the second storage area, the target storage area is switched to the first storage area after the preset rotation period, so as to start writing operation parameters to the first storage area.
[0100] The embodiments of the present disclosure are implemented by determining the current target storage area and switching between the first storage area and the second storage area based on the preset rotation period. The first storage area and the second storage area are used as working areas (working cache) for writing operation parameters in turn. The operation parameters in the other area which is not the working area can be used for performance statistics, so that the performance statistics process does not interfere with the normal business IO operation of the data operation device.
[0101] Optionally, the step of determining the data operation performance of the data operation device based on the stored operation parameters comprises:
[0102] The operation quantity stored in the operation number variable, the delay time stored in the delay time variable, and the data quantity stored in the data size variable are obtained, and the preset rotation period used for performing the rotation storage is obtained.
[0103] Based on the preset rotation period and the operation quantity, the operation execution performance of the data operation device is determined.
[0104] Based on the preset rotation period and the delay time, the operation delay performance of the data operation device is determined.
[0105] Based on the preset rotation period and the data quantity, the operation bandwidth performance of the data operation device is determined.
[0106] In the embodiments of the present disclosure, since the first storage area and the second storage area are alternately written based on the preset rotation period, and the data operation performed in each period can also be multiple. Therefore, the number of operations of the data operation device in the first storage area or the second storage area in each period, the variable delay time, the variable data size stored in the data, that is, the total number of operations, the total delay time and the total data size can be changed.
[0107] For the number of operations in each period, the operation execution performance of the data operation device can be calculated, that is, the input / output operations per second (IOPS), which can measure the number of read / write operations processed by the storage system per second.
[0108] For the delay time in each period, the operation delay performance, that is, the round-trip time (RTT), can be obtained, which can represent the time required for data access operation, including the response time of read and write operation.
[0109] For the data amount in each period, the operation bandwidth performance, that is, the bandwidth, can be calculated, which can represent the rate of data transmission in the storage system, which can be measured in bytes per second.
[0110] By implementing the above method steps, the performance statistics of the multiple objects of the storage system can be realized, the lock-free processing of object statistics is realized by the ping-pong cache and thread independent statistics, the execution efficiency of statistics is improved, and the resource consumption of the performance statistics business module to the system is reduced.
[0111] It can be understood that the above method steps can be applied to multiple data operation devices at the same time, the current performance of each data operation device is determined according to the operation parameters stored in the sub-area corresponding to each thread of each data operation device, and the health status of each data operation device is further evaluated according to the current performance of each data operation device and the preset performance of each data operation device. If the current performance is much weaker than the preset performance, it means that the health degree of the current data operation device is low. According to the health degree of each data operation device, the multiple data operation devices in the storage system can be sorted, and the sorting result can be notified to the management and operation personnel, so that the storage system can be maintained in time and accurately, and system problems can be avoided.
[0112] Figure 5 is a schematic diagram of a data operation performance statistics device provided by an embodiment of the present application, which comprises:
[0113] The storage area module 501 is configured to determine a first storage area and a second storage area; the first storage area and the second storage area are used to alternately store operation parameters corresponding to data operations in a case where a data operation device performs the data operations, and the operation parameters are used to describe execution of the data operations.
[0114] The first parameter module 502 is configured to acquire operation parameters stored in the second storage area in a case where the operation parameters are started to be written into the first storage area.
[0115] The second parameter module 503 is configured to acquire operation parameters stored in the first storage area in a case where the operation parameters are started to be written into the second storage area.
[0116] The performance statistics module 504 is configured to determine data operation performance of the data operation device based on the stored operation parameters.
[0117] Optionally, the storage area module comprises:
[0118] The space consistency sub-module is configured to determine the first storage area and the second storage area with consistent space sizes.
[0119] The thread division sub-module is configured to determine, in the first storage area and the second storage area, a plurality of sub-areas corresponding to a number of threads used to perform the data operations, according to the number of threads.
[0120] The sub-areas and the threads have a mapping relationship, and different sub-areas are used to store operation parameters of data operations performed on different threads.
[0121] Optionally, the apparatus further comprises:
[0122] The first target thread storage module is configured to determine a target thread used to perform the data operations and a target storage area currently used to write operation parameters in a case where the data operation device performs the data operations; the target storage area is any one of the first storage area and the second storage area.
[0123] The first target sub-area module is configured to determine a target sub-area corresponding to the target thread in the target storage area according to the mapping relationship.
[0124] The sub-area writing module is configured to acquire operation parameters of the data operations and write the operation parameters into the target sub-area.
[0125] Optionally, the data operation device has a plurality of data operation devices, and each data operation device has a corresponding parameter variable in each sub-area; the apparatus further comprises:
[0126] The second target thread storage module is used to determine the target thread for performing the data operation and the target storage area for writing operation parameters when the data operation device performs data operation; the target storage area is either the first storage area or the second storage area.
[0127] The second target sub-region module is used to determine the target sub-region corresponding to the target thread in the target storage region according to the mapping relationship;
[0128] The target variable module is used to determine the target parameter variables corresponding to the data operation device in the target sub-region;
[0129] The variable writing module is used to obtain the operation parameters of the data operation and write the operation parameters into the target parameter variable.
[0130] Optionally, the target parameter variables include the number of operations, the delay time, and the data size.
[0131] The variable writing module includes:
[0132] The count variable submodule is used to obtain the number of operations of at least one data operation performed by the data operation device, and write the number of operations into the operation count variable;
[0133] The delay variable submodule is used to obtain the delay time of at least one data operation and write the delay time into the delay time variable.
[0134] The data variable submodule is used to obtain the data volume of at least one data operation and write the data volume into the data size variable.
[0135] Optionally, the parameter variables corresponding to the data operation device in each sub-region carry the device information of the data operation device;
[0136] The first parameter module includes:
[0137] The first parameter writing submodule is used to determine the target data operation device to be subjected to performance statistics and to determine the target device information corresponding to the target data operation device when the operation parameters are written to the first storage area.
[0138] The first parameter reading submodule is used to determine the parameter variables corresponding to the target device information in each sub-region of the second storage area according to the target device information, so as to obtain the operation parameters stored in the second storage area from the parameter variables;
[0139] The second parameter module includes:
[0140] The second parameter writing sub-module is configured to determine a target data operation device to be subjected to performance statistics and determine target device information corresponding to the target data operation device when starting to write operation parameters into the second storage area;
[0141] The second parameter reading sub-module is configured to determine parameter variables corresponding to the target device information in each sub-area of the second storage area according to the target device information, so as to obtain the operation parameters stored in the first storage area in the parameter variables.
[0142] Optionally, the first storage area and the second storage area are configured to alternately store operation parameters based on a preset rotation period; and the device further comprises:
[0143] The current area determining module is configured to determine a target storage area currently used for writing operation parameters;
[0144] The first rotation module is configured to switch the target storage area to the second storage area after the preset rotation period when the target storage area is the first storage area, so as to start to write operation parameters into the second storage area.
[0145] The second rotation module is configured to switch the target storage area to the first storage area after the preset rotation period when the target storage area is the second storage area, so as to start to write operation parameters into the first storage area.
[0146] Optionally, the performance statistics module comprises:
[0147] The multivariable reading sub-module is configured to obtain the operation quantity stored in the operation times variable, the delay time stored in the delay time variable, and the data quantity stored in the data size variable, and obtain a preset rotation period used for performing alternately storage.
[0148] The operation execution performance sub-module is configured to determine operation execution performance of the data operation device based on the preset rotation period and the operation quantity.
[0149] The operation delay performance sub-module is configured to determine operation delay performance of the data operation device based on the preset rotation period and the delay time.
[0150] The operation bandwidth performance sub-module is configured to determine operation bandwidth performance of the data operation device based on the preset rotation period and the data quantity.
[0151] In summary, in the embodiment of the present application, the first storage area and the second storage area are determined, and the first storage area and the second storage area are used to alternately store operation parameters corresponding to data operation in the case that the data operation device performs data operation, in the case that the operation parameters are written into the first storage area, the operation parameters stored in the second storage area are obtained, or in the case that the operation parameters are written into the second storage area, the operation parameters stored in the first storage area are obtained, and the data operation performance of the data operation device is determined based on the stored operation parameters. In the process of continuously performing data operation of the data operation device, the operation parameters can be continuously written into one storage area, and the operation parameters can be continuously obtained in another storage area to determine the data operation performance, and the alternately writing and obtaining process can improve the statistical efficiency of the data operation performance.
[0152] The embodiment of the present application also provides an electronic device, such as Figure 6 As shown in the figure, the electronic device comprises a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602 and the memory 603 complete mutual communication through the communication bus 604.
[0153] The memory 603 is used for storing a computer program.
[0154] The processor 601 is used for executing the program stored in the memory 603, and the following steps are realized: in the process that the driver controls the vehicle to run, the running parameters of the vehicle are obtained; different categories of driving behaviors are identified based on the running parameters, and the feature data of at least one category of driving behavior is determined; and the determined feature data is input into an identity recognition model to perform identity recognition on the current driver.
[0155] The processor 601 can also realize other steps in the above-mentioned data operation performance statistical method, which will not be described here.
[0156] The communication bus mentioned in the above-mentioned electronic device can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The communication bus can be divided into an address bus, a data bus and a control bus. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0157] The communication interface is used for communication between the above-mentioned electronic device and other devices.
[0158] The memory can include a random access memory (RAM) and can also include a non-volatile memory such as at least one disk memory. Optionally, the memory can also be at least one storage device located remotely from the aforementioned processor.
[0159] The processor described above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. It can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0160] In yet another embodiment provided by the present application, a computer readable storage medium is also provided, which stores instructions, when running on a computer, causes the computer to perform the data operation performance statistics method described in the above embodiments.
[0161] In yet another embodiment provided by the present application, a computer program product containing instructions is also provided, when running on a computer, causes the computer to perform the data operation performance statistics method described in the above embodiments.
[0162] In the embodiments described above, all or some of the steps can be implemented by software, hardware or firmware, or any combination thereof. When implemented by software, all or some of the steps can be implemented in the form of one or more computer programs. The computer program can be stored in any computer readable medium, and when loaded into a computer system, causes the computer system to perform one or more of the steps of the computer program. The computer readable medium can be a magnetic disk, an optical disk, a magneto-optical disk, a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), a flash memory, a RAM, or any other suitable device. The computer readable medium can be fixed or removable. The computer readable medium can be a computer data signal conveyed in a baseband or a carrier wave transmitted on a communication channel or a computer product.
[0163] It should be noted that, in the description, the relative terms such as first and second are used only to differentiate one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Also, the terms "comprising", "containing" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a list of elements not only includes those elements, but also includes other elements not explicitly listed, or other elements inherent in such a process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0164] Each of the embodiments in the specification is described in a relevant manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. For the embodiments of the apparatus, electronic device, computer readable storage medium and computer program product containing instructions thereof, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiments.
[0165] The above merely provides the preferred embodiment of the present application, and not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall fall within the protection scope of the present application.
Claims
1. A method for statistical analysis of data manipulation performance, characterized in that, include: Determine the first storage region and the second storage region; The first storage area and the second storage area are used to alternately store the operation parameters corresponding to the data operation when the data operation device performs a data operation. The operation parameters are used to describe the execution status of the data operation. When writing operation parameters to the first storage area begins, the operation parameters already stored in the second storage area are retrieved; When writing operation parameters to the second storage area begins, the operation parameters already stored in the first storage area are retrieved. Based on the stored operation parameters, determine the data operation performance of the data operation device; The step of determining the first storage region and the second storage region includes: Determine a first and second storage area with the same size; Based on the number of threads used to perform data operations, multiple sub-regions corresponding to the number of threads are determined in the first storage region and the second storage region, respectively; There is a mapping relationship between sub-regions and threads, and different sub-regions are used to store operation parameters for data operations performed on different threads.
2. The method according to claim 1, characterized in that, The method further includes: When the data operation device performs data operation, a target thread for performing the data operation and a target storage area for writing operation parameters are determined; the target storage area is either the first storage area or the second storage area. Based on the mapping relationship, the target sub-region corresponding to the target thread in the target storage region is determined; Obtain the operation parameters for the data operation and write the operation parameters into the target sub-region.
3. The method according to claim 1, characterized in that, The method includes multiple data manipulation devices, each with corresponding parameter variables in each sub-region; the method further includes: When the data operation device performs data operation, the target thread for performing the data operation and the target storage area for writing operation parameters are determined. Based on the mapping relationship, the target sub-region corresponding to the target thread in the target storage region is determined; Determine the target parameter variable corresponding to the data manipulation device in the target sub-region; Obtain the operation parameters for the data operation and write the operation parameters into the target parameter variable.
4. The method according to claim 3, characterized in that, The target parameter variables include the number of operations, the delay time, and the data size. The step of obtaining the operation parameters of the data operation and writing the operation parameters into the target parameter variable includes: Obtain the number of operations for at least one data operation performed by the data operation device, and write the number of operations into the operation count variable; Obtain the delay time of at least one data operation and write the delay time into the delay time variable; Obtain the amount of data for at least one data operation and write the amount of data into the data size variable.
5. The method according to claim 3, characterized in that, The parameter variables corresponding to the data operation device in each sub-region all carry the device information of the data operation device; The step of obtaining the operation parameters already stored in the second storage area when writing operation parameters to the first storage area begins includes: When writing operation parameters to the first storage area, the target data operation device to be subjected to performance statistics is determined, and the target device information corresponding to the target data operation device is determined. Based on the target device information, in each sub-region of the second storage area, parameter variables corresponding to the target device information are determined one by one, so as to obtain the operation parameters stored in the second storage area from the parameter variables; The step of obtaining the operation parameters already stored in the first storage area when writing operation parameters to the second storage area begins includes: When writing operation parameters to the second storage area, the target data operation device to be performed on is determined, and the target device information corresponding to the target data operation device is determined. Based on the target device information, in each sub-region of the second storage area, parameter variables corresponding to the target device information are determined one by one, so as to obtain the operation parameters stored in the first storage area from the parameter variables.
6. The method according to claim 1, characterized in that, The first storage area and the second storage area are used to store operation parameters in turn based on a preset rotation period; the method further includes: Determine the target storage region for the current write operation parameters; When the target storage area is the first storage area, after the preset rotation cycle, the target storage area is switched to the second storage area to start writing operation parameters to the second storage area; When the target storage area is the second storage area, after the preset rotation cycle, the target storage area is switched to the first storage area to start writing operation parameters to the first storage area.
7. The method according to claim 4, characterized in that, The step of determining the data operation performance of the data operation device based on the stored operation parameters includes: Obtain the number of operations stored in the operation count variable, the delay time stored in the delay time variable, and the amount of data stored in the data size variable, and obtain the preset rotation period for performing round-robin storage; The operational performance of the data operation device is determined based on the preset rotation cycle and the number of operations. The operational latency performance of the data operation device is determined based on the preset rotation cycle and the delay time. Based on the preset rotation cycle and the amount of data, the operating bandwidth performance of the data operation device is determined.
8. A data operation performance statistics device, characterized in that, include: A storage area module is used to determine a first storage area and a second storage area; The first storage area and the second storage area are used to alternately store the operation parameters corresponding to the data operation when the data operation device performs a data operation. The operation parameters are used to describe the execution status of the data operation. The first parameter module is used to obtain the operation parameters already stored in the second storage area when writing operation parameters to the first storage area begins. The second parameter module is used to obtain the operation parameters already stored in the first storage area when writing operation parameters to the second storage area begins. The performance statistics module is used to determine the data operation performance of the data operation device based on the stored operation parameters. The storage area module includes: The space consistency submodule is used to determine the first and second storage areas with the same space size; The thread partitioning submodule is used to determine multiple sub-regions corresponding to the number of threads in the first storage area and the second storage area, respectively, based on the number of threads used to perform data operations. There is a mapping relationship between sub-regions and threads, and different sub-regions are used to store operation parameters for data operations performed on different threads.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the data manipulation performance statistics method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein the computer programs, when executed by a processor, implement the data manipulation performance statistics method as described in any one of claims 1 to 7.