CPU L2缓存初探
探索目的
为了设计高性能的内存数据库,往往要考虑CPU缓存的命中率,查阅资料发现,Intel架构的处理器有3级缓存的设置,其中L1,L2较小,L3较大但被三个核心所公用。在我使用的i7 4712mq中,使用dmidecode查看缓存大小:
inszva@inszva-Aspire-E5-572G:~$ sudo dmidecode
[sudo] password for inszva:
# dmidecode 2.12
SMBIOS 2.8 present.
28 structures occupying 1951 bytes.
Table at 0x000E6F30.
Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
Vendor: Insyde Corp.
Version: V1.05
Release Date: 03/17/2015
Address: 0xE0000
Runtime Size: 128 kB
ROM Size: 6144 kB
Characteristics:
PCI is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
EDD is supported
Japanese floppy for NEC 9800 1.2 MB is supported (int 13h)
Japanese floppy for Toshiba 1.2 MB is supported (int 13h)
5.25"/360 kB floppy services are supported (int 13h)
5.25"/1.2 MB floppy services are supported (int 13h)
3.5"/720 kB floppy services are supported (int 13h)
3.5"/2.88 MB floppy services are supported (int 13h)
8042 keyboard services are supported (int 9h)
CGA/mono video services are supported (int 10h)
ACPI is supported
USB legacy is supported
BIOS boot specification is supported
Targeted content distribution is supported
UEFI is supported
BIOS Revision: 1.5
Firmware Revision: 1.5
Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: Acer
Product Name: Aspire E5-572G
Version: V1.05
Serial Number: NXMV2CN01252001C033400
UUID: F54CECF0-8EF4-E411-85C7-F0761CC0B25C
Wake-up Type: Power Switch
SKU Number: Aspire E5-572G_0922_V1.05
Family: SharkBay System
Handle 0x0002, DMI type 2, 16 bytes
Base Board Information
Manufacturer: Acer
Product Name: EA50_HWS
Version: V1.05
Serial Number: NBMV211001520310DC3400
Asset Tag: Type2 - Board Asset Tag
Features:
Board is a hosting board
Board is replaceable
Location In Chassis: Type2 - Board Chassis Location
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0
Handle 0x0003, DMI type 3, 23 bytes
Chassis Information
Manufacturer: Acer
Type: Notebook
Lock: Not Present
Version: Chassis Version
Serial Number: Chassis Serial Number
Asset Tag: Chassis Asset Tag
Boot-up State: Safe
Power Supply State: Safe
Thermal State: Safe
Security Status: None
OEM Information: 0x00000000
Height: Unspecified
Number Of Power Cords: 1
Contained Elements: 0
SKU Number: Not Specified
Handle 0x0004, DMI type 4, 42 bytes
Processor Information
Socket Designation: U3E1
Type: Central Processor
Family: Core i7
Manufacturer: Intel(R) Corporation
ID: C3 06 03 00 FF FB EB BF
Signature: Type 0, Family 6, Model 60, Stepping 3
Flags:
FPU (Floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)
PSE (Page size extension)
TSC (Time stamp counter)
MSR (Model specific registers)
PAE (Physical address extension)
MCE (Machine check exception)
CX8 (CMPXCHG8 instruction supported)
APIC (On-chip APIC hardware supported)
SEP (Fast system call)
MTRR (Memory type range registers)
PGE (Page global enable)
MCA (Machine check architecture)
CMOV (Conditional move instruction supported)
PAT (Page attribute table)
PSE-36 (36-bit page size extension)
CLFSH (CLFLUSH instruction supported)
DS (Debug store)
ACPI (ACPI supported)
MMX (MMX technology supported)
FXSR (FXSAVE and FXSTOR instructions supported)
SSE (Streaming SIMD extensions)
SSE2 (Streaming SIMD extensions 2)
SS (Self-snoop)
HTT (Multi-threading)
TM (Thermal monitor supported)
PBE (Pending break enabled)
Version: Intel(R) Core(TM) i7-4712MQ CPU @ 2.30GHz
Voltage: 0.9 V
External Clock: 100 MHz
Max Speed: 2300 MHz
Current Speed: 2900 MHz
Status: Populated, Enabled
Upgrade: <OUT OF SPEC>
L1 Cache Handle: 0x0006
L2 Cache Handle: 0x0007
L3 Cache Handle: 0x0008
Serial Number: To Be Filled By O.E.M.
Asset Tag: To Be Filled By O.E.M.
Part Number: To Be Filled By O.E.M.
Core Count: 4
Core Enabled: 4
Thread Count: 8
Characteristics:
64-bit capable
Multi-Core
Hardware Thread
Execute Protection
Enhanced Virtualization
Power/Performance Control
Handle 0x0005, DMI type 7, 19 bytes
Cache Information
Socket Designation: L1 Cache
Configuration: Enabled, Not Socketed, Level 1
Operational Mode: Write Back
Location: Internal
Installed Size: 32 kB
Maximum Size: 32 kB
Supported SRAM Types:
Synchronous
Installed SRAM Type: Synchronous
Speed: Unknown
Error Correction Type: Single-