1)查看/proc/cpuinfo下的信息
例如:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 44
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
stepping : 2
cpu MHz : 2400.002
cache size : 12288 KB
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nonstop_tsc aperfmperf pni pclmulqdq est ssse3 cx16 sse4_1 sse4_2 popcnt
aes hypervisor lahf_lm ida arat
bogomips : 4800.00
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
可以查看到cache size,以前的cache size往往表示的是L2 Cache,這裏的是L3 Cache
cache_alignment是64bits
2)查看更詳盡的Cache信息
使用 more /var/log/dmesg | grep cache
顯示:
[ 3.349664] Dentry cache hash table entries: 4194304 (order: 13, 33554432 bytes)
[ 3.358149] Inode-cache hash table entries: 2097152 (order: 12, 16777216 bytes)
[ 3.522622] Mount-cache hash table entries: 256
[ 3.522882] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 3.522887] CPU: L2 cache: 256K
[ 3.522890] CPU: L3 cache: 12288K
[ 3.625486] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 3.625491] CPU: L2 cache: 256K
[ 3.625495] CPU: L3 cache: 12288K
[ 3.625797] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 3.625802] CPU: L2 cache: 256K
[ 3.625804] CPU: L3 cache: 12288K
[ 3.626067] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 3.626071] CPU: L2 cache: 256K
[ 3.626074] CPU: L3 cache: 12288K
[ 3.626345] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 3.626349] CPU: L2 cache: 256K
[ 3.626351] CPU: L3 cache: 12288K
[ 3.626629] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 3.626634] CPU: L2 cache: 256K
[ 3.626636] CPU: L3 cache: 12288K
[ 3.626906] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 3.626910] CPU: L2 cache: 256K
[ 3.626912] CPU: L3 cache: 12288K
[ 3.627183] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 3.627187] CPU: L2 cache: 256K
[ 3.627189] CPU: L3 cache: 12288K
[ 3.915409] IP route cache hash table entries: 524288 (order: 10, 4194304 bytes)
[ 3.958509] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 4.835685] ehci_hcd 0000:00:1a.7: cache line size of 32 is not supported
[ 4.844852] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 4.850424] ehci_hcd 0000:00:1d.7: cache line size of 32 is not supported
可以看到L1 I Cache和D Cache,還可以看到L2 Cache
3)直接去Intel官網查看CPU情況,可以順便結合Wiki百科
以上Xeon E5620的信息可以查看
http://www.intel.com/zh_CN/products/server/processor/xeonE5/index.htm
http://en.wikipedia.org/wiki/Xeon#3600.2F5600-series_.22Gulftown.22
http://en.wikipedia.org/wiki/Gulftown_(microprocessor)
順便可以練一下英語= =!
ps:
Intel Xeon E5620
4 cores/processor 2 processors
L2 4 * 256KB