zoukankan      html  css  js  c++  java
  • linux笔记-查看L1/L2/L3 cache大小

    参考资料
    https://blog.csdn.net/zklth/article/details/6280046
    https://blog.csdn.net/wofreeo/article/details/90518609

    getconf -a | grep CACHE

    ls -l /sys/devices/system/cpu/cpu0/cache/index
    index0/ index1/ index2/
    index0和Index1是一级cache中的data和instruction cache

    ls -l /sys/devices/system/cpu/cpu0/cache/index0/

    level:cache等级 L1/L2/L3
    type:cache类型, (Data Cache,D-Cache)和一级指令缓存(Instruction Cache,I-Cache)
    size: cache大小

    一级缓存可以分为一级数据缓存(Data Cache,D-Cache)和一级指令缓存(Instruction Cache,I-Cache)。
    二者分别用来存放数据以及对执行这些数据的指令进行即时解码,而且两者可以同时被CPU访问,减少了争用Cache所造成的冲突,提高了处理器效能。目前大多数CPU的一级数据缓存和一级指令缓存具有相同的容量,例如AMD的Athlon XP就具有64KB的一级数据缓存和64KB的一级指令缓存,其一级缓存就以64KB 64KB来表示,其余的CPU的一级缓存表示方法以此类推。

    一级cache, Data cache

    cat /sys/devices/system/cpu/cpu0/cache/index0/level
    cat /sys/devices/system/cpu/cpu0/cache/index0/type
    cat /sys/devices/system/cpu/cpu0/cache/index0/size
    

    一级cache, Instruction cache

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

    二级cache

    cat /sys/devices/system/cpu/cpu0/cache/index2/level
    cat /sys/devices/system/cpu/cpu0/cache/index2/type
    cat /sys/devices/system/cpu/cpu0/cache/index2/size
    
  • 相关阅读:
    WebActivatorEx
    autofac
    svn: E230001: Server SSL certificate verification failed
    uml 关系
    PowerDesigner生成PHP代码 UML
    linux 命令
    jQuery ajax跨域调用出现No Transport
    2015年终总结
    php+apache配置
    Memcached
  • 原文地址:https://www.cnblogs.com/gnivor/p/15214927.html
Copyright © 2011-2022 走看看