To view the CPU cache size

Source: Internet
Author: User
Tags hash

Reproduced from: http://blog.csdn.net/zhuliting/article/details/6744090

Because the paper requires CPU cache-related information, but the Intel official website http://ark.intel.com/#desktopprocessors只能查到L2 cache size. Then from the network to find the Linux system to view the cache size of the two methods.

The first method is to find from the boot information:
[Plain]  View plain copy print? [root@c0106 papi]# dmesg |grep cache   dentry cache hash table  entries: 524288  (order: 10, 4194304 bytes)    Inode-cache hash  table entries: 262144  (order: 9, 2097152 bytes)    Mount-cache  hash table entries: 256   CPU: L1 I CACHE: 32K, L1  D cache: 32K   cpu: l2 cache: 4096k   Cpu: l1 i  cache: 32K, L1 D cache: 32K   cpu: l2 cache: 4096k    cpu: l1 i cache: 32k, l1 d cache: 32k   CPU:  L2 cache: 4096K   Cpu: l1 i cache: 32k, l1 d cache : 32k   cpu: l2 cache: 4096k   ip route cache hash table entries: 131072  (order: 8, 1048576 bytes)    Dquot-cache  hash table entries: 512  (order 0, 4096 bytes)    PCI: cache  line size of 32 is not supported by device 0000:00:1d.7    scsi device sda: drive cache: write back   SCSI device  sda: drive cache: write back   Sdb: assuming drive cache:  write through   sdb: assuming drive cache: write through    sdc: assuming drive cache: write through   sdc: assuming  drive cache: write through  



The second method:
[Plain]View Plain copy print? [root@c0106 papi]# ls/sys/devices/system/cpu/cpu cpu0/cpu1/cpu2/cpu3/

This machine is a child node of 1800, dual core, enable Hyper-Threading technology, so this shows four CPUs.
[Plain]View Plain copy print? [root@c0106 papi]# ls/sys/devices/system/cpu/cpu0/cache/index0 index1 index2 [root@c0106 papi]# cat/sys/devices/   System/cpu/cpu0/cache/index0/level 1 [root@c0106 papi]# cat/sys/devices/system/cpu/cpu0/cache/index0/type Data [root@c0106 papi]# cat/sys/devices/system/cpu/cpu0/cache/index0/size 32K

As you can see from the above, the information shown here is for the first-level data cache. Information on level Two cache is in the Ndex1 index2 directory

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.