iface_agg_parm

The values of interrupt coalescing parameters are too small.
<span><strong>Suggestion: </strong>Adjust the parameters related to network port interrupt coalescing. The recommended values are as follows: <strong>rx-usec</strong> ≥ <strong>%s</strong>, <strong>rx-frames</strong> ≥ <strong>%s</strong>, <strong>tx-usecs</strong> ≥ <strong>%s</strong>, and <strong>tx-frames</strong> ≥ <strong>%s</strong>.</br>
<strong>Solution: </strong><strong>ethtool -C</strong> <i>NIC name</i> <strong>adaptive-rx off adaptive-tx off rx-usecs %s rx-frames %s tx-usecs %s tx-frames %s</strong></span>

检测到中断聚合参数设置偏小。
<span><strong>优化建议：</strong>建议调整网口中断聚合相关参数，相关参数配置建议如下：rx-usec大于等于%s、rx-frames大于等于%s、tx-usecs大于等于%s、tx-frames大于等于%s。</br>
<strong>修改方法：</strong><strong>ethtool -C <i>网卡名称</i> adaptive-rx off adaptive-tx off rx-usecs %s rx-frames %s tx-usecs %s tx-frames %s</strong></span>

iface_agg_switch

The adaptive interrupt coalescing function is enabled.
<span><strong>Suggestion: </strong>Disable the network port adaptive interrupt coalescing function.</br>
<strong>Solution: </strong><strong>ethtool -C</strong> <i>NIC name</i> <strong>adaptive-rx off adaptive-tx off</strong></span>

检测到中断聚合自适应参数打开。
<span><strong>优化建议：</strong>建议关闭网口中断聚合自适应。</br>
<strong>修改方法：</strong><strong>ethtool -C <i>网卡名称</i> adaptive-rx off adaptive-tx off</strong></span>

iface_bind

Network port interrupts are not bound to CPU cores, network port: %s.
<span><strong>Suggestion: </strong>Bind each network port interrupt to a CPU core in the NUMA node to reduce overheads caused by cross-NUMA memory access and improve network processing performance.</br>
<strong>Solution (use CentOS as an example): </strong></br>
1) Check whether the NIC supports multi-queue (supported by independent NICs). ethX indicates the network port name. In the command output, the value of Combined under Pre-set maximums indicates the maximum number of queues supported.</br>
# <strong>ethtool –l ethX</strong></br>
2) Stop irqbalance. </br>
# <strong>systemctl stop irqbalance.service</strong></br>
# <strong>systemctl disable irqbalance.service</strong></br>
3) Query the NUMA node corresponding to the NIC.</br>
# <strong>cat /sys/class/net/ethX/device/numa_node</strong></br>
4) Set the number of NIC queues to the number of CPU cores on the NUMA node. (Adjust the value based on the maximum number of NIC queues supported.) </br>
# <strong>ethtool -L ethx combined 24</strong></br>
5) Query the interrupt ID $irq. </br>
# <strong>cat /proc/interrupts | grep $eth | awk -F ':' '{print $1}'</strong></br>
6) Bind each interrupt to a core of the NUMA node corresponding to the NIC based on the interrupt ID. $cpuMask indicates the core ID. You can run the <strong>numactl -H | grep cpus</strong> command to query the core IDs of the NUMA node.</br>
# <strong>echo $cpuMask > /proc/irq/$irq/smp_affinity_list</strong></span>

检测到网口中断没有绑核, 网口：%s。
<span><strong>优化建议：</strong>建议将网口中断的CPU核设置在网口所在的NUMA节点上，以此减少跨NUMA的内存访问所带来的额外开销，提升网络处理性能。</br>
<strong>修改方法（以CentOS为例）：</strong></br>
1）检查网卡是否支持设置多队列（独立网卡支持），ethX为网口名。执行如下命令检查Pre-set maximums下的Combined的值，该值为支持设置的最大队列数。</br>
# <strong>ethtool –l ethX</strong></br>
2) 停止irqbalance。</br>
# <strong>systemctl stop irqbalance.service</strong></br>
# <strong>systemctl disable irqbalance.service</strong></br>
3）查找网卡对应所在的NUMA节点。</br>
# <strong>cat /sys/class/net/ethX/device/numa_node</strong></br>
4) 设置网卡队列个数为网卡所在NUMA节点上的CPU核数（需根据网卡支持的最大队列数进行调整）。</br>
# <strong>ethtool -L ethx combined 24</strong></br>
5) 查询中断号$irq</br>
# <strong>cat /proc/interrupts | grep $eth | awk -F ':' '{print $1}'</strong></br>
6）根据中断号，将每个中断分别绑定在网卡所在NUMA节点的一个核上，其中$cpuMask是核的编号（可使用“numactl -H | grep cpus”查看NUMA节点上的核编号）。</br>
# <strong>echo $cpuMask > /proc/irq/$irq/smp_affinity_list</strong></span>

page_size

The page size is less than %s KB.
<span><strong>Suggestion: </strong>Change the page size to %s KB. Increasing the page size can improve the TLB hit ratio for better performance.</br>
<strong>Solution: </strong></br>
1. Obtain the kernel source code and run the <strong>make menuconfig</strong> command in directory of the kernel source code (for example, /root/rpmbuild/BUILD/kernel-alt-4.14.0-115.el7a/linux-4.14.0-115.el7.0.1.aarch64).</br>
2. Set PAGESIZE to %s KB: </br>
<strong>Kernel Features</strong> -> <strong>Page size(%sKB)</strong> -> <strong>Page size(%sKB)</strong></br>
3. Recompile and install the kernel. For details, see https://bbs.huaweicloud.com/forum/thread-24362-1-1.html.</br>
%s</span>

检测到 PAGESIZE小于%sKB。
<span><strong>优化建议：</strong>将PAGESIZE调整为%sKB。增加PAGESIZE能提升TLB的命中率，从而提升性能。</br>
<strong>修改方法：</strong></br>
1 获取内核源码，在内核源码所在路径下（如：/root/rpmbuild/BUILD/kernel-alt-4.14.0-115.el7a/linux-4.14.0-115.el7.0.1.aarch64），执行<strong>make menuconfig</strong></br>
2 选择PAGESIZE大小为%sKB</br>
Kernel Features->Page size(%sKB)>Page size(%sKB)</br>
3 重新编译和安装内核，可参考：https://bbs.huaweicloud.com/forum/thread-24362-1-1.html</br>
%s</span>

pswp

The system is using the swap partition.
<span><strong>Suggestion: </strong>Using the swap partition will cause system performance deterioration and is not recommended.</br>
<strong>Solution: </strong>Increase the memory size or reduce the memory usage, or decrease the value of /proc/sys/vm/swappiness. </br>
Use the Process/Thread Performance Analysis function to check the memory usage of each process or thread.</br></span>

检测到系统在使用磁盘swap分区。
<span><strong>优化建议: </strong>磁盘swap分区的使用会导致系统性能降低，不建议使用。</br>
<strong>修改方法: </strong>建议增加内存大小或减少内存的使用，或把/proc/sys/vm/swappiness参数调小。</br>
通过“进程/线程性能分析”功能可以确定各个进程/线程的内存消耗情况。</br></span>

disk_scheduler_hdd

The I/O scheduling algorithm of the %s drive is not Deadline.
<span><strong>Suggestion: </strong>Change the scheduling algorithm of the %s drive to Deadline. </br>
The Deadline scheduling algorithm maintains four queues: read queue, write queue, timeout read queue, and timeout write queue. When the kernel receives a new request, it merges the request if possible; if the request cannot be merged, it sorts the requests. If neither merge nor insertion is possible, the request is placed at the end of the read or write queue. After a period of time, the I/O scheduler moves the requests in the read or write queue to the read timeout or write timeout queue. This algorithm does not limit the I/O resources of each process. It is applicable to scenarios where the I/O pressure is high and I/Os are concentrated in several processes.</br>
<strong>Solution: </strong><strong># echo deadline > /sys/block/</strong><i>Drive name</i><strong>/queue/scheduler</strong></span>

检测到%s磁盘的IO调度方式不为deadline。
<span><strong>优化建议：</strong>建议将%s磁盘的调度算法改为DeadLine</br>
DeadLine调度算法维护了4个队列，读队列,写队列,超时读队列和超时写队列。当内核收到一个新请求时，如果能合并就合并，如果不能合并，就会尝试排序。如果既不能合并，也没有合适的位置插入，就放到读或写队列的最后。一定时间后， I/O调度器会将读或写队列的请求分别放到超时读队列或者超时写队列。这个算法并不限制每个进程的IO资源，适合IO压力大且IO集中在某几个进程的场景</br>
<strong>修改方法：</strong><strong># echo deadline > /sys/block/磁盘名/queue/scheduler</strong></span>

disk_scheduler_ssd

The I/O scheduling mode of the %s drive is not Noop or None.
<span><strong>Suggestion: </strong>Change the scheduling mode of the %s drive to Noop or None. Noop (also called None) scheduling is a simple first in first out (FIFO) scheduling policy.</br>
SSDs support random read and write. Therefore, you can select this simplest scheduling policy for SSDs to achieve optimal performance.</br>
<strong>Solution: </strong><strong># echo noop > /sys/block/</strong><i>Drive name</i><strong>/queue/scheduler</strong></br>
or</br>
<strong># echo none> /sys/block/</strong><i>Drive name</i><strong>/queue/scheduler</strong></span>

检测到%s磁盘的IO调度方式不为 NOOP或者NONE。
<span><strong>优化建议: </strong>将%s磁盘调度方式修改为NOOP/NONE。NOOP，也叫NONE，是一种简单的FIFO调度策略。</br>
因为固态硬盘支持随机读写，所以固态硬盘可以选择这种最简单的调度策略，性能最好。</br>
<strong>修改方法: </strong><strong># echo noop > /sys/block/磁盘名/queue/scheduler</strong></br>
或者</br>
<strong># echo none> /sys/block/磁盘名/queue/scheduler</strong></span>

disk_file_type

The file system of the %s partition is not XFS.
<span><strong>Suggestion: </strong>The XFS file system is recommended. XFS is a highly scalable, high-performance, and robust journaling file system. It is ideal for processing large files while ensuring smooth data transmission. Therefore, the XFS file system is recommended if it is available. When creating an XFS file system, you can increase the block size of the file system. This method is more suitable for processing large files.</br>
<strong>Solution: </strong></br>
1）Format the drive. </br>
For example, run the following command to format sda1: </br>
<strong># mkfs.xfs /dev/sda1</strong></br>
2）Specify the block size. By default, the block size is 4 KB (4096 bytes). The following command sets the block size to 8192 bytes during formatting. </br>
<strong># mkfs.xfs /dev/sda1 -b size=8192</strong></span>

检测到%s分区文件系统不为XFS。
<span><strong>优化建议：</strong>建议使用XFS文件系统。XFS是一种高性能的日志文件系统，XFS极具伸缩性，非常健壮，特别擅长处理大文件，同时提供平滑的数据传输。因此如果可以选择，可以优先选择XFS文件系统。XFS文件系统在创建时，可先选择加大文件系统的block，更加适用于大文件的操作场景。</br>
<strong>修改方法：</strong></br>
1）格式化磁盘。</br>
假如要对sda1 进行格式化，执行如下命令：</br>
# mkfs.xfs /dev/sda1</br>
2）指定blocksize， 默认情况下为4KB(4096B)，假设在格式化时指定为变更为8192B。</br>
# mkfs.xfs /dev/sda1 -b size=8192</span>

cpu_prefetch_switch

The CPU usage is high.
<span><strong>Suggestion: </strong>Enable or disable CPU prefetching. When a CPU reads data from memory to the CPU cache, the CPU also prefetches adjacent data based on the locality principle. If the prefetched data is used in the next operation, the performance is improved. Otherwise, the memory bandwidth is wasted. In scenarios where data is centralized, the prefetch hit ratio is high. In this case, you are advised to enable CPU prefetching. Otherwise, disable CPU prefetching.</br>
<strong>Solution: </strong>On the BIOS screen, choose <strong>Advanced > MISC Config > Advanced > CPU Prefetching Configuration</strong> and modify the CPU prefetching parameters.</span>

检测到CPU利用率高。
<span><strong>优化建议：</strong>建议尝试打开或关闭CPU预取开关。CPU将内存中的数据读到CPU的高速缓冲Cache时，会根据局部性原理，除了读取本次要访问的数据，还会预取本次数据的周边数据到Cache里面，如果预取的数据是下次要访问的数据，那么性能会提升，如果预取的数据不是下次要取的数据，那么会浪费内存带宽。对于数据比较集中的场景，预取的命中率高，适合打开CPU预取，反之需要关闭CPU。</br>
<strong>修改方法：</strong>在BIOS如下路径修改CPU预取参数,Advanced->MISC Config-> Advanced->CPU Prefetching Configuration。</span>

cpu_compile_parm_low

The CPU usage is low.
<span><strong>Suggestion: </strong>You are advised to check the running environment or optimize the software implementation based on the cold flame diagram. The cold flame chart records information about software wait I/Os or lock resources. It is applicable to scenarios with low CPU usage. Low CPU usage is usually caused by blocking operations, such as hibernation or wait for drive or network data, and lock wait due to application for public resources.</br>
<strong>Solution: </strong></br>
1）Increase the pressure on the tested system to check the test environment. For example, increase the number of test tool threads or use multiple test tools to check the network environment.</br>
2）Adjust the number of concurrent threads to reduce contention of common resources.</br>
3）Adjust the priority of key threads.</br>
4）Use multiple instances to reduce lock contention.</br>
5）Reduce the wait time of the polling mechanism or replace it with the event triggering mechanism.</br>
6）Optimize drive read and write, for example, adjust the number of file read and write threads, read and write files in asynchronous mode, or increase the size of the data read or written each time.</br>
7）Analyze the specific scenario based on the cold flame diagram.</span>

检测到CPU利用率偏低。
<span><strong>优化建议：</strong>建议结合冷火焰图排查运行环境或者优化软件的实现。冷火焰图记录了软件等待IO或者锁资源的信息，适合分析CPU利用率低的场景。CPU利用率低一般是因为应用程序有阻塞操作，如休眠，等待磁盘或网络数据，申请公共资源导致锁等待等。</br>
<strong>修改方法：</strong></br>
1）排查测试环境增加被测系统的压力，如增加测试工具的线程数，使用多台测试工具，排查网络环境等。</br>
2）调整线程并发数减少公共资源的抢占。</br>
3）调整关键线程的线程优先级别。</br>
4）使用多实例，减少锁的争抢。</br>
5）减少轮询机制等待的时间， 或替换为事件触发机制。</br>
6）优化磁盘读写，如调整文件读写线程个数，使用异步方式读写文件或增大每次读写磁盘的数据等。</br>
7）具体场景可以结合冷火焰图进行分析。</span>

cpu_compile_parm

The CPU usage of the C/C++ program is high.
<span><strong>Suggestion: </strong>Different compilation optimization options can bring different performance effects to applications.</br>
<strong>Solution: </strong></br>
1）Add the GCC compilation option <strong>-O3</strong> or <strong>-O2</strong>. </br>
2）For GCC 9.10, you are advised to add the compilation options <strong>-mtune=tsv110 -march=armv8-a</strong>.</span>

检测到C/C++程序的CPU利用率高。
<span><strong>优化建议：</strong>不同的编译优化选项能给应用程序带来不同的性能效果。</br>
<strong>修改方法：</strong></br>
1）在GCC编译选项中添加-O3或者-O2。</br>
2）对于在GCC 9.10版本，建议在编译选项中添加-mtune=tsv110 -march=armv8-a。</span>

file_rw_sample

The read/write/pread64/pwrite64 function is used to read and write files
<span>You are advised to use libaio to read and write files. libaio Provides an asynchronous file read and write mechanism on drives to ensure unblocking data access. libaio and epoll together enable a thread to run without blocking and process multiple file read and write requests simultaneously, improving the overall server performance.</br>
<strong>Solution: </strong></br>
1) <a class="suggestLink" target="_blank">See Ten Methods for Kunpeng Performance Tuning.pdf</a></span>

检测读写文件使用read/write/pread64/pwrite64函数
<span>建议使用libaio进行文件读写。libaio提供了磁盘文件读写的异步机制，使得文件读写不用阻塞，结合 epoll 机制，实现一个线程可以无阻塞的运行，同时处理多个文件读写请求，提升服务器整体性能。</br>
<strong>修改方式：</strong></br>
1）<a class="suggestLink" target="_blank">参考鲲鹏性能优化十板斧.pdf</a></span>


app_multi_core

Unbalanced CPU usage. The CPU usage of the thread %s is too high.
<span><strong>Suggestion: </strong>Optimize the implementation of the thread %s.</br>
<strong>Solution: </strong>Distribute computing tasks of the thread to other threads or increase the number of threads of the same type.</span>

检测到CPU利用率不均衡，线程%s的CPU占用率过高。
<span><strong>优化建议：</strong>建议优化线程%s的实现。</br>
<strong>修改方法：</strong>将线程的计算任务分解到其它线程或增加此类线程的线程数。</span>

cpu_affinity_parm

Thread affinity is configured for the following threads: {%s}.
<span><strong>Suggestion: </strong>Reduce cross-NUMA memory access. The performance varies when CPU cores in different NUMA nodes access memory in the same location. The memory access latency of different operations are as follows:  cross-CPU > cross-NUMA and intra-CPU > intra-NUMA</br>
<strong>Solution: </strong></br>
1. Run the <strong>numactl</strong> command to start the program. For example, the following command is used to start the test program, which can be run only on CPU cores 28 to 31 (controlled by <strong>-C</strong>).</br>
<strong>numactl -C 28-31 ./test</strong></br>
2. In the C/C++ code, use the <strong>sched_setaffinity</strong> function to set the thread affinity.</br>

检测到如下线程没有设置线程亲和性{%s}
<span><strong>优化建议：</strong>建议减少跨NUMA访问内存。不同NUMA内的CPU core访问同一个位置的内存，性能不同。内存访问延时从高到低为：跨CPU > 跨NUMA不跨CPU >NUMA内。</br>
<strong>修改方法：</strong></br>
1） 通过numactl启动程序，如下面的启动命令表示启动test程序，只能在CPU core28到core31运行(-C控制)。</br>
<strong>numactl -C 28-31 ./test</strong></br>
2） 在C/C++代码中通过sched_setaffinity函数来设置线程亲和性。</br>

nohz

nohz is set to on.
<span><strong>Suggestion: </strong>Set <strong>nohz=off</strong> to reduce unnecessary clock interrupts. <strong>nohz=on</strong> will cause unnecessary clock interrupts.</br>
<strong>Solution: </strong></br>
1. In the <strong>/boot</strong> directory, run the <strong>find -name grub.cfg</strong> command to find the startup parameter configuration file. </br>
2. Delete <strong>nohz=off</strong> in the configuration file. </br>
3. Restart the server.</span>

检测到当前nohz=off开关为开。
<span><strong>优化建议：</strong>检测到当前nohz=off开关为开。建议关闭nohz=off以减少不必要的时钟中断。nohz=off打开会导致不必要的时钟中断。</br>
<strong>修改方法：</strong></br>
1）在/boot目录下通过<strong>find -name grub.cfg</strong>找到启动参数的配置文件。</br>
2）在配置文件中将nohz=off去掉。</br>
3）重启服务器。</span>

memory_allocation

malloc and free are frequently called.
<span><strong>Suggestion: </strong>Use jemalloc as the memory allocator. Compared with other memory allocators (such as glibc), jemalloc features high memory allocation performance and less memory fragments in multi-thread scenarios. jemalloc is recommended in service application code to fully utilize the multi-core and multi-concurrency advantages of Kunpeng chips. </br>
During memory allocation, locks cause thread waiting and affect performance. jemalloc uses the following measures to prevent threads from contending for locks: thread variables are used; each thread has its own memory manager, and allocation is performed in the thread. Therefore, the threads do not need to contend for locks.</br>
<strong>Solution: </strong></br>
1. Download jemalloc and compile and install it by referring to <strong>INSTALL.md.</strong> </br>
Source code download address: https://github.com/jemalloc/jemalloc</br>
2. Modify the link library mode of application software and add the following to the compilation options: </br>
<strong>-I`jemalloc-config --includedir`-L`jemalloc-config --libdir` -Wl,-rpath,`jemalloc-config -- libdir` -ljemalloc `jemalloc-config --libs`</strong></br>
For details, see https://github.com/jemalloc/jemalloc/wiki/Getting-Started.</br>
3. For some open-source programs, you can modify a configuration parameter to specify the memory allocation library. For example, modify the <strong>my.cnf</strong> file of MySQL. </br>
<strong>malloc-lib=/usr/local/lib/libjemalloc.so</strong></span>

检测到malloc和free被频繁调用。
<span><strong>优化建议：</strong>建议使用jemalloc做为内存分配器。jemalloc 是一款内存分配器，与其它内存分配器（glibc）相比，其最大优势在于多线程场景下内存分配性能高以及内存碎片减少。充分发挥鲲鹏芯片多核多并发优势，推荐业务应用代码使用 jemalloc 进行内存分配。</br>
在内存分配过程中，锁会造成线程等待，对性能影响巨大。jemalloc 采用如下措施避免线程竞争锁的发生：使用线程变量，每个线程有自己的内存管理器，分配在这个线程内完成，就不需要和其它线程竞争锁。</br>
<strong>修改方法：</strong></br>
1) 下载 jemalloc，参考 INSTALL.md 编译安装。</br>
源码下载地址 https://github.com/jemalloc/jemalloc</br>
2) 修改应用软件的链接库的方式，在编译选项中添加如下编译选项：</br>
-I`jemalloc-config --includedir`-L`jemalloc-config --libdir` -Wl,-rpath,`jemalloc-config -- libdir` -ljemalloc `jemalloc-config --libs`</br>
具体参考 https://github.com/jemalloc/jemalloc/wiki/Getting-Started</br>
3) 部分开源软件可以修改配置参数来指定内存分配库，如 MySql 可以配置 my.cnf 文件：</br>
malloc-lib=/usr/local/lib/libjemalloc.so</span>

iface_tso_switch

The TCP Segmentation Offload (TSO) function of the NIC %s is disabled.
<span><strong>Suggestion: </strong>Enable TSO to reduce the CPU computing workload and interrupt frequency. When a system needs to send a large data segment over a network, the computer needs to split the data segment into multiple shorter segments, so that the data can pass through all network devices in the network. This process is called segmentation. TSO enables the NIC to perform TCP segmentation (for example, splitting a 1 MB data packet to be sent into MTU packets) without involving the protocol stack.</br>
<strong>Solution: </strong><strong># ethtool -K <i>NIC name</i> tso on</strong></span>

检测到网卡%s的TSO(tcp-segmentation-offload)关闭。
<span><strong>优化建议：</strong>建议打开TSO开关，从而降低CPU 的计算量和中断频率。当一个系统需要通过网络发送一大段数据时，计算机需要将这段数据拆分为多个长度较短的数据，以便这些数据能够通过网络中所有的网络设备，这个过程被称作分段。TCP 分段卸载将 TCP 的分片运算（如将要发送的 1M 字节的数据拆分为 MTU 大小的包）交给网卡处理，无需协议栈参与，从而降低 CPU 的计算量和中断频率。</br>
<strong>修改方法：</strong><strong># ethtool -K <i>网卡名称</i> tso on</strong></span>

iface_pcie_parm

The PCIe maximum payload size of the NIC is less than 512 bytes.
<span><strong>Suggestion: </strong>Increase the PCIe maximum payload size of the NIC. The maximum payload size is the maximum unit (in bytes) of data transmitted each time. The size is in direct proportion to the transmission efficiency of the PCIe link. The larger the value of this parameter, the higher the bandwidth usage of the PCIe link.</br>
<strong>Solution: </strong>On the BIOS screen, choose <strong>Advanced</strong> > <strong>PCIe Config</strong> > <strong>Max Payload Size</strong> to change the value.</span>

检测到网卡的PCIE Max PayLoadSize小于512 Byte.
<span><strong>优化建议：</strong>建议增加网卡的PCIE Max PayLoadSize。最大数据负载为每次传输数据的最大单位（以字节为单位），它的大小与PCIe链路的传送效率成正比，该参数越大，PCIe链路带宽的利用率越高。</br>
<strong>修改方法：</strong>进入BIOS界面，选择“Advanced > PCIe Config > Max Payload Size”进行设置</span>

iface_tcp_csum

The kernel is computing the TCP checksum.
<span><strong>Suggestion: </strong>Offload TCP checksum computing to the NIC.</br>
<strong>Solution: </strong></br>
1. Run the <strong>ethtool -k</strong> <i>NIC name</i> command to check whether rx-checksumming, tx-checksumming, and tx-checksum-ipv4 are enabled. If they are not enabled, run commands to enable them. </br>
2. If the system displays a message indicating that the NIC does not support checksum, contact kernel engineers to resolve the problem.</span>

检测到内核在计算TCP的校验和。
<span><strong>优化建议：</strong>建议将TCP的检验和卸载到网卡实现</br>
<strong>修改方法：</strong></br>
1 使用<strong>ethtool -k <i>网卡名</i></strong>，观察rx-checksumming/ tx-checksumming/ tx-checksum-ipv4是否打开，如果没有打开，可以对应命令打开</br>
2 如果提示网卡系统不支持checksum，请联系内核人员进行定位。</span>

iface_int_multi_core

The CPU usage of network interrupts is high, and network interrupts are not evenly distributed among CPUs
<span><strong>Suggestion: </strong>Use multiple CPUs to process interrupts.</br>
<strong>Solution: </strong></br>
1. Run the <strong>ethtool-l</strong> <i>NIC name</i> <strong>combined</strong> Number of queues command to increase the number of NIC queues and bind NIC queue interrupts to different CPU cores.</br>
2. For the systems that do not support NIC queues or support only a small number of NIC queues, use the RPS mechanism to distribute interrupts to different CPUs: </br>
a. Set the CPU cores that can be used by the network port to receive interrupts. The CPU cores can be all CPU cores on a NUMA node or all CPU cores on a physical CPU chip. Do not use cores of different physical CPUs. Each CPU core is represented by one bit. Therefore, 1, 2, 4, and 8 correspond to CPU cores 0 to 3 respectively. If all CPU cores are allocated to these CPU cores, the sum of them is 15, which is f. For example, if you want to allocate the resources to the first eight CPU cores (0 to 7), perform the following operations:</br>
<strong>echo</strong> <i>ff</i> <strong>> /sys/class/net/</strong><i>NIC name</i><strong>/queues/</strong><i>NIC receiving queue</i><strong>/rps_cpus</strong></br>
b. Set the total number of data flow tables:</br>
<strong>echo</strong> <i>4096</i> <strong>> /sys/class/net/</strong><i>NIC name</i><strong>/queues/</strong><i>NIC receive queue</i><strong>/rps_flow_cnt</strong></br>
<strong>echo</strong> <i>32768</i> <strong>> /proc/sys/net/core/rps_sock_flow_entries</strong></br></span>

网络中断占用CPU高，且中断在CPU上的占用率不均匀
<span><strong>优化建议: </strong>建议通过多个CPU核均匀处理中断</br>
<strong>修改方法: </strong></br>
1、通过命令“ethtool -l 网卡名 combined 队列数”增加网卡队列数， 并将网卡队列的中断绑在不同的CPU核上</br>
2、对于网卡不支持网卡队列，或者支持的网卡队列少的系统，可以通过rps机制将中断散列到不同的CPU核上处理：</br>
a.设置网口接收中断可以利用的CPU核，可以是一个NUMA上的所有CPU核或者一个物理CPU片上的所有CPU核,请注意不要跨物理CPU。每个CPU核用1位表示，因此1,2,4,8分别对应0-3号CPU核，如果都分配到这些CPU核上，相加就是15，即为f。例如，想分配到前8个（0-7）CPU核上，可做如下设置：</br>
echo ff > /sys/class/net/网卡名/queues/网卡接收队列/rps_cpus</br>
b.设置数据流表的总数：</br>
echo 4096 > /sys/class/net/网卡名/queues/网卡接收队列/rps_flow_cnt</br>
echo 32768 > /proc/sys/net/core/rps_sock_flow_entries</br></span>

lock_ratio

A severe lock contention is detected.
<span><strong>Suggestion: </strong>Analyze the service logic to reduce lock contention. Lock contention causes waste of CPU resources. Reduce preemption of common resources based on service requirements.</br>
<strong>Solution: </strong></br>
1. If the system has a unique global variable, each CPU core applies for the lock corresponding to the global variable. When there are a large number of concurrent tasks, the lock contention is severe. Allocate resources to each CPU core or thread based on service logic.</br>
2. Reduce the number of concurrent threads.</br>
3. Use cache line alignment for lock variables to reduce false sharing.</span>

检测到锁争抢严重。
<span><strong>优化建议：</strong>建议分析业务逻辑减少锁的争抢。锁的争抢会导致CPU 的资源浪费，可以基于实际的业务减少公共资源的抢占。</br>
<strong>修改方法：</strong></br>
1. 大锁变小锁：并发任务高的场景下，如果系统中存在唯一的全局变量，那么每个CPU core都会申请这个全局变量对应的锁，导致这个锁的争抢严重。可以基于业务逻辑，为每个CPU core或者线程分配对应的资源。</br>
2. 减少线程并发数。</br>
3. 对锁变量使用Cacheline对齐，减少伪共享。</span>


net_epoll_select

The select function is used to monitor network events.
<span><strong>Suggestion: </strong>You are advised to use the epoll mechanism instead of select. The select function can monitor a maximum of 1024 files at a time and scans file handles in polling mode. It delivers lower performance than epoll.</br>
<strong>Solution: </strong></br>
Step 1 Create an epoll handle.</br>
  int epoll_create(int size);</br>
Step 2 Register the type of the events to be monitored.</br>
  int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);</br>
Step 3 Wait for the events to be generated.</br>
int epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) ;</br>
Or</br>
int epoll_pwait(int epfd, struct epoll_event *events, int maxevents, int timeout, const sigset_t *sigmask);</br></span>

检测到监听网络事件使用select函数
<span><strong>优化建议：</strong>建议使用epoll机制代替select。select函数每次最多监听1024个文件，且采用轮询的方式扫描文件句柄，性能比epoll差。</br>
<strong>修改方法: </strong></br>
步骤 1 创建一个epoll句柄。</br>
    int epoll_create(int size);</br>
步骤 2 注册要监听的事件类型。</br>
    int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);</br>
步骤 3 等待事件的产生。</br>
    int epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout);或</br>
    int epoll_pwait(int epfd, struct epoll_event *events,int maxevents, int timeout,const sigset_t *sigmask);</br></span>

numa_suggestion

Too many NUMA switchovers occur.
<span><strong>Suggestion: </strong>Too many NUMA switchovers occur. You are advised to bind the process to a fixed CPU core in the following ways:</br>
<strong>Solution: </strong></br>
1.Bind the NIC interrupt process to a CPU core by running the following command:</br>
echo $cpuMask > /proc/irq/$irq/smp_affinity_list //The value of $cpuMask is a hexadecimal number. The rightmost bit of the hexadecimal number indicates Core0, and $irq indicates the NIC queue interrupt ID.</br>
2.Start the program through numactl. For example, you can start the test program by running the following command:</br>
numactl -C 28-31. /test  //Indicates that the test program can run only on CPU cores 28 to 31 (controlled by -C).</br>
3.In C/C++, Use the sched_setaffinity function to set thread affinity.</br>

NUMA切换过多
<span><strong>优化建议：</strong>NUMA切换过多，建议将进程通过以下方式绑定到固定CPU核:</br>
<strong>修改方法: </strong></br>
1.网卡中断可以通过如下方式绑定到CPU核，echo $cpuMask > /proc/irq/$irq/smp_affinity_list // $cpuMask是16进制的数，最右边的bit表示core0；$irq为网卡队列中断号。</br>
2.通过numactl启动程序，如下面的启动命令表示启动test程序.</br>
numactl -C 28-31 ./test //表明只能在CPU core 28到core31运行(-C控制)。</br>
3.在C/C++代码中通过sched_setaffinity函数来设置线程亲和性</br>

disk_read_ahead

Disk read ratio is high
<span><strong>Suggestion：</strong>You are advised to set the readahead parameter to 4096 (or an optimal value based on actual services). In sequential read scenarios, increasing the readahead parameter value can improve drive read performance.</br>
<strong>Solution: </strong></br>
1）# echo 4096 > /sys/block/$DEVICE-NAME /queue/read_ahead_kb.</span>

检测磁盘连读比例过高。
<span><strong>优化建议：</strong>建议将磁盘的预读参数设置为4096（可以结合实际业务调整为最优值）。对于连续读场景，增加预读参数可以提升磁盘读性能。</br>
<strong>修改方法: </strong></br>
# echo 4096 > /sys/block/$DEVICE-NAME/queue/read_ahead_kb.</span>

iface_crc32c_le

The kernel is calculating the CRC32 checksum.
<span><strong>Suggestion：</strong>Implement __crc32c_le using assembly.</br>
<strong>Solution: </strong></br>
See https://bbs.huaweicloud.com/forum/thread-86540-1-1.html.</span>

检测到内核在计算CRC32的校验和。
<span><strong>优化建议：</strong>建议将__crc32c_le使用汇编实现。</br>
<strong>修改方法：</strong></br>
参考链接：https://bbs.huaweicloud.com/forum/thread-86540-1-1.html。</span>

iface_time

Detected a high cycle ratio of the hotspot function time.
<span><strong>Suggestion：</strong>Implement the time function using assembly.</br>
<strong>Solution: </strong></br>
Use the assembly function (__asm__ __volatile__ ("mrs %0, cntvct_el0": "=r" (res))) to implement the time function. Obtain the operation guide from the experts at the Kunpeng forum.</span>

检测到time函数热点高。
<span><strong>优化建议：</strong>优化time函数，使用汇编实现。</br>
<strong>修改方法：</strong></br>
优化time函数，使用汇编函数（__asm__ __volatile__ ("mrs %0, cntvct_el0" : "=r" (res))）实现，具体修改方法请在鲲鹏论坛联系轮值专家提供。</span>


iface_ip_idents_reserve

Detected a high cycle ratio of the hotspot function ip_idents_reserve.
<span><strong>Suggestion：</strong>Modify the ip_idents_reserve function.</br>
<strong>Solution: </strong></br>
Modify ip_idents_reserve and recompile the kernel. For details, see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a6211caa634da39d861a47437ffcda8b38ef421b.</span>

检测到ip_idents_reserve热点函数占比高。
<span><strong>优化建议：</strong>建议修改ip_idents_reserve函数。</br>
<strong>修改方法：</strong></br>
参考https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a6211caa634da39d861a47437ffcda8b38ef421b</br>
修改ip_idents_reserve并重新编译内核。</span>

iface_handle_ipi

The proportion of handle_ipi hotspot functions is high.
<span><strong>Optimization suggestion:</strong>Reduce inter-processor interrupts and enable smart polling.</br>
<strong>Solution:</strong></br>
sysctl –w kernel.halt.poll_threshold=800000.</span>

检测到handle_ipi热点函数占比高。
<span><strong>优化建议：</strong>建议减少核间中断，开启smart polling。</br>
<strong>修改方法：</strong></br>
sysctl –w kernel.halt.poll_threshold=800000。</span>

iface_lro_switch

It is detected that the large-receive-offload (LRO) of the NIC %s is disabled.
<span><strong>Suggestion：</strong>Turn on the LRO switch so that multiple received TCP data packets are aggregated into a large data packet and then transmitted to the network protocol stack for processing. This reduces the processing overhead of the upper-layer protocol stack and improves the system capability of receiving TCP data packets.</br>
<strong>Modification method:</strong> ethtool -K Network adapter name lro on</span>

检测到网卡%s的LRO(large-receive-offload)关闭。
<span><strong>优化建议：</strong>打开LRO开关，通过将接收到的多个TCP数据聚合成一个大的数据包，然后传递给网络协议栈处理，以减少上层协议栈处理开销，提高系统接收TCP数据包的能力。</br>
<strong>修改方法：</strong> ethtool -K 网卡名称 lro on</span>

io_diagnostics_latency

The detection latency value is large.
<span>1. Use high-performance drives or add physical drives.</br>
2. Adjust the RAID level and RAID parameters. It is recommended that RAID 0 or RAID 5 be used, read ahead for the read policy, write back for the write policy, and cached I/O for the I/O policy.</span>

检测到时延较大。
<span>1、采用高性能盘，或增加物理盘。</br>
2、调整RAID级别和RAID参数。建议：采用RAID0或者RAID5、Read Policy采用Read ahead、Write Policy采用Write back、IO Policy采用Cached IO。</span>

rngd_cpu_parm

The CPU usage of the rngd process is high.
<span><strong>Suggestion：</strong>The system uses the rngd service to increase entropy. You are advised to use the haveged service for better performance.</br>
<strong>Solution: </strong></br>
1)  Check and start the haveged service:</br>
    <strong>systemctl status haveged</strong> </br>
    If it is not installed, install and start it(take centos system as an example):</br>
    <strong>yum install haveged</strong></br>
    <strong>systemctl enablehaveged</strong></br>
    <strong>systemctl start haveged</strong></br>
2)  Check and stop the rngd service:</br>
    <strong>systemctl status rngd</strong></br>
    If it is running,stop it:</br>
    <strong>systemctl stop rngd</strong></br>
    <strong>systemctl disable rngd</strong><span>

检测到rngd进程CPU占比高。
<span><strong>优化建议：</strong>系统使用rngd服务进行熵增加，建议更换成性能更好的haveged服务。</br>
<strong>修改方法：</strong></br>
1） 检查并启动haveged服务：</br>
    <strong>systemctl status haveged</strong></br>
    如果没安装，则安装并启动（以centos系统为例）：</br>
    <strong>yum install haveged</strong></br>
    <strong>systemctl enable haveged</strong></br>
    <strong>systemctl start haveged</strong></br>
2） 检查并停止rngd服务：</br>
    <strong>systemctl status rngd</strong></br>
    如果在运行中，则停止它：</br>
    <strong>systemctl stop rngd</strong></br>
    <strong>systemctl disable rngd</strong><span>

numatop_system_bandwidth

The overall access of system memory is unbalanced.
<span>The memory access is unbalanced. You need to optimize core binding based on the bandwidth size for processes that access a large amount of node memory.</span>

当前系统内存整体访问不平衡
<span>当前内存访问不平衡度较大，需要对访问这些节点内存较多的进程按带宽大小依次进行绑核优化。</span>

mpi_avg_time

The MPI Avg Time is high.(Threshold: 1ms)
<span><strong>Suggestion：</strong>Replacing the official MPI library with the HMPI library reduces the average time and improves the performance.</br>
<strong>Solution: </strong>For details, see the HMPI User Guide.</span>

检测到MPI Avg Time高。（阈值：1ms）
<span><strong>优化建议：</strong>将官方MPI库替换为HMPI，使得AVG time降低，进而使得性能提升。</br>
<strong>修改方法：</strong> 请参考HMPI的用户指导文档。</span>

omp_num_threads

The number of OMP threads is less than the number of CPU cores.
<span><strong>Suggestion：</strong>Increase the number of OMP threads to the maximum number of CPU cores to make full use of the CPU. Check whether the environment variable OMP_NUM_THREADS is set or whether omp_set_num_threads() is invoked in the code to explicitly specify the number of threads. The optimization can be performed as follows.</br>
<strong>Solution: </strong>
1. Run the 'unset OMP_NUM_THREADS' command to cancel the environment variable.</br>
2. Delete the call of omp_set_num_threads() in the code.</span>

检测到CPU利用率不足，检测到OMP线程数小于CPU核数。
<span><strong>优化建议：</strong>增加OMP线程数至CPU最大核数以充分利用CPU，请检查是否设置了环境变量OMP_NUM_THREADS或在代码中调用omp_set_num_threads()来显式的指定线程数，若存在上述问题，可按照下述方法进行优化。</br>
<strong>修改方法：</strong></br>
1、取消环境变量：unset OMP_NUM_THREADS。</br>
2、删除代码内omp_set_num_threads()的调用。</br>

cpu_utilization

The CPU Utilization is high.(Threshold: 90%)
<span><strong>Suggestion：</strong>View View Top-Down metrics, locate the proportion of high-proportion metrics and perform related operations based on the optimization advice.</span>

检测到CPU Utilization高。（阈值：90%）
<span><strong>优化建议：</strong>查看Top-Down指标，定位高占比指标比例并依据其对应的优化建议进行相关操作。</span>

serial_time

The Serial Time is high.Too many programs are executed in serial mode, which affects the concurrency.(Threshold: 5%)
<span><strong>Suggestion：</strong>In a task in Detail mode, check the Top Serial hotspots to further analyze performance issues, you can use the following methods to optimize.</span>
<strong>Solution: </strong></br>
1. Modifying the serial code in parallel calls to reduce waiting.</br>
2. Optimize hotspots in serial code.</span>

检测到Serial Time占比高，程序串行执行过多影响并发性。（阈值：5%）
<span><strong>优化建议：</strong>在Detail模式任务中检查Top Serial hotspots以进一步分析性能问题，可参照以下方法进行优化。</br>
1、将串行代码修改并行调用，以减少阻塞时间。</br>
2、优化串行代码中的热点函数。</span>

imbalance

The Imbalance is high.(Threshold: 10%)
<span><strong>Suggestion：</strong>In a task in Detail mode, check the top parallel regions to identify unbalanced hotspots, you can use the following methods to optimize.</br>
1. If the critical section exists, delete the code.</br>
2. Parallelization of serial code.</span>

检测到Imbalance占比高。（阈值：10%）
<span><strong>优化建议：</strong>在Detail模式任务中检查Top parallel regions确定不平衡热点，可参照以下方法进行优化。</br>
1、若存在critical section，可考虑删除该代码。</br>
2、考虑减小并行结构的作业大小，以实现更好的负载平衡。</br>
3、考虑改变并行区域的调度类型，串行代码并行化。</span>

socket_bandwidth

The Inter Socket Bandwidth > within Socket Bandwidth.
<span><strong>Suggestion：</strong>You are advised to bind cores or enable the NUMA balancing mechanism to solve NUMA performance problems.</br>
<strong>Solution:</strong></br>
1.Run 'numactl -C core_list app to perform core binding.</br>
2.Run 'sysctl -w kernel.numa_balancing=1' to enable NUMA Balancing.</span>

检测到跨Socket带宽大于Socket内带宽。
<span><strong>优化建议：</strong>建议绑核或者打开NUMA balancing机制解决NUMA性能问题。</br>
<strong>修改方法：</strong></br>
1、考虑在使用的同一NUMA节点上分配内存。</br>
2、绑核方法：numactl -C core_list app。</br>
3、打开NUMA Balancing：sysctl -w kernel.numa_balancing=1。</span>

cpi

The CPI is high. In the no-load scenario, The CPI is susceptible to system noise. Check the environmental factors.(Threshold:0.25)
<span><strong>Suggestion：</strong>View View Top-Down metrics, locate the proportion of high-proportion metrics and perform related operations based on the optimization advice.</span>

检测到CPI偏高。这表明CPU微架构使用效率不高。（阈值：0.25）
<span><strong>优化建议：</strong></br>
1、查看Top-Down指标，定位高占比指标比例并依据其对应的优化建议进行相关操作。</br>
2、重新收集数据时，使用-ep=top-down参数以获取核心限制部分的详细信息。</span>

memory_bound

The Memory Bound is high.(Threshold: 20%)
<span><strong>Suggestion：</strong>Optimize the memory usage, for example, improve the locality of memory access, reduce random read and write, and reduce cross-die and cross-chip memory access.</span>

检测到Memory Bound占比高。（阈值：20%）
<span><strong>优化建议：</strong>优化内存使用，例如提高内存访问局部性，减少随机读写，减少跨DIE跨片的内存访问。</span>

core_bound

The Core Bound is high.(Threshold: 20%)
<span><strong>Suggestion：</strong></br>
1. Replace the division with the multiplication or shift operation.</br>
2. Reduce precision (double -> float).</br>
3. Vectorize the code (see Advanced SIMD in Instruction Mix) and use SIMD compilation options.</span>

检测到Core Bound占比高。（阈值：20%）
<span><strong>优化建议：</strong></br>
1、用乘法或移位操作替换除法。</br>
2、减少精度（double -> float）。</br>
3、代码向量化（查看Advanced SIMD in Instruction Mix）,使用SIMD编译选项。</span>

frontend_bound

The Frontend Bound is high.(Threshold: 5%)
<span><strong>Suggestion：</strong></br>
1. Use the -Os compilation option '(optimize for size) - less code, less instructions to decode'.</br>
2. Use the compiler feedback optimization mechanism.Please refer to:https://gcc.gnu.org/wiki/AutoFDO/Tutorial.</span>

检测到Frontend Bound占比高。（阈值：5%）
<span><strong>优化建议：</strong></br>
1、使用 -Os 编译选项(optimize for size) - less code, less instructions to decode；</br>
2、使用编译器反馈优化机制，请参考：https://gcc.gnu.org/wiki/AutoFDO/Tutorial。</span>

lock_contention

The Lock Contention is high.(Threshold: 5%)
<span><strong>Suggestion：</strong>
1. You are advised to narrow down the scope of the critical section.</br>
2. Minimizing overhead on lock contention for parallel regions presented in the table can give up reduction of the application wall time.</span>

检测到Lock Contention高。（阈值：5%）
<span><strong>优化建议：</strong> </br>
1、考虑缩小 critical section 的范围；</br>
2、最小化表中呈现的并行区域 Lock Contention 开销。
</span>

creation

The Creation is high.(Threshold: 1%)
<span><strong>Suggestion：</strong>You are advised to place the omp parallel introduction in the outer loop.</br>
2. Minimizing overhead on creation for parallel regions presented in the table can give up reduction of the application wall time.</span>

检测到Creation高。（阈值：1%）
<span><strong>优化建议：</strong>建议将omp parallel导语放在外层循环。</span>

scheduling

The Creation is high.(Threshold: 5%)
<span><strong>Suggestion：</strong>You are advised to increase the number of iterations allocated to the work thread.</br>
<strong>Solution: </strong>
1. schedule(dynamic, 1) -> schedule(dynamic, 8).
2.  Minimizing overhead on scheduling for parallel regions presented in the table can give up reduction of the application wall time.</span>

检测到Scheduling高。（阈值：5%）
<span><strong>优化建议：</strong>建议可以尝试增加分配给工作线程的迭代数量。</br>
<strong>修改方法：</strong></br>
1、schedule(dynamic, 1) -> schedule(dynamic, 8).</br>
2、最小化表中呈现的并行区域调度开销，可以使应用程序的墙钟时间减少</span>

mpi_send_recv_wait_rate

The MPI communication blocking function consumes a high percentage of time.(Threshold: 50%)
<span><strong>Suggestion：</strong>It is recommended that the MPI_Send and MPI_Recv calls be changed to MPI_Isend and MPI_Irecv asynchronous calls to reduce the blocking time.</span>

检测到MPI通信阻塞函数耗时占比高。（阈值：50%）
<span><strong>优化建议：</strong>建议将MPI_Send和MPI_Recv调用改为MPI_Isend和MPI_Irecv异步调用以减少阻塞时间。</span>

overhead_time

High overhead time. (Threshold: 10%)
<span><strong>Suggestion:</strong></br>
1. Check MPI section in summary report. High Overhead Time value might be  because of MPI runtime overhead on communication.</br>
2. Check parallel-regions report for further detalization of overhead time if your application is OpenMP.</span>

检测到高开销时间。（阈值：10%）
<span><strong>优化建议：</strong></br>
1.检查摘要报告中的MPI部分。高开销时间值可能是由于通信中MPI运行时开销。</br>
2.如果您的应用程序是OpenMP，请检查并行区域报告以获取更详细的开销时间说明。</span>

imbalance_barriers

High imbalance on barriers.(Threshold: 10%)
<span><strong>Suggestion:</strong></br>
1. Consider reducing job size before barriers for better load balancing.</br>
2. Consider changing scheduling type for parallel regions</span>

检测到barriers 的负载不平衡较高。(阈值：10%)
<span><strong>优化建议：</strong></br>
1.考虑在 barriers 之前减少 job 的大小，以更好地负载平衡。</br>
2.考虑改变并行区域的计划调度类型。</span>

overhead_atomics

High atomic operation overhead in the parallel region. (Threshold: 5%)
<span><strong>Suggestion: </strong></br>
1. Minimize the overhead of atomics operations in the parallel region presented in the table to reduce the wall time of the application. </span>

检测到并行区atomics操作开销高。(阈值：5%)
<span><strong>优化建议：</strong></br>
1.最小化表格中呈现的并行区atomics操作的开销，可以使应用程序的wall time减少。</span>

overhead_tasking

Parallel region tasking overhead.(Threshold: 5%)
<span><strong>Suggestion: </strong></br>
1. Minimize the tasking overhead in the parallel region presented in the table to reduce the wall time of the application. </span>

检测到并行区tasking开销高。(阈值：5%)
<span><strong>优化建议：</strong></br>
1.最小化表格中呈现的并行区tasking开销，可以使应用程序的wall time减少。</span>

OpenMP_paralle

Some loops in the OpenMP parallel region are not vectorized. (Threshold: 5%)
<span><strong>Suggestion: </strong></br>
1. Check why the loops are not vectorized according to the vectorization check report of the compiler. </span>

检测到OpenMP并行区域中的一些循环未进行向量化。(阈值：10%)
<span><strong>优化建议：</strong></br>
1.考虑使用编译器向量化报告来查看循环未进行向量化的可能原因。</span>

time_short

The running time of the application is too short, which may cause inaccurate top-down metrics. (Threshold: 30s)
<span><strong>Suggestion: </strong></br>
1. Increase the application running time to 30 seconds or longer. </br>
2. Use the -si option to reduce the collection interval to obtain more samples. </span>

检测到应用程序运行时间太短。自上而下的指标可能会在统计上不准确。（阈值：30s）
<span><strong>优化建议：</strong></br>
1.增加计算时间到30秒或更长时间。</br>
2.通过-si选项减少采样间隔以获取更多样本。</span>

spin_time

The spin takes long, indicating that there are a large number of active waits in the OS, standard libraries, or parallel running. (Threshold: 10%)
<span><strong>Suggestion: </strong></br>
1. Check the MPI section in the summary report. The long spin time may be caused by waiting for MPI calling. </br>
2. If it is an OpenMP application, check the parallel region report. The long spin time may be caused by high imbalance in the parallel region. </span>

检测到高 spin 时间值，这表明在 OS、标准 libraries 或并行运行时有大量的 active 等待。（阈值：10%）
<span><strong>优化建议：</strong></br>
1. 检查 summary 报告中的 MPI 部分。高 spin 时间值可能是因为等待 MPI 调用的原因。</br>
2. 如果应用程序是 OpenMP 的，请检查并行区域报告。高 spin 时间值可能是因为并行区域存在高不平衡的情况。</span>

MPI_Barrier

A large portion of the wall time in the application is spent waiting for MPI_Barrier() calling. (Threshold: 10%)
<span><strong>Suggestion: </strong></br>
1. Delete unnecessary MPI_Barrier calls. </span>

检测到应用程序中相当大一部分的wall time花费在等待MPI_Barrier()上。（阈值：10%）
<span><strong>优化建议：</strong></br>
1.考虑删除不必要的MPI_Barrier调用。这可以减少应用程序墙时间。</span>

short_messages

Long communication time required for frequent transmission of short messages.
<span><strong>Suggestion: </strong></br>
1. Increase the message size for the APIs presented in each table (which can be easily implemented using MPI_Type_Contigious and similar APIs or using APIs consisting of different amounts of data). </span>

检测到频繁传输短消息所需的通信时间高。
<span><strong>优化建议：</strong></br>
1.考虑对每个表所示的API增加消息大小(可以轻松实现，使用MPI_Type_Contigious及其类似API或使用以不同数量数据组成的API)。</span>

time_spent

Long transmission time between communicators. (Threshold: 20%)
<span><strong>Suggestion: </strong></br>
1. Implement a communicator hierarchy for heavy-load communicators to reduce transmission overhead. For details, see the following table. </span>

检测到communicators的传输时间高。（阈值：20%）
<span><strong>优化建议：</strong></br>
1.考虑为高负载的通信器实现通信器层次结构，以减轻传输开销。详细信息请参见下表。</span>

critical_segments

Critical Path segments with significant computation time.
<span><strong>Suggestion: </strong></br>
  1. Consider  optimizing  hotspots  on top Critical Path segments in the table
     below.  Reducing  time  of  these  segments  will improve load balance and
     reduce overall elapsed time of the application presented. Run >> hpcreport
     -i  <result> hotspots -g mpi-critical-path-segment function --hierarchical
     << to see hot functions inside Critical Path Segments.
     Top Critical Path Segments by elapsed time. </span>

检测到Critical Path segments的计算时间高。
<span><strong>优化建议：</strong></br>
1. 考虑优化下表中顶部关键路径段上的热点。减少这些段的时间将改善负载平衡并减少应用程序的总运行时间。运行 >> hpcreport -i <result> hotspots -g mpi-critical-path-segment function --hierarchical << 查看关键路径段内的热点函数。按总运行时间排序的顶部关键路径段。</span>

cpu_mpi_under_utilization

CPU under-utilization - inappropriate amount of threads.
<span><strong>Suggestion: </strong></br>
1. Consider increasing total amount of MPI ranks * OpenMP threads using both mpirun -n and OPM_NUM_THREADS options so the number
     of  processes(ranks  *  OMP_NUM_THREADS) will be equal to CPUs count.</span>

CPU利用率不足 - 线程数量不合适。
<span><strong>优化建议：</strong></br>
1. 考虑使用mpirun -n和OPM_NUM_THREADS选项将MPI ranks* OpenMP线程的总数增加，以便进程数（排名* OMP_NUM_THREADS）等于CPU数量。</span>

cpu_mpi_over_utilization

CPU over-utilization - inappropriate amount of ranks.
<span><strong>Suggestion: </strong></br>
1. Consider decreasing total amount of MPI ranks using mpirun
     -n  option,  or  try  to  parallelize code with both MPI and OpenMP so the
     number  of  processes(ranks  * OMP_NUM_THREADS) will be equal to CPUs count. </span>

CPU过度利用 - ranks数量不当
<span><strong>优化建议：</strong></br>
1. 考虑使用mpirun -n选项将MPI进程总数减少到CPU核数，或者尝试使用MPI和OpenMP并行化代码，使进程数（排名*OMP_NUM_THREADS）等于CPU数量。 </span>