Simulation program tuning acceleration method and system

Through analysis tools, the hotspot functions and call relationships of large software are extracted and simulation programs are constructed, which solves the problem of excessive time-consuming performance testing of large software, achieves fast and accurate performance evaluation, and improves the efficiency of operating system configuration optimization.

CN120336144APending Publication Date: 2025-07-18QILIN XINAN (GUANGDONG) TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510501213.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the process of optimizing operating system configuration of large software, performance testing takes too long, resulting in low optimization efficiency and lack of general and automated means to shorten running time.

Method used

By using performance analysis tools to extract function operation information of the target software, identify hotspot functions and their upstream and downstream levels and call relationships, build simulation programs, and select simulation function modules according to load behavior type, generate simulation programs, and adjust their total running time to shorten test time.

Benefits of technology

Significantly shorten the test time per round, improve optimization efficiency, maintain consistent performance characteristics, ensure accurate evaluation, reflect operating system-level performance impact, and have high automation and applicability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336144A_ABST
    Figure CN120336144A_ABST
Patent Text Reader

Abstract

The invention discloses a simulation program tuning acceleration method and system, and the method comprises the steps: extracting function operation information of target software during operation under real system configuration by using a performance analysis tool, screening out hotspot functions, and obtaining upstream and downstream hierarchies and a calling relation between the hotspot functions; identifying a load behavior type of the hotspot function, selecting a simulation program function module from the simulation function template according to the load behavior type, and constructing a function module of a simulation program in combination with upstream and downstream hierarchies and a calling relationship between the hotspot functions; and combining the function modules to generate a simulation program of the target software, and adjusting the total running time of the simulation program according to preset global control time. The invention aims to greatly shorten the time consumption of single-round operation of large-scale software under different system configurations under the condition of not changing performance behavior characteristics, so that the efficiency of performance testing in the configuration optimization process of an operating system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer software performance testing and optimization, and particularly relates to a method and system for simulating program tuning and acceleration. Background Art

[0002] In the process of optimizing the operating system configuration of large-scale software, it is often necessary to perform multiple rounds of iterative evaluation of the software performance under different configurations. However, the single run of such software takes an extremely long time (for example, a complete run takes 10 hours). If dozens to hundreds of tests are required, it will consume hundreds or even thousands of hours, resulting in extremely low efficiency of the optimization process. Currently, optimizers usually can only reduce the number of tests or adopt incomplete tests, making it difficult to fully explore the configuration space and affecting the optimization effect. To solve this problem, the "skeleton program" method has been proposed in the industry: using a small program to simulate the performance behavior of a large application. For example, in the field of high-performance computing, the running time of a program is often predicted by constructing a skeleton program: replacing the calculation process in the original program with methods such as sleeping, and proportionally shortening the communication volume and calculation time, so that the running time of the skeleton program is much less than that of the original program and maintains a fixed proportional relationship with the running time of the original program. By running the skeleton program, the performance of the original program can be quickly inferred.

[0003] However, the "skeleton program" method is mostly used for performance prediction of parallel programs, and it has the following limitations: the skeleton program usually lacks adaptability to different inputs and operating system characteristics, and the construction process requires manual simplification for specific programs, making it difficult to be directly applied to the configuration optimization test of general large-scale software. In summary, the prior art lacks a general and automated means to significantly shorten the running time of large-scale software while ensuring the reliability of performance evaluation results, so as to improve the efficiency of configuration optimization. Therefore, a new technical solution is needed to solve the problem of excessive running time of large-scale software performance testing. Summary of the Invention

[0004] The technical problem to be solved by the present invention: In view of the above problems of the prior art, a method and system for simulating program tuning and acceleration are provided. The present invention aims to significantly shorten the single-round running time of large-scale software under different system configurations without changing the performance behavior characteristics, thereby improving the efficiency of performance testing in the process of operating system configuration optimization.

[0005] To solve the above technical problems, the technical solution adopted by the present invention is as follows: A method for accelerating simulation program optimization includes the following steps: using a performance analysis tool to extract function running information of target software when running under a real system configuration and screening out hot functions, obtaining the upstream and downstream levels and call relationships between the hot functions; identifying the load behavior types of the hot functions, selecting simulation program function modules from simulation function templates according to the load behavior types, and constructing function modules of the simulation program in combination with the upstream and downstream levels and call relationships between the hot functions; combining the function modules to generate a simulation program of the target software, and adjusting the total running time of the simulation program according to a preset global control time.

[0006] Optionally, when using a performance analysis tool to extract function running information of target software when running under a real system configuration and screening out hot functions, the function running information includes the proportion of CPU time or call frequency occupied by each function of the target software when running under a real system configuration, and then deleting functions with a proportion of CPU time or call frequency less than a preset hot function identification accuracy threshold to obtain the remaining hot functions.

[0007] Optionally, obtaining the upstream and downstream levels and call relationships between the hot functions means constructing a function call graph or call relationship graph for the hot functions, and identifying the upstream and downstream levels and call relationships between the hot functions according to the function call graph or call relationship graph.

[0008] Optionally, when identifying the load behavior types of the hot functions, the load behavior types include some or all of compute-intensive, I / O-intensive, and network-intensive.

[0009] Optionally, when selecting simulation program function modules from simulation function templates according to the load behavior types, a pure calculation simulation function template is used for compute-intensive functions in the simulation function template to occupy the CPU; a simulation function template that performs disk read / write or equivalent waiting is used for I / O-intensive functions to generate disk I / O latency; for network-intensive functions, a simulation function template for simulating network transceiver latency is used, and the implementation of each simulation function template accepts an adjustable parameter to control its running time or workload size to accurately adjust the time consumption of the simulation function template; when constructing function modules of the simulation program in combination with the upstream and downstream levels and call relationships between the hot functions, it includes replacing the calls of the hot functions with the calls of the simulation function templates and retaining the function interfaces of the function modules so that the upstream and downstream levels and call relationships between the function modules are consistent with the original program.

[0010] Optionally, when combining the function modules to generate a simulation program of the target software, it includes constructing the following time calculation formula for the simulation program: , where, To simulate the total running time of the program, ~ are the execution times of the 1st to nth function modules respectively, ~ are the running parameters of the 1st to nth function modules respectively. The running parameters are the number of calls or coefficients. n is the number of function modules. And the execution time of any function module is the sum of its own execution time and the execution time of the function modules it calls; Determine the time-consuming ratio of each hot function according to the function running information when the target software runs under the real system configuration, and fit the number of calls or coefficients of the 1st to nth function modules ~ so that the running time ratio of the function module combination matches that of the real program.

[0011] Optionally, the adjusting the total running time of the simulation program according to the preset global control time includes: introducing a global scaling factor, and scaling the preset global control time according to the preset global scaling factor to adjust the total running time of the simulation program.

[0012] In addition, the present invention also provides a simulation program tuning and acceleration system, including a microprocessor and a memory connected to each other. The microprocessor is programmed or configured to execute the simulation program tuning and acceleration method.

[0013] In addition, the present invention also provides a computer-readable storage medium, in which a computer program or instruction is stored. The computer program or instruction is programmed or configured to execute the simulation program tuning and acceleration method through a processor.

[0014] In addition, the present invention also provides a computer program product, including a computer program or instruction. The computer program or instruction is programmed or configured to execute the simulation program tuning and acceleration method through a processor.

[0015] Compared with the prior art, the present invention can mainly achieve the following beneficial effects: 1. The present invention can greatly shorten the test time and improve the optimization efficiency: The present invention uses a simulation program to replace the actual software for performance evaluation. The running time of each round of testing can be reduced from the hour level to the minute or dozens of minutes level (shortened by more than one order of magnitude). For example, it becomes possible to complete 100 configuration tests from about 1000 hours to dozens of hours, thus greatly accelerating the optimization iteration speed.

[0016] 2. The present invention can maintain consistent performance characteristics and ensure accurate evaluation: The time-consuming ratio of each part of the simulation program is strictly set according to the ratio of the original software's hot functions, and the resource occupancy patterns of each module during operation are the same as those of the original software. Therefore, under different operating system configurations, the performance changes of the simulation program are synchronized with the original software, and can truly reflect the performance differences of the original software under this configuration. In other words, the running time of the simulation program is always a fixed-proportion microcosm of the original program. It is comparable in any test environment, ensuring the reliability of the evaluation results.

[0017] 3. The present invention can reflect the performance impact at the operating system level: Since the simulation functions accurately match the original function types according to categories such as CPU calculation, disk I / O, and network I / O, the simulation program will generate load behaviors similar to those of the original program at the operating system level (such as CPU busy degree, I / O request frequency, network bandwidth occupancy, etc.). This means that the impact of the operating system's scheduling strategy, cache mechanism, network stack, etc. on the simulation program is the same as that on the original program. For example, for the CPU-intensive part, the performance improvement brought by CPU scheduling optimization will also be reflected in the simulation program; for the I / O-intensive part, the change in disk prefetching or I / O scheduling strategy will have a similar impact on the running time of the simulation program as on the original program. This ensures that under various optimization means or configuration changes, the simulation program can effectively simulate the response of the original program, making the test results meaningful.

[0018] 4. High degree of automation and strong applicability: The present invention uses general analysis tools (such as perf, strace) to automatically extract performance data and call relationships, and generates a simulation program based on a pre-constructed simulation function library, without manual code simplification, reducing the implementation difficulty. The entire method does not rely on special hardware and has no specific dependence on the CPU architecture, and is especially suitable for accelerating the performance evaluation of various large-scale software. Once the simulation program framework is established, for different software or different versions, only re-analysis and parameter adjustment are required to quickly generate a new simulation program, which has good generality and scalability. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic diagram of the basic process of the method of the embodiment of the present invention.

[0020] Figure 2 It is a call relationship graph of the hot functions in the embodiment of the present invention (including the time-consuming ratio and the type of load behavior).

[0021] Figure 3 It is a schematic diagram of the structure of the simulation program in the embodiment of the present invention.

[0022] Figure 4 It is a detailed process schematic diagram of the modular implementation of the method of the embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0023] Specifically, the simulation program tuning and acceleration method of the present invention is to construct a simulation program whose total running time is much lower than that of the real software, but the time-consuming ratio and behavior characteristics of each part are consistent with those of the real software, so as to ensure the comparability of performance in various configuration environments. The core idea of the present invention is to analyze the execution process of the original software, extract the hot functions that mainly consume time, identify their performance characteristic categories, and replace these hot functions with pre-constructed simulation functions, thereby generating a simulation program with a proportionally shortened execution time. The performance change trend of the simulation program under any given system configuration is consistent with that of the original program, but the running time is significantly reduced. To enable those skilled in the art to better understand the technical solution of the present invention, the technical solution of the present invention will be further described in detail below with reference to the accompanying drawings in the embodiments of the present invention.

[0024] As Figure 1 shown, the simulation program tuning and acceleration method of this embodiment includes the following steps: using a performance analysis tool to extract the function running information of the target software when running under the real system configuration and screening out the hot functions, and obtaining the upstream and downstream levels and call relationships between the hot functions; identifying the load behavior types of the hot functions, selecting the simulation program function modules from the simulation function templates according to the load behavior types, and constructing the function modules of the simulation program in combination with the upstream and downstream levels and call relationships between the hot functions; combining the function modules to generate the simulation program of the target software, and adjusting the total running time of the simulation program according to the preset global control time.

[0025] In this embodiment, when using a performance analysis tool to extract the function running information of the target software when running under the real system configuration and screening out the hot functions, the function running information includes the CPU time occupied by each function or the proportion of the call frequency of the target software when running under the real system configuration, and then deleting the functions whose CPU time occupied or call frequency proportion is less than the preset hot function identification accuracy threshold to obtain the remaining hot functions. The performance analysis tool can be selected according to needs. For example, in the Linux system, perf or strace can be used to analyze the running process of large software and record the CPU usage and system call situation of each function. Perf is a Linux performance analysis tool that can perform function-level sampling analysis and count the proportion of CPU time occupied by each function in the program. By collecting indicators such as CPU cycle counts during the running of the software through perf, a list of functions that consume the most time during the execution process (i.e., the function set) is obtained. If necessary, strace can also be used to trace system calls to assist in the analysis. According to the number of CPU cycles consumed by each function, the proportion of its execution time in the whole is counted (for example Figure 2In the example shown, the function A:B:C = 60%:30%:10%). Then, a threshold is set (such as 1%, which can be adjusted according to the accuracy requirements), and functions with a proportion lower than the threshold are filtered out, and only the main functions are retained as hotspots for use in simulating program construction. This can ignore functions that have a minimal impact on the overall performance and simplify the complexity of the simulation program.

[0026] In this embodiment, obtaining the upstream and downstream levels and call relationships (call stacks) between hot functions refers to constructing a function call graph or call relationship map for hot functions, and identifying the upstream and downstream levels and call relationships between hot functions according to the function call graph or call relationship map. By analyzing the upstream and downstream call structures of these hot functions in the program, a function call graph or call relationship map can be constructed. For example, through the call map of perf or analyzing the function call stack of the target software running, it can be determined which sub-functions are called by function A (for example, it is found that function C is called multiple times inside function A), whether function B is directly called by the main function, etc. Through this call relationship graph, the levels and call times between hot functions are clarified, providing a basis for subsequent simulation program construction. For example, in this embodiment, after analyzing the target software, the call relationship map of the hot functions obtained is as Figure 2 shown, the program main function (the main function of the original program) directly calls two hot functions, function A and function B, and function A calls function C, Figure 2 and the time-consuming ratio and load behavior type of the functions are also listed.

[0027] In this embodiment, when the load behavior type of a hot function is identified, the load behavior type includes compute-intensive, I / O-intensive, and network-intensive. In addition, it can also be a part of the above types. It should be noted that compute-intensive, I / O-intensive, and network-intensive are all well-known load behavior types, and statistics can be made according to their actual load behaviors. For example, if a hot function shows continuous CPU occupancy and rarely blocks (rarely executes system calls or only performs simple operations) during analysis, it is determined to be compute-intensive; if it is found that a function frequently performs file reading and writing or has obvious I / O waits (for example, the strace log shows that the function calls the file reading and writing system calls multiple times), it is classified as I / O-intensive; if a function makes a large number of network-related system calls (such as send / recv, etc.) or waits for network data, it is determined to be network-intensive. Through this identification based on operating system events and resource usage patterns, it is possible to accurately determine whether each hot function mainly consumes CPU computing resources, disk I / O bandwidth, or network I / O, etc., thus laying a foundation for matching appropriate simulation function types. It should be noted that in the above judgment process, rarely, seldom, a large number, and frequently can all be expressed as the frequency or number of corresponding load behaviors being lower than (rarely, seldom) or (a large number and frequently) exceeding a certain preset threshold. For example, rarely means less than the first preset threshold, seldom means less than the second preset threshold, a large number means greater than the third preset threshold, and frequently means greater than the fourth preset threshold, and the values of the first preset threshold to the fourth preset threshold increase in sequence.

[0028] Select a simulation function of a corresponding category to replace each screened hot function. The simulation function is obtained from a pre-constructed simulation function library, which contains various types of standardized functions for simulating different types of workloads. In this embodiment, when selecting a simulation program function module from the simulation function template according to the load behavior type, a pure-computation simulation function template (such as performing a large number of operations or loops) is used for compute-intensive functions in the simulation function template to occupy the CPU; a simulation function template that performs disk reading and writing or equivalent waits is used for I / O-intensive functions to generate disk I / O delays; for network-intensive functions, a simulation function template that simulates network sending and receiving delays is used, and the implementation of each simulation function template accepts an adjustable parameter to control its running time or workload size so as to precisely adjust the time-consuming of the simulation function template; when constructing the function module of the simulation program in combination with the upstream and downstream levels and call relationships between hot functions, it includes replacing the calls of hot functions with the calls of simulation function templates and retaining the function interfaces of the function modules so that the upstream and downstream levels and call relationships between function modules are consistent with the original program.

[0029] In this embodiment, when combining function modules to generate a simulation program for the target software, it includes constructing a time calculation formula shown in the following formula for the simulation program: , wherein, is the total running time of the simulation program, ~ are the execution times of the 1st to nth function modules respectively, ~ are the running parameters of the 1st to nth function modules respectively. The running parameters are the number of calls or coefficients. n is the number of function modules, and the execution time of any function module is the sum of its own execution time and the execution time of the function modules it calls; determine the time-consuming ratios of each hot function according to the function running information when the target software runs under the real system configuration, and fit the number of calls or coefficients of the 1st to nth function modules ~ so that the running time ratio (time-consuming ratio) of the function module combination matches that of the real program. Based on Figure 2 example, the simulation functions generated in this embodiment are as Figure 3 shown. Under the simulation program Main function (main function), simulation function A and simulation function B are called respectively. Simulation function A calls simulation function C. Simulation function A, simulation function B, and simulation function C are function modules of computation-intensive, IO-intensive, and network-intensive types respectively. Then the corresponding time calculation formula is: , wherein, is the total running time of the simulation program, , and are the execution times of simulation function A, simulation function B, and simulation function C respectively, , , are the number of calls or coefficients of simulation function A, simulation function B, and simulation function C respectively; these coefficients or the number of calls can be determined through the call relationship graph. For example, in the above example, the simulation program Main function (main function) includes two parts: simulation function A and simulation function B. Then the total time is composed of the time part A' of simulation function A and the time part B' of simulation function B; if simulation function C is also called inside simulation function A, then the time of the time part A' of simulation function A is composed of its own calculation time and the time of the time part C' of the called simulation function C. Through such a formulaic expression, the contribution relationship of each simulation function to the total time is clarified.

[0030] The running information of functions when the target software runs under the real system configuration is used to determine the time-consuming ratios of the function modules of the three types of compute-intensive, I / O-intensive, and network-intensive, and are used as the values of a, b, and c respectively to achieve the fitting calculation of the parameters in the time calculation formula. According to the execution time ratio of the real hot functions, set the parameters (or call count coefficients) of the simulation functions to calibrate the time-consuming ratios of each part. In other words, adjust the parameters such as a, b, and c in the above formula or the parameters of the simulation functions themselves, so that the CPU time ratio consumed by each simulation function in the simulation program is consistent with the time ratio of the corresponding function in the real program. For example, if the time ratios of the hot functions A, B, and C in the original program are 60%, 30%, and 10% respectively, then adjust the parameters of the simulation functions A', B', and C' so that their running time ratios (time-consuming ratios) are close to 6:3:1. First, calibrate each function in the simulation function library (for example, measure the CPU cycles consumed by the simulation function to execute once under the given parameters), and then inversely deduce the workload parameters that each function needs to execute according to the required ratio. Through this adjustment, the relative time consumption of each part of the simulation program strictly simulates the performance characteristics of the original program.

[0031] When combining all function modules to generate a simulation program for the target software, the framework of the simulation program is built according to the hot function call stack structure of the original software. In the Main function (main function) of the simulation program, each simulation function is called in the same order and structure as the original program. For example, if the main function of the original program sequentially calls hot functions A and B, and function A internally calls hot function C, then the Main function of the simulation program will first call simulation function A' and then call simulation function B' according to the same logic; at the same time, in the implementation of simulation function A', simulation function C' is called to simulate the process of the original function A calling C. In this way, the execution process of the simulation program is consistent with the original program. After combining and linking all simulation functions into a complete simulation program, in this embodiment, adjusting the total running time of the simulation program according to the preset global control time includes: introducing a global scaling factor, and scaling the preset global control time according to the preset global scaling factor to adjust the total running time of the simulation program. By introducing a global scaling factor to uniformly control the total execution time of the simulation program, this global scaling factor can be used as a proportional coefficient for the running parameters or call times of all simulation functions to simultaneously scale the absolute time consumption of each part in the simulation program. For example, the simulation program can be run first under the premise that the time consumption ratio of each part is correct, and its total time is measured, and then the load of each simulation function is increased or decreased proportionally through global parameters, so that the total running time of the simulation program reaches the expected target (for example, controlling the total time to one-tenth of the real program). The role of the global parameter is to conveniently adjust the speed of the simulation program: the user can, according to the test needs, set the simulation program to run 10 times, 50 times or even 100 times faster than the original program, while ensuring that the internal time distribution ratio remains unchanged. After the above steps, the final simulation program can be generated.

[0032] Through the above solution, the simulation program constructed by the method of this embodiment maintains a fixed proportional relationship with the original program in terms of execution time, but significantly shortens the running duration. Importantly, this simulation program still reproduces the performance behavior characteristics of the original program at the operating system level (such as CPU occupancy rate, IO access mode, network communication frequency, etc.). Therefore, under different system configurations or environments, its performance change trend will be consistent with the original program. This enables the use of the simulation program for performance testing to effectively predict the performance of the original program, thereby significantly improving the efficiency of configuration optimization iteration.

[0033] Figure 4 It is a detailed flowchart of the modular implementation of the method of this embodiment. See Figure 4It can be seen that the modular implementation of the method of this embodiment mainly includes: a core module, a configuration module and a simulation function library, wherein the core module is used to execute the method of this embodiment, the configuration module is used to configure the preset hot function recognition accuracy threshold, and the simulation function library is used to store the preset simulation function template, and its working process is as follows: S1, core module starts performance analysis: the user starts a large software and runs it under the real system configuration, analyzes its performance through the perf or strace tool, and obtains information such as hot function and system call path. S2, core module extracts function proportion information: the system generates CPU cycle proportion information for the acquired hot function according to the CPU time or call frequency it occupies. For example: the proportions of functions A, B, and C are 60%, 30%, and 10%, and the remaining many small functions account for about 10% in total. S3, configuration module configuration analysis accuracy threshold: the user can configure the hot function recognition accuracy threshold N% (such as 1%), and the system will filter out functions with a proportion lower than this threshold to reduce the complexity of the simulation program. S4, core module call relationship analysis: construct a function call graph or call relationship map for the hot function, and identify the upstream and downstream levels and dependencies between functions. S5. Identification and classification of core module function features: Combined with source code and debugging symbol information, identify the operating system-level behavior of each hotspot function (such as compute-intensive, I / O-intensive, network-intensive, etc.), and annotate its behavioral features. S6. Core module matches simulation function types: According to the feature category of the function, select simulation function templates with the same performance characteristics in the simulation function library (such as: computational functions correspond to CPU calculation cycles, IO functions correspond to file reading and writing, etc.). S7. Core module builds simulation program structure: Based on the call graph and feature matching results, a new simulation program function module is built with the selected simulation function, and the call structure is kept consistent with the original call stack. S8. Core module establishes time formula: According to the characteristics and combination methods of simulation functions, establish the running time formula of the simulation program, for example: ,in, is the total running time of the simulation program, , and are the execution times of simulation function A, simulation function B, and simulation function C respectively. , , They are the number of times or coefficients of the simulation functions A, B, and C being called respectively. S9. Core module time ratio fitting and parameter calculation: Through formula calculation, according to the time proportion of each function in the real program, the control parameters of simulation functions such as a, b, and c are fitted so that the running time ratio of the simulation function combination matches that of the real program. S10. Core module global parameter adjustment to control the total time: In order to control the total running time of the simulation program within the expected range (such as one-tenth of the real program), an adjustable global scaling factor is introduced to uniformly scale the running parameters of all simulation functions. S11. Core module generates a simulation program for configuration testing: Combine to generate the final simulation program. This program can replace the real software for performance testing under the operating system configuration and feedback the results to the configuration module, thus significantly accelerating the configuration search or parameter tuning process.

[0034] In summary, the characteristics of the simulation program tuning and acceleration method in this embodiment mainly include: 1. Simulation function replacement mechanism that restores the performance profile of the real program proportionally: This embodiment proposes a mechanism that precisely controls the running time of a parametric simulation function by parameterizing the simulation function and keeps the time ratio consistent among hot functions. Ensure that the performance trend of the simulation program under different configurations is consistent with that of the original program, providing a reliability guarantee for performance test acceleration. 2. Simulation program generation method with structural fidelity: In this embodiment, by analyzing the calculation / IO / network characteristics of functions (such as system calls, blocking time, etc.), the hot functions are divided into different categories, providing a basis for subsequently matching appropriate simulation functions. The simulation program strictly replicates the call relationship and structural hierarchy of the hot functions of the original software, so that similar behaviors are still maintained at the system scheduling level. This structural consistency is difficult to achieve in existing micro-benchmark testing tools or skeleton program methods. 3. Global control parameter design for uniformly scaling the total execution time of the simulation program: In this embodiment, by introducing a global scaling factor to uniformly control the execution load of all simulation functions, flexible adjustment of the overall running time of the simulation program is achieved, which not only meets the rapidity of testing but also retains the characteristics of the real performance ratio. Through the above design, the method in this embodiment can significantly shorten the time-consuming of a single round of running of large software under different system configurations without changing the performance behavior characteristics, thereby improving the efficiency of performance testing in the process of operating system configuration optimization.

[0035] In addition, this embodiment also provides a simulation program tuning and acceleration system, including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the simulation program tuning and acceleration method.

[0036] In addition, this embodiment also provides a computer-readable storage medium, in which a computer program or instruction is stored, and the computer program or instruction is programmed or configured to execute the simulation program tuning and acceleration method through a processor.

[0037] In addition, this embodiment also provides a computer program product, including a computer program or instructions, which are programmed or configured to execute the simulation program tuning and acceleration method through a processor.

[0038] Those skilled in the art should understand that the technical solution provided by the present invention can be in the form of a method, a system, or a computer program product. Therefore, the present invention can be implemented in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can be implemented in the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code. The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of flows and / or blocks in the flowchart and / or block diagram can also be implemented. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks. These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks. These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0039] The above is only the preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the idea of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, several improvements and refinements made without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A method for accelerating simulation program tuning, characterized in that, It includes the following steps: using a performance analysis tool to extract the function running information of the target software when running under the real system configuration and screening out the hot functions, obtaining the upstream and downstream levels and call relationships among the hot functions; identifying the load behavior types of the hot functions, selecting the simulation program function modules from the simulation function templates according to the load behavior types, and constructing the function modules of the simulation program in combination with the upstream and downstream levels and call relationships among the hot functions; combining the function modules to generate the simulation program of the target software, and adjusting the total running time of the simulation program according to the preset global control time.

2. The simulation program tuning and acceleration method according to claim 1, wherein When using the performance analysis tool to extract the function running information of the target software when running under the real system configuration and screening out the hot functions, the function running information includes the proportion of CPU time or call frequency occupied by each function of the target software when running under the real system configuration, and then deleting the functions with the proportion of CPU time or call frequency less than the preset hot function identification accuracy threshold to obtain the remaining hot functions.

3. The simulation program tuning and acceleration method according to claim 2, characterized in that Obtaining the upstream and downstream levels and call relationships among the hot functions means constructing a function call graph or call relationship graph for the hot functions, and identifying the upstream and downstream levels and call relationships among the hot functions according to the function call graph or call relationship graph.

4. The simulation program tuning and acceleration method according to claim 1, wherein When identifying the load behavior types of the hot functions, the load behavior types include some or all of compute-intensive, IO-intensive, and network-intensive.

5. The simulation program tuning and acceleration method according to claim 4, wherein When selecting the simulation program function modules from the simulation function templates according to the load behavior types, a pure computation simulation function template is used for the compute-intensive functions in the simulation function template to occupy the CPU; a simulation function template that performs disk read / write or equivalent waiting is used for the IO-intensive functions to generate disk IO latency; for the network-intensive functions, a simulation function template for simulating network transceiver latency is used, and the implementation of each simulation function template accepts an adjustable parameter to control its running time or workload size so as to precisely adjust the time-consuming of the simulation function template; when constructing the function modules of the simulation program in combination with the upstream and downstream levels and call relationships among the hot functions, it includes replacing the calls of the hot functions with the calls of the simulation function templates and retaining the function interfaces of the function modules so that the upstream and downstream levels and call relationships among the function modules are consistent with the original program.

6. The simulation program optimization acceleration method according to claim 5, wherein When combining the function modules to generate the simulation program of the target software, it includes constructing the following time calculation formula for the simulation program: , Among them, is the total running time of the simulation program, ~ are the execution times of the 1st to nth function modules respectively, ~ are the running parameters of the 1st to nth function modules respectively. The running parameters are the number of calls or coefficients. n is the number of function modules. And the execution time of any function module is the sum of its own execution time and the execution time of the function modules it calls; Determine the time-consuming ratio of each hot function according to the function running information when the target software runs under the real system configuration, and fit the number of calls or coefficients of the 1st to nth function modules ~ so that the running time ratio of the function module combination matches the real program.

7. The simulation program tuning and acceleration method according to claim 6, wherein Adjusting the total running time of the simulation program according to the preset global control time includes: introducing a global scaling factor and scaling the preset global control time according to the preset global scaling factor to adjust the total running time of the simulation program.

8. A simulation program tuning acceleration system, comprising a microprocessor and a memory connected to each other, characterized in that, The microprocessor is programmed or configured to execute the simulation program tuning and acceleration method according to any one of claims 1 to 7.

9. A computer-readable storage medium storing a computer program or instructions, characterized in that, The computer program or instruction is programmed or configured to execute the simulation program tuning and acceleration method according to any one of claims 1 to 7 through a processor.

10. A computer program product, comprising a computer program or instructions, characterized in that, The computer program or instruction is programmed or configured to execute the simulation program tuning and acceleration method according to any one of claims 1 to 7 through a processor.

Citation Information

Cited By

  • National cryptographic algorithm acceleration system based on Numba just-in-time compiling technology

    CN120560665A