Introduction
In this practice, the Kunpeng Performance Boundary Analyzer is used to quickly identify performance issues. Preliminary analysis indicates a high branch misprediction rate among microarchitecture metrics, suggesting the presence of a performance bottleneck. The System Profiler is then used to analyze the microarchitecture. The CPU branch misprediction rate for conditional statements is found to be high. Examination of the source code reveals that data is not processed before these conditional statements are executed. To address this, the data is sorted in the source code, optimizing CPU branch prediction, increasing the branch prediction success rate, and improving overall application performance.
Networking environment
This practice uses CentOS 7.6 as an example. Perform similar operations for other OSs on the Kunpeng platform.
Tuning Strategy
- Use the Kunpeng Performance Boundary Analyzer to locate application issues.
- Then, use the System Profiler to analyze the microarchitecture and identify a high branch misprediction rate. After detailed analysis, optimize the source code and verify the effectiveness of the optimization.