Highload осень 2012 лекция 5

  • View
    85

  • Download
    4

Embed Size (px)

Transcript

5 5 .

.What Every Programmer Should Know About MemoryUlrich Drepper, Red Hat Inc., November 21, 2007 , . 2 516 CPU: 2 (Sockets) x 4 (Cores) x 2 (Threads per Core)64 CPU: 4 (Sockets) x 8 (Cores) x 2 (Threads per Core)

16 Gb MEM: 8 Gb x 2 (Channels)192 Gb MEM: 16 Gb 6 (Channels) x 2 (per Channel)

2 SATA x 2Tb16 SAS x 300 Gb

2 NIC x 4 pools4 NIC x 8 pools , .3 5$ lscpu

Architecture: x86_64CPU op-mode(s): 32-bit, 64-bitByte Order: Little EndianCPU(s): 16On-line CPU(s) list: 0-15Thread(s) per core: 2Core(s) per socket: 4CPU socket(s): 2NUMA node(s): 2Vendor ID: GenuineIntelCPU family: 6Model: 44Stepping: 2CPU MHz: 1600.000BogoMIPS: 4799.88Virtualization: VT-xL1d cache: 32KL1i cache: 32KL2 cache: 256KL3 cache: 12288KNUMA node0 CPU(s): 0-3,8-11NUMA node1 CPU(s): 4-7,12-15

$ cat /proc/cpuinfo

processor : 0vendor_id : GenuineIntelcpu family : 6model : 44model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHzstepping : 2cpu MHz : 1600.000cache size : 12288 KBphysical id : 0siblings : 8core id : 0cpu cores : 4apicid : 0initial apicid : 0fpu : yesfpu_exception : yescpuid level : 11wp : yesbogomips : 4800.59clflush size : 64cache_alignment : 64address sizes : 40 bits physical, 48 bits virtual4 5# dmidecode

Memory Device Array Handle: 0x0035 Total Width: 72 bits Data Width: 64 bits Size: 8192 MB Form Factor: DIMM Set: None Locator: DIMM A1 Bank Locator: CHANNEL A Type: Other Type Detail: Other Speed: 1333 MHz Manufacturer: NOT SUPPORT Serial Number: NOT SUPPORT Asset Tag: NOT SUPPORT Part Number: NOT SUPPORT

# dmidecode

Memory Device Array Handle: 0x0035 Total Width: 72 bits Data Width: 64 bits Size: 8192 MB Form Factor: DIMM Set: None Locator: DIMM A2 Bank Locator: CHANNEL A Type: Other Type Detail: Other Speed: 1333 MHz Manufacturer: NOT SUPPORT Serial Number: NOT SUPPORT Asset Tag: NOT SUPPORT Part Number: NOT SUPPORT

5 5-

DMA Direct Memory Access ( )AGP Advanced Graphic Port ( )6 5

NUMA Non-Uniform Memory AccessAMD OpteronIntel Nehalem 20% 7 5Static RAM RAM Random Access Memory6 - 8 5Dynamic RAM / 1 + 1 (leackage) (refresh) : 64 9 5Dynamic RAM

10 5SDRAM: Read Timing

64 bit (8 bytes) - data bus

DDR SDRAM:Dual-pumped 200MHz bus = 3.2GB/s

DDR2 SDRAM:Quad-pumped 200MHz bus = 6.4GB/s

Synchronous Dynamic RAM64 bit (8 bytes) Databus11 5SDRAM: RAS Precharge

Synchronous Dynamic RAM64 bit (8 bytes) Databus

12 5 Prefetching13 5CPU Cache:

Thread- cache lines 64 (64 8 )AMD, VIA Exclusive cacheIntel Inclusive cacheCache coherency

14 5

O S T

Dirty lines - Clean lines , 15 5

, 16 5

, 17 5

, 18 5

Prefetching 19 5What Every Programmer Should Know About Memoryhttp://people.redhat.com/drepper/cpumemory.pdf 2 , .

Prefetching 20 bykov@corp.mail.ru