一次使用oprofile做profiling调查网络转发性能剧降的经历


最近 回顾一些 使用 profiling 相关的经历。找到一段多年前的案例(__也是最明显的一次),这里整理一下。


===============================================================================================================

 在某一个 software release 之前,QA测试 某个嵌入式网络设备 的 网络转发 throughput,发现,比上一个 software release 下降非常严重:
 

            莫名其妙 下降 30~40 %  ?


------------------------------------------------------

 自然而然的,使用 设备 上的 oprofile,进行一下 profiling,看能不能找出一些信息线索。        # 也是当时初次使用.....


 该设备是使用 CAVIUM mips64 CPU。


 先是使用 CPU clock event 进行 profiling。        # (__大致是,CPU 跑多少 cycles,触发一个 performance interrupt,进行 sample )

 

 profiling result 如下:

        
        Counted CLK events (Conditionally clocked cycles (as opposed to count/cvm_count which count even with no clocks)) with a unit mask of 0x00 (No unit mask) count 5000

        
        samples  %        samples  %        symbol name
        
        199001   31.1233  113382   15.4567  do_ade                        # <-- 这里有问题
        
        130285   20.3763  50007     6.8172  AES_CBC_sha1_encrypt        # <-- 这里没问题,因为 跑的是 IPsec throughput。
                                                                                                                  #        是 CPU 软件上进行的 加解密,所以很耗CPU。
        35857     5.6080  18117     2.4698  do_dsemulret
        
        16410     2.5665  10036     1.3681  resume_kernel
        

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值