Fine-grained parallel I / O performance prediction and I / O strategy recommendation method and system
Through dynamic library interception technology, I/O performance data is collected and classified, performance prediction models are built, and performance overhead of I/O strategies is solved, and the existing technology cannot perform fine-grained I/O performance prediction and performance improvement are achieved.
Patent Information
- Application Number
- CN202411758105.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-03
AI Technical Summary
Existing I/O performance prediction methods cannot perform fine-grained I/O performance prediction, cannot identify I/O performance bottlenecks, and lack universality, which cannot meet the I/O performance prediction needs of different types of applications.
Fine-grained I/O performance data is collected through dynamic library interception technology, and performance record collection is classified to form, performance prediction model is constructed and trained, the total performance overhead of candidate I/O strategies is calculated, and the strategy with the smallest performance overhead is selected as the optimization recommendation solution.
It realizes high-precision I/O performance prediction based on fine-grained I/O performance data, can identify performance bottlenecks of parallel I/O functions, and improve the overall performance of the application through I/O strategy recommendations.
Smart Images

Figure CN119690794A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of high performance computing and computer architecture, and in particular relates to a fine-grained parallel I / O performance prediction and I / O strategy recommendation method and system. Background Art
[0002] With the rapid development of high-performance computing (HPC) technology, especially the rise of domestic supercomputer systems, although the computing efficiency of large-scale parallel programs has been significantly improved, the I / O performance bottleneck problem has become more and more prominent and has become a key constraint on overall performance. I / O performance prediction can provide effective information for identifying I / O performance bottlenecks in unknown scenarios (such as ultra-large-scale scenarios) and can provide effective improvement suggestions for improving the parallel I / O performance of applications.
[0003] From the perspective of the granularity of I / O performance data collection, I / O performance data is divided into application-level coarse-grained I / O performance data and function-level fine-grained I / O performance data. Among them, application-level coarse-grained I / O performance data refers to the statistical information of application read and write operations only, without detailed information of each I / O operation; while function-level fine-grained I / O performance data can provide detailed read and write information of each I / O operation of different functions. The existing I / O performance prediction methods can only predict coarse-grained I / O performance (such as overall I / O size and time) based on coarse-grained I / O performance data, and cannot perform finer-grained I / O performance prediction, so they cannot meet the requirements of identifying I / O performance bottlenecks; or they can only predict for specific applications, and cannot meet the I / O performance prediction needs of different types of applications, and are not universal. Summary of the invention
[0004] The purpose of the present invention is to provide a fine-grained parallel I / O performance prediction and I / O strategy recommendation method and system to solve the problems existing in the above-mentioned prior art.
[0005] To achieve the above objectives, in a first aspect, the present invention provides a fine-grained parallel I / O performance prediction and I / O strategy recommendation method, comprising the following steps:
[0006] Based on the dynamic library interception technology, fine-grained data related to I / O performance is collected and stored to obtain a performance record set C;
[0007] Classify the data in the set C and form n classification sets C1, C2...C according to the classification rules. n , for each classification set C i Build and train a performance prediction model Ci ;
[0008] By calling the performance prediction model, the total performance overhead of each candidate I / O strategy is calculated, and the I / O strategy with the smallest performance overhead is selected as the optimization recommendation solution.
[0009] Furthermore, the collection process of the fine-grained data related to I / O performance specifically includes: using the dynamic library dlsym interception technology to insert interception codes before and after the parallel program calls the I / O function, and record the performance information of the function call.
[0010] Optionally, the fine-grained data related to I / O performance includes: function name, data type, I / O operation volume, number of calls and execution time.
[0011] Optionally, the classification rules include: a rule for identical function names, a rule for consistent data types, and a rule for similar I / O operation amounts.
[0012] Optionally, the rule for similar I / O operation amounts is specifically as follows: the difference between the I / O operation amounts of two random identical function calls does not exceed a preset threshold, and the preset threshold adopts a set value, which is 1.5 times.
[0013] Optionally, the performance prediction model is a traditional machine learning model based on a regression algorithm or a neural network model based on deep learning: the traditional machine learning model based on a regression algorithm includes linear regression, decision tree, and random forest, etc.; the neural network model based on deep learning includes multilayer perceptron MLP, recurrent neural network RNN, and Transformer model, etc.
[0014] Optionally, the I / O strategy is composed of a number of I / O function calls and corresponding operation characteristics, which is defined as a set S = {(F i ,ByteofWR i ,DT i ,NumofOp i )}, where F i is the function name, ByteofWR i is the average I / O volume, DT i For I / O data types, NumofOp i is the number of calls.
[0015] In a second aspect, the present invention further provides a fine-grained parallel I / O performance prediction and I / O strategy recommendation system, comprising:
[0016] A fine-grained parallel I / O performance data collection and storage module is configured to collect and store fine-grained data related to I / O performance based on a dynamic library interception technology to obtain a performance record set C;
[0017] The I / O performance prediction model building and training module is configured to classify the data in the set C and form n classification sets C1, C2...C according to the classification rules. n , for each classification set C i Build and train a performance prediction model Ci ;
[0018] The I / O strategy recommendation module is configured to calculate the total performance overhead of each candidate I / O strategy by calling the performance prediction model, and select the I / O strategy with the smallest performance overhead as the optimization recommendation solution.
[0019] The technical effects of the present invention are:
[0020] (1) The I / O performance prediction method of the present invention is based on fine-grained I / O performance data for prediction. The detailed function-level I / O performance indicators facilitate comprehensive capture of the performance characteristics of parallel I / O functions, thereby improving the fine-grainedness and high precision of performance prediction results. Most other existing prediction methods use coarse-grained information to predict application-level I / O performance, such as predicting the total throughput and total overhead of reads and writes. The method of the present invention can use fine-grained parallel I / O performance data to predict at the function level and ultimately provide a function-level fine-grained I / O performance prediction result.
[0021] (2) The I / O strategy recommendation method proposed in the present invention can achieve performance tuning of the I / O module of the application and performance optimization of the overall program. The present invention analyzes fine-grained information to identify the I / O performance bottleneck of large-scale parallel applications, uses I / O strategy recommendation to pre-estimate the best I / O strategy for each type of parallel I / O function, and performs I / O tuning based on the I / O strategy, thereby effectively improving the performance of the overall application. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0023] Figure 1 The overall architecture diagram of the fine-grained parallel I / O performance prediction and I / O strategy recommendation method in an embodiment of the present invention;
[0024] Figure 2 A schematic diagram of the steps of collecting and storing fine-grained I / O performance in an embodiment of the present invention;
[0025] Figure 3 A schematic diagram of steps for constructing and training an I / O performance prediction model based on fine-grained I / O performance data in an embodiment of the present invention;
[0026] Figure 4 A schematic diagram of the steps of I / O policy recommendation based on fine-grained I / O performance prediction in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0028] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0029] like Figure 1-4 As shown, this embodiment provides a parallel I / O performance prediction method for large-scale parallel programs on supercomputer systems, and multiple I / O strategies can be selected and tuned based on the prediction method. Among them, the I / O performance prediction method is based on fine-grained I / O performance data at the function level for prediction. Compared with the existing technology of predicting I / O performance through coarse-grained I / O performance data, it can realize fine-grained performance analysis and prediction of parallel I / O functions, I / O performance bottleneck identification and better I / O strategy recommendation, and finally achieve application I / O performance and overall application performance improvement, effectively transforming the computing power advantage of supercomputers into productivity advantages.
[0030] In order to achieve fine-grained I / O performance prediction and strategy recommendation, it is necessary to carry out fine-grained parallel I / O performance data collection and storage, parallel I / O performance prediction model construction and training, and I / O strategy recommendation based on fine-grained I / O performance prediction in steps.
[0031] Figure 1 This is the overall architecture diagram of the fine-grained parallel I / O performance prediction and I / O strategy recommendation method of the present invention. The fine-grained I / O performance data collected and stored at multiple levels from the large-scale parallel programs of the supercomputing system is used to analyze the I / O performance data and build a prediction model. The prediction model is called to predict and evaluate different I / O strategies, and the best I / O computing strategy is selected for recommendation. The present invention includes the following three technical contents:
[0032] (1) Fine-grained I / O performance collection and storage: includes an efficient fine-grained parallel I / O performance data collection and storage module, which is used to collect fine-grained data related to I / O performance based on dynamic library interception technology and store the fine-grained data to form a performance record set C.
[0033] (2) Construction and training of I / O performance prediction model based on fine-grained I / O performance data: The I / O performance prediction model construction and training module analyzes the fine-grained I / O performance data stored in the "fine-grained parallel I / O performance data acquisition and storage module", classifies the I / O performance data, establishes the I / O performance prediction model and trains it.
[0034] (3) I / O strategy recommendation based on fine-grained I / O performance prediction: The "I / O strategy recommendation module" calls the I / O performance prediction model established by the "I / O performance prediction model construction and training module" to predict the time overhead and call count of different categories of I / O functions under different I / O computing strategies, and gives recommended I / O strategies based on the prediction results.
[0035] Embodiment 1
[0036] The specific steps of a fine-grained parallel I / O performance prediction and I / O strategy recommendation method of the present invention are as follows:
[0037] 1. As Figure 2 As shown, it is a schematic diagram of the fine-grained I / O performance collection and storage steps of the present invention. When the application needs to call an I / O function, the interception code is inserted before the call, and then the function is called normally. After the I / O operation is completed, the collected I / O performance data is written to the file according to the storage format shown in the figure.
[0038] The specific steps for fine-grained I / O performance collection and storage are as follows:
[0039] (1) Fine-grained I / O performance data collection: Based on the given parallel I / O functions that need to be collected (such as MPI_File_write_at, etc.), use the Linux dlsym dynamic library interception method to insert performance interception code before and after the I / O function call. Record the function identifier (i.e., function name), file identifier read and written by the function, function execution time, I / O volume, I / O data type and other I / O performance data for each I / O function to be collected. Here, we call an "I / O performance data record" the above performance data corresponding to an I / O function call.
[0040] (2) Fine-grained I / O performance data storage: Based on the attached Figure 2 The storage format is used to store I / O performance data. Each parallel process writes the intercepted and counted I / O performance data into a file. Here, it is defined that the set corresponding to all I / O performance data records written into the file is C.
[0041] 2. If Figure 3 , which is a schematic diagram of the steps for building and training an I / O performance prediction model based on fine-grained I / O performance data.
[0042] The specific steps for building and training an I / O performance prediction model based on fine-grained I / O performance data are as follows:
[0043] (1) Classification of I / O performance data records:
[0044] Traverse the performance records in the I / O performance data record set C corresponding to "fine-grained I / O performance collection and storage", classify the I / O performance data records according to the following classification rules, and obtain n classifications of the set C, that is, C = {C1, C2, C3...C n}(The classification recorded here is a partition of set C).
[0045] Definition of similar I / O volume: When the I / O volume corresponding to two identical I / O function calls does not differ by more than η times, the I / O volume is considered similar (η is a user-defined parameter, the default value is 1.5).
[0046] Define classification rules: If the function names are the same, the I / O data types are consistent (such as an array of Int type, an array of Byte type, or a custom type, etc.), and the I / O amounts are similar, the I / O performance data records corresponding to the two functions are classified into the same category.
[0047] (2) Establishment and training of personalized function performance prediction model:
[0048] For each record C in class (1) i , established C i Model prediction model Ci , and perform training and export and save model parameters. The models here are diverse, and different models can be selected according to user needs and data characteristics, such as traditional regression models (linear regression models, decision trees, random forests, etc.), neural network models (MLP multi-layer perceptron, RNN recurrent neural network, Transformer model, etc.), etc.
[0049] Among them, C i Model prediction model Ci Definition of Model Ci Given the I / O amount ByteofWR and the number of calls NumofOp, we can give the C i The total I / O time cost ζ of the data type DT and function F corresponding to the classification i , that is, i =Model Ci (Byte of WR, Num of Op).
[0050] (3) I / O performance prediction - determining the model:
[0051] Given a parallel I / O function F, I / O quantity ByteofWR, and data type DT, determine the prediction model Model Ci .
[0052] Specifically: traverse all categories C i , if its corresponding function F i , data type DT i The given F and DT are consistent, and ByteofWR is consistent with C i If the average I / O volume corresponding to the set meets the "similar I / O volume" rule, then C in step (2) above i Corresponding prediction model Ci Make sure.
[0053] (4) I / O performance prediction - prediction:
[0054] Based on the I / O function F, I / O amount ByteofWR, data type DT, and number of calls NumofOp given in (3), call the prediction model Model in (3) Ci , giving the corresponding prediction result, that is, I / O overhead t = NumofOp × ζ i =NumofOp×Model Ci (Byte of WR, Num of Op).
[0055] 3. Such as Figure 4 The figure shows a schematic diagram of the steps for I / O strategy recommendation based on fine-grained I / O performance prediction.
[0056] The specific steps for I / O policy recommendation based on fine-grained I / O performance prediction are as follows:
[0057] (1) Given an I / O computing strategy: An I / O computing strategy is the call of several I / O functions, defined as a set S, S = { <F i ,ByteofWR i ,DT i ,NumofOp i >} (i = 1, 2, 3, ..., m; m is the number of I / O function categories). Each element in S is a function call of the same category (the definition of "the same category" is the same as described in 2. (1) above), specifically including: I / O function F i and I / O function operation characteristics, including the average I / O volume ByteofWR classified by the "similar I / O volume" rule i , data type DT i , function F i Number of calls NumofOp i .
[0058] (2) Call the I / O performance prediction model in 2. (4) to make predictions: for each type of function C1, C2, C3, ... C in the set S m Make predictions and get the I / O overhead t1, t2, t3, ... t of each type of function m .
[0059] (3) Accumulate the cost t1, t2, t3, ... t of each type of function in the set S m , get the total I / O cost:
[0060] (4) Given a set G of multiple I / O strategies, G contains I / O computing strategies G = {S1, S2, S3...S k}, each element in G goes through steps (1)-(3) to obtain the total I / O cost T1, T2, T3, ... T corresponding to each strategy k , select T with the smallest total I / O overhead min Corresponding I / O calculation strategy S min As the best I / O computing strategy.
[0061] (5) The selected calculation strategy S min Recommended as the strategy for best I / O performance.
[0062] The present invention also provides a fine-grained parallel I / O performance prediction and I / O strategy recommendation system, the specific steps of which are:
[0063] 1. Call the fine-grained parallel I / O performance data collection and storage module, which collects and stores fine-grained data related to I / O performance based on dynamic library interception technology to obtain a performance record set C;
[0064] 2. Call the I / O performance prediction model construction and training module, which classifies the data in the set C and forms n classification sets C1, C2...C according to the classification rules. n , for each classification set C i Training performance prediction model Ci ;
[0065] 3. Calling the I / O strategy recommendation module, which calculates the total performance overhead of each candidate I / O strategy by calling the performance prediction model, and selects the I / O strategy with the smallest performance overhead as the optimization recommendation solution.
[0066] The above is only a preferred specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A fine-grained parallel I / O performance prediction and I / O strategy recommendation method, characterized in that: The following steps are involved: Based on the dynamic library interception technology, fine-grained data related to I / O performance is collected and stored to obtain a performance record set C; Classify the data in the set C and form n classification sets C1, C2...C according to the classification rules. n , for each classification set C i Build and train a performance prediction model Ci ; By calling the performance prediction model, the total performance overhead of each candidate I / O strategy is calculated, and the I / O strategy with the smallest performance overhead is selected as the optimization recommendation solution.
2. The fine-grained parallel I / O performance prediction and I / O strategy recommendation method according to claim 1, characterized in that: The process of collecting fine-grained data related to I / O performance specifically includes: using the dynamic library dlsym interception technology, inserting interception codes before and after the parallel program calls the I / O function, and recording the performance information of the function call.
3. The fine-grained parallel I / O performance prediction and I / O strategy recommendation method according to claim 1, characterized in that: The fine-grained data related to I / O performance includes: function name, data type, I / O operation amount, number of calls and execution time.
4. The fine-grained parallel I / O performance prediction and I / O strategy recommendation method according to claim 1, characterized in that: The classification rules include: a rule for identical function names, a rule for identical data types, and a rule for similar I / O operation amounts.
5. The fine-grained parallel I / O performance prediction and I / O strategy recommendation method according to claim 4, characterized in that: The rule for similar I / O operation amounts is specifically: the difference between the I / O operation amounts of two identical function calls does not exceed a preset threshold, the preset threshold adopts a set value, and the set value defaults to 1.5 times.
6. The fine-grained parallel I / O performance prediction and I / O strategy recommendation method according to claim 1, characterized in that: The performance prediction model adopts a traditional machine learning model based on a regression algorithm or a neural network model based on deep learning: the traditional machine learning model based on a regression algorithm includes linear regression, decision tree and random forest; the neural network model based on deep learning includes multi-layer perceptron MLP, recurrent neural network RNN and Transformer model.
7. The fine-grained parallel I / O performance prediction and I / O strategy recommendation method according to claim 1, characterized in that: The I / O strategy consists of several I / O function calls and corresponding operation characteristics, defined as the set S = {(F i ,ByteofWR i ,DT i ,NumofOp i )}, where F i is the function name, ByteofWR i is the average I / O volume, DT i For I / O data types, NumofOp i is the number of calls.
8. A fine-grained parallel I / O performance prediction and I / O strategy recommendation system, comprising: A fine-grained parallel I / O performance data collection and storage module is configured to collect and store fine-grained data related to I / O performance based on a dynamic library interception technology to obtain a performance record set C; The I / O performance prediction model building and training module is configured to classify the data in the set C and form n classification sets C1, C2...C according to the classification rules. n , for each classification set C i Build and train a performance prediction model Ci ; The I / O strategy recommendation module is configured to calculate the total performance overhead of each candidate I / O strategy by calling the performance prediction model, and select the I / O strategy with the smallest performance overhead as the optimization recommendation solution.
Citation Information
Patent Citations
Software performance automatic testing method and device and electronic equipment
CN111061647A
Method for dynamically adjusting read-write resources of file system
CN111625367A
Strategy optimization method and device for Linux system kernel configuration based on machine learning
CN117172093A
I / O characteristic prediction method and device, equipment and storage medium
CN118312398A
Dynamic function-level hardware performance profiling for application performance analysis
US20140310561A1