zoukankan      html  css  js  c++  java
  • 如何查看cache信息

    很多时候查不到本机cpu的cache信息。而了解这些信息,对于调优很有帮助

    查看1级缓存cache大小

    cat /sys/devices/system/cpu/cpu0/cache/index1/size

    查看能访问这个1级缓存的cpu编号

    cat /sys/devices/system/cpu/cpu0/cache/index1/shared_cpu_list

    查看1级缓存cache line的大小

    cat /sys/devices/system/cpu/cpu0/cache/index1/coherency_line_size

    查看1级缓存cache set的数目

    cat /sys/devices/system/cpu/cpu0/cache/index1/number_of_sets

    查看2级缓存大小

    cat /sys/devices/system/cpu/cpu0/cache/index2/size

    查看其他级别的缓存可以更改index后的数字

    cache_size = number_of_sets * cache_line_size * line_per_set

    会导致cache miss率提高的vector size

    criticalStride = number_of_sets * cache_line_size

    参考:

    http://stackoverflow.com/questions/11413855/why-is-transposing-a-matrix-of-512x512-much-slower-than-transposing-a-matrix-of

    http://www.7-cpu.com/cpu/SandyBridge.html

    http://www.7-cpu.com/cpu/Westmere.html

  • 相关阅读:
    第一篇博客
    margin 与 padding
    CSS伪类
    CSS定位
    利用css布局在图片插入文字
    CSS选择符
    CSS伪类
    CSS语法顺序
    CSS样式特点及优先级
    frame-框架
  • 原文地址:https://www.cnblogs.com/sickboy/p/3420705.html
Copyright © 2011-2022 走看看