使用自带的 单元测试工具 unit_test\linux\benchmark\bandwidth 进行测试,
自带的readme如下:
Bandwidth performs sequential and random reads and writes of varying sizes.
This permits you to see in the numbers how each type of memory is performing.
So for instance when bandwidth writes a 256-byte chunk, you know that because caches are normally write-back, this chunk will reside entirely in the L1 cache.
Whereas a 512 kB chunk will mainly reside in L2.
You could run a non-artificial benchmark and observe that a general performance number is lower on that machine, but that conceals the cause.
So the purpose of this program is to help you pinpoint the cause of a performance problem, and determine whether it is memory related.
It also tells you the best-case scenario i.e. the maximum bandwidth achieved using sequential, 128-bit memory accesses.
运行bandwidth-arm-thread结果如下:

运行bandwidth-arm结果如下:

本文介绍了如何使用自带的Bandwidth工具进行内存读写性能测试,通过不同大小的数据块分析,帮助定位性能问题并判断其内存关联性,特别关注了ARM平台和多线程测试的结果对比。
25万+

被折叠的 条评论
为什么被折叠?



