Conda environment-based CPU performance testing method and application

By integrating the LAMMPS and LLCBench tools into the Conda environment, the problems of dependency conflicts and complex environment configuration in CPU performance testing are solved, enabling efficient and repeatable CPU performance evaluation on various hardware architectures and operating systems, and providing more accurate performance data and evaluation reports.

CN121144121BActive Publication Date: 2026-04-17SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG UNIV
Filing Date
2025-08-22
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing technologies for CPU performance testing suffer from dependency conflicts and complex environment configurations, making it inconvenient to deploy test environments on different operating systems and difficult to comprehensively and accurately evaluate CPU computing and cache performance.

Method used

The LAMMPS and LLCBench tools are integrated into the Conda environment to quickly build a test platform. LAMMPS is used to evaluate the CPU's computing performance and parallel processing capabilities, while LLCBench tests the bandwidth and latency characteristics of the CPU's various cache levels. The Perf tool is used to monitor the running status of the CPU and the operating system, and a multi-dimensional indicator system is integrated for performance evaluation.

Benefits of technology

It enables efficient and repeatable CPU performance testing across various hardware architectures and operating systems, providing more accurate performance data and more insightful evaluation reports, supporting hardware performance evaluation and optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121144121B_ABST
    Figure CN121144121B_ABST
Patent Text Reader

Abstract

The application relates to a CPU performance test method and application under a Conda environment, belongs to the field of computer performance evaluation and optimization, and realizes comprehensive evaluation of CPU performance in combination with LAMMPS and LLCBench tools. The method quickly builds a test platform through the Conda environment, can evaluate the computing performance and parallel processing capability of the CPU by using LAMMPS, and can test the bandwidth and delay characteristics of CPU caches (L1, L2 and L3) through LLCBench. In combination with the two tools, the method realizes comprehensive testing of the computing performance and cache performance of the CPU, has the advantages of high efficiency, repeatability and wide application range, and provides scientific support for hardware performance evaluation and optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method, apparatus, device, and medium for CPU performance testing in the Conda environment, belonging to the field of computer performance evaluation and optimization. Background Technology

[0002] With the continuous improvement of computer hardware performance, especially the widespread application of multi-core CPUs and large cache architectures, how to comprehensively and accurately evaluate the CPU's computing performance, cache performance, and parallel processing capabilities has become a research hotspot. In practical applications, different CPU architectures and designs have a significant impact on the execution efficiency of applications; therefore, benchmarking for specific tasks is of great importance.

[0003] In the field of performance testing, LAMMPS (Large-scale Atomic / Molecular Massively Parallel Simulator) is a widely used tool for molecular dynamics simulations. It boasts high configurability and parallel capabilities, effectively utilizing multi-core and multi-threaded architectures, making it a crucial tool for evaluating CPU computational and parallel performance. Additionally, LLCBench (Low-Level Cache Benchmark) is a tool focused on testing CPU cache performance. It accurately assesses the bandwidth and latency characteristics of CPU cache levels (L1, L2, L3), serving as an important means of analyzing system bottlenecks.

[0004] To improve the flexibility and accuracy of performance testing, the Conda environment, as a package management and environment isolation tool, can quickly set up test environments and install relevant packages. Using the Conda environment avoids version conflicts between different dependency packages and provides consistent environment support for benchmarking across different hardware platforms. Therefore, integrating LAMMPS and LLCBench into the Conda environment to develop a universal benchmarking methodology for CPUs can more efficiently evaluate hardware performance.

[0005] Furthermore, in the software testing industry, test environment deployment includes steps such as software automation testing tools and environment deployment. When personnel deploy automation testing tools and environments on different operating systems, different adaptation and compatibility issues may arise, making it inconvenient to deploy test environments on different operating systems. Summary of the Invention

[0006] In view of this, and to address the shortcomings of existing technologies, this invention provides a CPU benchmarking method based on the Conda environment, combining LAMMPS and LLCBench tools to achieve a comprehensive evaluation of CPU performance. This method rapidly builds a test platform using the Conda environment, resolving dependency conflicts and complex environment configuration issues, and is applicable to various hardware architectures and operating systems.

[0007] By using LAMMPS, the computational performance and parallel processing capabilities of a CPU can be evaluated; by using LLCBench, the bandwidth and latency characteristics of each level of CPU cache (L1, L2, L3) can be tested. Combining these two tools, this method achieves comprehensive testing of both CPU computational and cache performance, offering advantages such as high efficiency, repeatability, and wide applicability, providing scientific support for hardware performance evaluation and optimization.

[0008] Terminology Explanation

[0009] Python is a high-level programming language characterized by its concise and readable syntax, and support for multiple programming paradigms (such as object-oriented and functional programming). It boasts a rich library of scientific computing and data analysis libraries, such as NumPy, SciPy, and Pandas, which are widely used for performance testing, data processing, and algorithm implementation. Python's cross-platform compatibility also makes it widely used in multi-core CPU performance analysis and experimental automation.

[0010] Perf is a performance analysis tool built into Linux systems, used to monitor the running status of the CPU and operating system. It can capture hardware events (such as instruction count, L3 cache hits / misses) and software events (such as context switching, thread scheduling), helping to analyze program performance bottlenecks. Perf is suitable for detailed analysis of multi-core processors, NUMA architectures, or thread migration behavior.

[0011] The technical solution of the present invention is as follows:

[0012] A CPU performance testing method under the Conda environment includes the following steps:

[0013] (1) Environment construction

[0014] Utilize the Conda environment to build a unified testing platform, adaptively installing the required dependency tools and libraries, including LAMMPS, LLCBench, Python, and perf;

[0015] The use of Conda environments avoids operating system differences and dependency conflicts, ensuring rapid deployment and consistency of the test environment.

[0016] Optimize the Conda environment to adapt to the toolchain of different hardware platforms (such as x86, ARM or domestic CPU architecture).

[0017] (2) Tool integration and testing

[0018] (2-1) LAMMPS Benchmark Test:

[0019] The test parameter script for the specified performance test uses perf to test the CPU's computing performance, including floating-point arithmetic capability, memory access efficiency, and multi-core parallel processing capability, by executing the LAMMPS standard benchmark test script.

[0020] In addition, multi-threading and MPI modes were used to test CPU performance under different task sizes and thread numbers; performance results data were collected using the Jenkins tool.

[0021] Preferably, the LAMMPS tool further includes the following before executing the LAMMPS test script:

[0022] Specify the execution path, test particles, load mode, and test tasks for the LAMMPS test script;

[0023] Create an execution project using the LAMMPS tool;

[0024] The LAMMPS tool sets up coroutines based on the number of concurrent particles and the test duration, and on an event-driven architecture.

[0025] The coroutine is invoked through the event loop to perform performance tests;

[0026] The LAMMPS tool runs LAMMPS programs by executing LAMMPS test scripts based on the execution path, test particle scene, load mode, test task, and performance indicators in the execution project.

[0027] Furthermore, the LAMMPS tool performs performance tests based on test parameters, and also includes:

[0028] Monitor and control the execution of performance tests through the TOP interface.

[0029] Furthermore, after collecting performance result data through the Jenkins tool, it also includes:

[0030] The LAMMPS tool generates a performance test report based on the performance results data, which includes CPI, IPC, cache rate, and runtime. The performance test report includes performance metrics and error reports.

[0031] (2-2) LLC Bench Benchmark Tests:

[0032] The script specifies the test parameters for cache performance testing. Using the LLCBench tool, it evaluates the bandwidth and latency characteristics of each level of CPU cache (L1, L2, L3) by executing the standard CacheBench test module. It comprehensively analyzes the impact of cache architecture on overall system performance, including cache access throughput, access response time, and data prefetching and reuse efficiency.

[0033] In addition, using different vector lengths, access granularities, and thread counts, the CPU cache access performance under different data sizes and concurrency levels was tested; cache test results data were collected using the LLCBench tool.

[0034] Preferably, the LLCBench tool also includes the following before executing the CacheBench test script:

[0035] Specify the execution path, test granularity, access mode, and test tasks for the LLCBench test module;

[0036] Create an execution project using the LLCBench tool;

[0037] The LLCBench tool sets up the test process based on vector length, cache level, and number of threads, and drives the architecture based on the cache model.

[0038] The test process is invoked through an internal loop mechanism to perform cache performance testing;

[0039] The LLCBench tool runs the LLCBench core module by executing the CacheBench test program, based on the execution path, access vector, cache level, access mode, and performance metrics of the project.

[0040] Furthermore, the LLCBench tool performs cache performance tests based on test parameters, including:

[0041] The execution of the cache test can be monitored and controlled through the TOP interface;

[0042] It supports collecting read / write bandwidth and cache latency metrics at all levels of cache.

[0043] Furthermore, after collecting cached test result data using the LLCBench tool, the following is also included:

[0044] The LLCBench tool generates a cache performance test report based on the performance results data. The performance results data includes latency statistics for different cache levels, read and write bandwidth values, and an analysis of the impact of access granularity on performance.

[0045] The performance test report includes cache metric curves, hotspot level identification results, and error detection reports.

[0046] (3) Data analysis and result verification

[0047] By integrating data from LAMMPS and LLCBench, a multi-dimensional performance evaluation system was constructed, including CPI (Clock Cycles Per Instruction), IPC (Instructions Per Cycle), L3 cache hit rate, cache bandwidth, and runtime from the Perf dataset. CPI reflects the average latency of instruction execution; a lower CPI indicates higher pipeline efficiency. IPC measures instruction parallel processing capability; a higher IPC indicates stronger processor execution efficiency. Cache hit rate represents the data access success rate; a higher IPC indicates better data locality and lower main memory dependency. Cache bandwidth reflects the data throughput capacity per unit time; a higher cache bandwidth indicates stronger processor support for large-scale data loads. Runtime is a direct performance indicator perceived by the user; a shorter runtime indicates higher overall execution efficiency. Overall, low CPI, high IPC, high cache hit rate, large bandwidth, and short runtime are important indicators of excellent processor performance, reflecting its comprehensive processing capabilities in both compute-intensive and memory-intensive scenarios.

[0048] Verify the accuracy and consistency of the data by repeating experiments to compare normalized data and manually verifying extreme values ​​to ensure the reliability of the test results. Through the above steps, the performance of the CPU can be tested, and CPU performance bottlenecks can be identified by analyzing the CPU architecture (found on the brand's official website or using the lstopo tool).

[0049] (4) Extensibility of the method

[0050] Based on this framework, other benchmarking tools can be integrated via the Conda environment or directly through the command line to cover more performance dimensions, such as stress and PyBench. Furthermore, the Conda environment supports the execution of automated scripts, which can be used for batch testing or continuous performance monitoring scenarios.

[0051] A computer-readable storage medium having a program stored thereon that, when executed by a processor, implements the steps of the CPU performance testing method in the Conda environment as described above.

[0052] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the CPU performance testing method under the Conda environment described above.

[0053] This technical solution simplifies the CPU performance evaluation process by integrating the Conda environment and high-performance testing tools, ensuring the reliability and scientific validity of test results, and provides flexible scalability, making it suitable for scenarios such as hardware performance evaluation, system optimization, and academic research.

[0054] This invention proposes a CPU benchmarking method that integrates LAMMPS and LLCBench within the Conda environment. While existing technologies may use LAMMPS or LLCBench individually for performance testing, or Conda may be mentioned as an environment management tool, there is a lack of an innovative solution that effectively combines all three to form a comprehensive evaluation of CPU and cache performance. This invention solves the complex dependency management and environment configuration challenges of traditional performance testing by integrating LAMMPS and LLCBench, two complementary tools, into the unified, stable, and highly reproducible environment provided by Conda. It also enables a more comprehensive and in-depth systematic evaluation of CPU computational efficiency, parallel scalability, and memory access performance, thus providing a more insightful CPU performance evaluation report.

[0055] The beneficial effects of this invention are as follows:

[0056] The method for performing CPU benchmark tests in the Conda environment using LAMMPS and LLCBench, proposed in this invention, has the following advantages:

[0057] 1. Quickly build a test environment using Conda without manually resolving dependency conflicts, significantly shortening test preparation time and improving test efficiency, while adapting to various hardware platforms and operating systems.

[0058] 2. By combining the LAMMPS and LLCBench tools, CPU performance can be comprehensively evaluated from multiple dimensions, including computational performance (floating-point operation capability, parallel processing capability, etc.) and cache performance (bandwidth and latency of L1 / L2 / L3 cache), providing more accurate performance data.

[0059] 3. Leveraging the portability of the Conda environment ensures consistency and repeatability of the benchmarking process across different systems and environments, facilitating fair comparisons of hardware performance and verification of scientific research results.

[0060] 4. This invention supports performance testing of multi-core CPUs and different architectures, and is applicable to multiple fields such as scientific research, engineering, hardware development and optimization. It is especially valuable in high-performance computing and hardware selection scenarios.

[0061] 5. The testing framework is based on Conda and open-source tools, which can be easily integrated with other benchmarking tools or performance analysis methods, making it easier to further expand the testing scope and optimize the testing process. Attached Figure Description

[0062] Figure 1 This is a flowchart of CPU performance testing in the Conda environment.

[0063] Figure 2 LAMMPS performance testing flowchart;

[0064] Figure 3 This is a flowchart for LLC Bench performance testing. Detailed Implementation

[0065] The present invention will be further described below with reference to the embodiments and accompanying drawings, but is not limited thereto.

[0066] Example 1:

[0067] A CPU performance testing method under the Conda environment includes the following steps:

[0068] (1) Environment setup and tool configuration

[0069] 1-1. Conda Environment Configuration

[0070] Create a separate Conda environment to manage dependencies, libraries, and tools, ensuring that the test environment does not interfere with other system applications. You can use `conda list --explicit` or manually create an `environment.yml` file to lock all packages and their versions in the environment. Below is an example of an `environment.yml` file:

[0071] name: demo

[0072] channels:

[0073] - conda-forge

[0074] - defaults

[0075] dependencies:

[0076] - python=3.9

[0077] - numpy=1.21.0

[0078] - scipy=1.7.1

[0079] - LAMMPS

[0080] - llcBench

[0081] The environment can be configured with toolchains that adapt to hardware architectures (such as x86, ARM, or domestic CPUs) and operating systems to ensure consistency across different platforms.

[0082] 1-2. Dependency Management Methods

[0083] A unified testing platform is built using the Conda environment, adaptively installing necessary dependencies and libraries, including LAMMPS, LLCBench, Python, and perf. Dependency checking and version control algorithms are introduced within the Conda environment to ensure compatibility between the testing tools and libraries and the target hardware platform. After ensuring all dependencies are installed, each tool is checked to ensure it starts normally and functions fully.

[0084] (2) Tool integration and testing

[0085] (2-1) Conduct LAMMPS benchmark algorithm testing

[0086] Creating a test file for LAMMPS particles typically requires writing an input script that includes a description of the particle system, initialization parameters, interaction models, and simulation time steps. The LAMMPS particle test file is created as follows.

[0087] 1. Creation of particle systems

[0088] First, you need to define the particle type, position, and interactions. Here are some key steps and settings:

[0089] 1.1 Selecting a Unit System

[0090] LAMMPS supports multiple unit systems (such as metal, real, si, etc.). The metal unit system is usually chosen because it has wider applicability.

[0091] 1.2 Defining Atomic Style

[0092] LAMMPS supports different atomic styles, such as atomic, charge, and atomic, and the specific choice depends on the requirements of the simulation system.

[0093] 1.3 Define the simulation region

[0094] Use the `region` command to define a simulation region.

[0095] Define a cubic region for creating particles:

[0096] region box block 0 10 0 10 0 10

[0097] create_box 1 box

[0098] This will create a region in the space x=0 to x=10, y=0 to y=10, z=0 to z=10, and create a box containing 1 type of atom for that region.

[0099] 1.4 Creating Particles

[0100] Particles are generated using the `create_atoms` command. This generates atoms within an FCC lattice within a cubic region.

[0101] lattice FCC 4.0

[0102] create_atoms 1 box

[0103] Here, fcc indicates the use of a face-centered cubic lattice structure, and 4.0 represents the lattice constant.

[0104] 1.5 Setting Particle Type and Attributes

[0105] Set particle attributes such as type and mass. Set particle mass:

[0106] mass 1 58.69

[0107] This will set the mass of type 1 particles, in atomic mass units.

[0108] 2. Setting up the interaction model

[0109] LAMMPS provides a variety of different interaction models that determine how particles interact with each other.

[0110] 2.1 Lennard-Jones Potential

[0111] The Lennard-Jones potential is suitable for describing the interaction between two particles to simulate gas and liquid systems.

[0112] Setting up inter-particle interactions:

[0113] pair_stylelj / cut 2.5

[0114] pair_coeff 1 1 1.0 1.0 2.5

[0115] Here, the LJ potential between type 1 is set with ε=1.0, σ=1.0, and a cutoff distance of 2.5.

[0116] 2.2 Embedded Atom Model (EAM)

[0117] For metallic systems, the EAM potential model can be used:

[0118] pair_styleeam

[0119] pair_coeff * * Al99.eam.alloy Al

[0120] Al99.eam.alloy is an EAM potential file that incorporates LAMMPS and describes the interactions between aluminum atoms.

[0121] 2.3 Interaction Forces

[0122] Increase the binding force between simulated molecules or particles by setting bond_style and angle_style.

[0123] 3. Simulation settings

[0124] 3.1 Time Step Setting

[0125] Use the `timestep` command to set the simulation's time step. Set the time step to 0.005 ps:

[0126] timestep 0.005

[0127] 3.2 Heating and Production Operation

[0128] A certain period of equilibration is usually required to ensure the particle system reaches thermal equilibrium. The run command can be used to set the run time.

[0129] thermo 100

[0130] run 10000

[0131] This process runs for a total of 10,000 steps, outputting thermodynamic information every 100 steps.

[0132] 4. Output of output information

[0133] 4.1 Output Particle Data

[0134] LAMMPS supports multiple data output formats for recording particle position, velocity, etc. Information output is typically accomplished via dump.

[0135] dump 1 all atoms 100 dump.LAMMPStrj

[0136] This setting specifies that particle information is output once every 100 steps.

[0137] 4.2 Output thermodynamic data

[0138] Thermo_style can be used to output thermodynamic quantities such as temperature, pressure, and energy.

[0139] thermo_style custom step temp pe ketotal press

[0140] 5. Performance monitoring

[0141] perf can monitor various kernel events, helping to record interactions between the kernel and hardware. These events include CPU instruction execution and cache performance. At the kernel level, perf can collect performance data by tracking specific hardware or software events.

[0142] 5.1 Sampling

[0143] perf records and outputs specific hardware events (such as CPU cycles and cache hits) by periodically sampling them. This sampled data can help you evaluate the efficiency of your program and identify potential bottlenecks.

[0144] 5.2 Design of perf for monitoring LAMMPS

[0145] When performing LAMMPS performance analysis, perf is used to monitor and analyze CPU performance, cache performance, and memory access. Below is the perf monitoring procedure design for LAMMPS:

[0146] 5.2.1 Identification of Monitoring Events

[0147] First, use perf list to find the kernel events supported by the CPU, and then use perf to monitor the supported kernel events.

[0148] This section monitors CPU performance-related CPI and cache miss rate, resulting in the following event monitoring:

[0149] perf record -e cycles,instructions

[0150] Here, the CPU cycles and instruction counts are recorded using perf to obtain the CPI data of LAMMPS.

[0151] CPI is calculated using the following formula:

[0152] CPI = Total CPU Cycles / Total Instructions

[0153] perf record -e cache-references,cache-misses

[0154] By monitoring cache hit rate and cache misses, performance bottlenecks in the code can be identified.

[0155] 5.2.2 Using perf to trace LAMMPS

[0156] To start performance monitoring of LAMMPS, use the following command:

[0157] Monitoring the LAMMPS process: If LAMMPS is running during testing and its process ID is pid, you can start perf using the following command:

[0158] perf record -p <pid>-e cycles,instructions,cache-references,cache-misses -a

[0159] Here, the -p option specifies the ID of the LAMMPS process, -e specifies the events to be monitored, and -a indicates full system monitoring.

[0160] Alternatively, you can execute LAMMPS directly and combine it with the perf command:

[0161] perf record -e cycles,instructions,cache-references,cache-misses . / lmp<input_script>

[0162] In this way, perf will monitor its performance while LAMMPS is running.

[0163] 5.2.3 Analysis Results

[0164] After LAMMPS finishes running, the performance data recorded by perf can be viewed through perf report, which generates a detailed performance report.

[0165] (2-2) LLC Bench Cache Performance Evaluation Method

[0166] 1. Cache bandwidth assessment

[0167] Bandwidth Calculation: Based on the testing principles of the LLCBench tool, the cache bandwidth is calculated. First, by performing large-scale data access tasks (such as memory loading, storage, etc.), the bandwidth performance at different cache levels (L1, L2, L3) is measured.

[0168] 2. Cache latency analysis

[0169] Latency Measurement Model: Cache latency is recorded using data blocks of different sizes (e.g., 16KB, 64KB, 1MB, etc.). Cache latency is analyzed in depth using different access patterns (e.g., sequential access, random access), and the impact of the cache architecture on performance is further evaluated. If CPU computation speed increases with the size of the data block, it indicates good CPU performance.

[0170] (3) Data analysis and result processing

[0171] 1. Performance data extraction and cleaning algorithm

[0172] For data cleaning of LAMMPS and LLC Bench outputs, the first step is data preprocessing and standardization, unifying data formats and unit specifications, and removing missing values ​​to ensure data consistency and integrity. Regarding outlier detection, outliers are manually reviewed to ensure the data accurately reflects system behavior while avoiding any interference with analysis.

[0173] 2. Data Visualization

[0174] Chart generation: Through data structure transformation, graph drawing algorithms, and the chart generation tools provided by llcBench, the bandwidth, CPI / IPC, and cache hit rate of the test results are presented to help quickly understand performance bottlenecks and test results.

[0175] 3. Performance index calculation and modeling

[0176] By comprehensively analyzing the collected performance data, we found that: CPI reflects the average latency of instruction execution, with lower values ​​indicating higher pipeline efficiency; IPC measures instruction parallel processing capability, with higher values ​​indicating stronger processor execution efficiency; cache hit rate indicates data access success rate, with higher values ​​indicating better data locality and lower main memory dependency; cache bandwidth reflects data throughput per unit time, with higher bandwidth indicating stronger processor support for large-scale data loads; and runtime is the direct performance indicator perceived by the user, with shorter runtime indicating higher overall execution efficiency. Overall, low CPI, high IPC, high cache hit rate, large bandwidth, and short runtime are important indicators of excellent processor performance, demonstrating its comprehensive processing capabilities in both compute-intensive and memory-intensive scenarios. Experimental data was then used to compare different types of data.

[0177] This implementation focuses primarily on the design and implementation of the algorithm. The core of this approach is to evaluate CPU performance from multiple dimensions, including computational performance, memory access efficiency, and cache performance, using two benchmarking tools: LAMMPS and LLCBench.

[0178] Example 2

[0179] A computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps in the CPU performance testing method under the Conda environment as described in Example 1.

[0180] Example 3

[0181] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the CPU performance testing method under the Conda environment as described in Example 1.< / pid>

Claims

1. A CPU performance testing method under the Conda environment, characterized in that, The steps include the following: (1) Environment construction Build a unified testing platform using the Conda environment, and install the necessary dependencies and libraries, including LAMMPS, LLCBench, Python, and perf. (2) Tool integration and testing (2-1) LAMMPS Benchmark Test: The test parameter script for the specified performance test uses perf to test the CPU's computing performance, including floating-point arithmetic capability, memory access efficiency, and multi-core parallel processing capability, by executing the LAMMPS standard benchmark test script. In addition, multi-threading and MPI modes were used to test CPU performance under different task sizes and thread numbers; performance results data were collected using the Jenkins tool. (2-2) LLC Bench Benchmark Tests: The script specifies the test parameters for cache performance testing. Using the LLCBench tool, the standard CacheBench test module is executed to evaluate the bandwidth and latency characteristics of each level of the CPU cache, and analyze the impact of the cache architecture on the overall system performance, including cache access throughput, access response time, and data prefetching and reuse efficiency. In addition, using different vector lengths, access granularities, and thread counts, we tested the CPU's cache access performance under different data sizes and concurrency levels. Collect cached test result data using the LLCBench tool; (3) Data analysis and result verification By integrating data from LAMMPS and LLCBench, a multi-dimensional performance index system is constructed, including L3 cache hit rate, cache bandwidth, and runtime from CPI, IPC, and Perf metrics. CPI reflects the average latency of instruction execution; a lower value indicates higher pipeline efficiency. IPC measures instruction parallel processing capability; a higher value indicates stronger processor execution efficiency. Cache hit rate represents the data access success rate; a higher value indicates better data locality and lower main memory dependency. Cache bandwidth reflects the data throughput per unit time; a larger value indicates stronger processor support for large-scale data loads. Runtime is a direct performance indicator perceived by the user; a shorter runtime indicates higher overall execution efficiency. Verify the accuracy and consistency of the data by repeating experiments to compare normalized data and conduct manual inspections to ensure the reliability of the test results; the above steps can complete the CPU performance test.

2. The CPU performance testing method under the Conda environment according to claim 1, characterized in that, In step (2-1), before executing the LAMMPS test script, the LAMMPS tool also includes: Specify the execution path, test particles, load mode, and test tasks for the LAMMPS test script; Create an execution project using the LAMMPS tool; The LAMMPS tool sets up coroutines based on the number of concurrent particles and the test duration, and on an event-driven architecture. The coroutine is invoked through the event loop to perform performance tests; The LAMMPS tool runs LAMMPS programs by executing LAMMPS test scripts based on the execution path, test particle scene, load mode, test task, and performance indicators in the execution project.

3. The CPU performance testing method under the Conda environment according to claim 2, characterized in that, In step (2-1), the LAMMPS tool performs performance tests based on the test parameters, and also includes: Monitor and control the execution of performance tests through the TOP interface.

4. The CPU performance testing method under the Conda environment according to claim 1, characterized in that, In step (2-1), after collecting performance result data using the Jenkins tool, the following steps are also included: The LAMMPS tool generates a performance test report based on the performance results data, which includes CPI, IPC, cache rate, and runtime. The performance test report includes performance metrics and error reports.

5. The CPU performance testing method under the Conda environment according to claim 1, characterized in that, In step (2-2), before executing the CacheBench test script, the LLCBench tool also includes: Specify the execution path, test granularity, access mode, and test tasks for the LLCBench test module; Create an execution project using the LLCBench tool; The LLCBench tool sets up the test process based on vector length, cache level, and number of threads, and drives the architecture based on the cache model. The test process is invoked through an internal loop mechanism to perform cache performance testing; The LLCBench tool runs the LLCBench core module by executing the CacheBench test program, based on the execution path, access vector, cache level, access mode, and performance metrics of the project.

6. The CPU performance testing method under the Conda environment according to claim 5, characterized in that, In step (2-2), the LLCBench tool performs cache performance testing based on the test parameters, and also includes: The execution of the cache test can be monitored and controlled through the TOP interface; It supports collecting read / write bandwidth and access latency metrics for each level of cache.

7. The CPU performance testing method under the Conda environment according to claim 1, characterized in that, In step (2-2), after collecting the cached test result data using the LLCBench tool, the following steps are also included: The LLCBench tool generates a cache performance test report based on the performance results data. The performance results data includes latency statistics for different cache levels, read and write bandwidth values, and an analysis of the impact of access granularity on performance. The performance test report includes cache metric curves, hotspot level identification results, and error detection reports.

8. A computer-readable storage medium, characterized in that, It stores a program that, when executed by the processor, implements the steps of the CPU performance testing method in the Conda environment as described in any one of claims 1-7.

9. An electronic device, comprising a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the CPU performance testing method in the Conda environment as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Application software benchmark test method and application software benchmark test device

    CN116594863A

  • Dynamic CPU scheduling method and system for RISC-V platform

    CN119356897A