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
    
  • 相关阅读:
    Python Kivy 安装问题解决
    cisco asa5510 配置
    对于yum中没有的源的解决办法-EPEL
    python安装scrapy小问题总结
    win10 清理winsxs文件夹
    centos(7.0) 上 crontab 计划任务
    CentOS — MySQL备份 Shell 脚本
    python 2,3版本自动识别导入
    segmenter.go
    segment.go
  • 原文地址:https://www.cnblogs.com/gnivor/p/15214927.html
Copyright © 2011-2022 走看看