Lec14-Cache_measurement

Stephen chong harvard university 10 the memory

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: . • If S is less than the size of a cache line, sequential accesses will be fast. • If S is greater than the size of a cache line, sequential accesses will be slower. • See end of lecture notes for example C program to do this. Stephen Chong, Harvard University 10 The Memory Mountain Intel Core i7 2.7 GHz 32 KB L1 d-cache 256 KB L2 cache 8MB L3 cache CAVEAT: Tested on a VM As working set size increases, no longer fits entirely in a cache level, temporal locality worsens. Throughput (MB/sec) 9000$ 8000$ 7000$ 6000$ 5000$ 4000$ 3000$ 2000$ 1000$ s1$ As stride increases, the spatial locality of program gets worse Stephen Chong, Harvard University s5$ s9$ s13$ s17$ Stride (words) s21$ s25$ 64 m $ 16 m $ 4m 10 $ 24 k$ 25 6k $ 64 k$ 16 k$ 4k $ 0$ s29$ Working set size (bytes) 11 Varying Working Set • Keep stride constant at S = 16 words, and vary W from 1KB to 64MB • Shows size and read throughputs of different cache levels and memory 9000" 8000" Main memory L3 L2 L1 Read throughput (MB/sec) 7000" 6000" 5000" 4000" 3000" 2000" 1000" 0" 64m" 32m" 16m" Stephen Chong, Harvard University 8m" 4m" 2m" 1024k" 512k" 256k" 128k" 64k" 32k" 16k" 8k" 4k" 2k" 12 Varying stride • Keep working set constant at W = 256 KB, vary stride from 1-32 words 9000" 8000" Read throughput (MB/sec) 7000" One access per cache line 6000" 5000" 4000" 3000" 2000" 1000" Stephen Chong, Harvard University s1" s2" s3" s4" s5" s6" s7" s8" s9" s10" s11" s12" s13" s14" s15" s16" s17" s18" s19" s20" s21" s22" s23" s24" s25" s26" s27" s28" s29" s30" s31" s32" 0" 13 Core i7 Core i7! 2.67 GHz! 32 KB L1 d-cache! 256 KB L2 cache! 8 MB L3 cache! L1! 7000 Ridges of temporal locality 4000 L2! 3000 2000 L3! Stephen Chong, Harvard University 16K 128K 1M 8M 64M s32 s15 s11 s9 s7 Mem! s13 Stride (x8 bytes) s5 0 2K 1000 s1 Slopes of spatial locality 5000 s3 Read through...
View Full Document

This note was uploaded on 10/19/2012 for the course CS 61 taught by Professor Eddiekohler during the Fall '12 term at Carnegie Mellon.

Ask a homework question - tutors are online