1 / 20

A Component-based Definition of Spatial Locality

A Component-based Definition of Spatial Locality. Traditional Definition of Spatial locality. When a data element is accessed, the nearby data elements will also be accessed Overall miss rate The fewer the misses, the better the layout. Questions.

fedora
Download Presentation

A Component-based Definition of Spatial Locality

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Component-based Definition of Spatial Locality

  2. Traditional Definition of Spatial locality • When a data element is accessed, the nearby data elements will also be accessed • Overall miss rate • The fewer the misses, the better the layout

  3. Questions • Can the overall spatial locality be decomposed into finer components? • How much can the locality of a given data layout be improved? • Can a data layout be improved if the miss rate cannot be lowered?

  4. A Component-based Definition of Spatial Locality • Based on the reuse distance • Based on components

  5. Reuse Distance • The reuse distance of a memory access is the number of distinct data elements accessed between this and the previous access to the same data.

  6. Reuse Signature • The distribution of all reuse distances • In our experiment, we use log sized bins

  7. A Component-based Definition ofSpatial Locality • Spatial locality measures the change in reuse distance when the data block size changes from b1 to twice the size b2 = 2*b1. b1 b2

  8. Cases of Change Data layout b1 Trace x ........................................... x Data layout Case 1: x ........................................... x b2 Case 2: x y x ...........................................

  9. Changes of Reuse Signature b1 b2

  10. Data Layout Quality • Effective spatial reuse: the bin they are located has been moved to left by at least C bins, when the block size is doubled • Ineffective spatial reuse: the other reuses • In our experiment, we pick C to be 3 • The data layout quality of a bin: • 2 * effective spatial reuse / total spatial reuse

  11. Component • Data reuses of nearby bins that have a similar portion of effective spatial reuse • The spatial locality of a component is the weighted average of the spatial locality of each bin • We manually examine the bins and groups them into components

  12. Experimental Setting • 7 SPEC2000 (equake, art, swim, gzip, mcf, crafty, twolf) and 1 SPEC2006 (milc) • Data size varies from 1.2MB to 72MB • Trace length varies from 7.7 billion to 400 billion • Valgrind[NethercoteSeward’07] to collect traces • Augmented reuse distance analyzer [DingZhong’03] • Several hundred times slower

  13. Swim

  14. Why Optimized Swim Better L1 miss rate reduced by 6.7% Performance increased by 8.1% 4% reference: 0.16 -> 0.99

  15. Good spatial locality Good temporal locality Poor Spatial locality

  16. Different Inputs

  17. Possible Uses • User tuning [Levinthal] • Superpage management • Data-based cache hints [ Fang’05, BeylsD’Hollander’05]

  18. Related Work • Spatial locality [BuntMurphy’84,Weinberg+’05] • Component-based analysis [DingZhong’03,Shen+’03] • Spatial uses within a loop [WolfLam’91,McKiney+’96]

  19. Summary • A quantitative model of spatial locality • We have tested our new model on 8 SPEC benchmark programs • Among 18 components, 2 have good temporal locality, 6 have good spatial locality, 4 have poor spatial locality/poor temporal locality/large • Possible uses

More Related