perf查看检测相关性能

2018-11-03  本文已影响0人  pandazhong

启动程序:./detectTest -p ./1080P -m ./eagle -t 30 -c 100000

perf stat统计结果如下:

其他指标均正常,除了CPI,每周期执行了0.67条指令。

怀疑时CPU的IO导致,查看CPU缓存:

执行如下指令: perf stat -e instructions -e cache-references -e cache-misses -e L1-dcache-loads -e L1-dcache-load-misses -e L1-dcache-stores -e L1-dcache-store-misses -e LLC-loads -e LLC-load-misses -e LLC-prefetches -e cycles -e cs -p 36232

输出如下:

从以上输出可知,L1D和LLC的misses偏高,为CPU IO密集型的计算。

多次测试结果表明,在Xone E5 2680型号的CPU上,每张图片检测大约需要0.7s左右。

附加:

在使用了taskset之后,性能有略微的提升.

numactl输出如下:

限制程序跑在0-35的线程:

程序输出如下:

平均检测时间比之前降低了10ms左右,看下perf的统计输出:

每周期执行的指令数,L1D,LLC命中率都略微提升。

上一篇 下一篇

猜你喜欢

热点阅读